seeing how far i can go with the bge.

thanks for the headsup on the files, i re-uploaded them hopefully there wont be problems now.

I think the step now is to start building things step by step on my own and not use a template so i learn more about this. thanks for the ideas!

made a very simple movement test, each direction is done with servo motion.

the controls are the same a for jet esdf for movement.

the problem is the player can easily fall over, and also manages to get rotated often, so the question is how do i control the character much mroe explicitely ?

http://fleekyflux.com/3d/Prototype/players/player1.blend

Hello again
I’ve posted in this thread a link to a file that have some examples of “character setup”, if you want to check…
Anyway, you should change your armature to “Dynamic” instead of “rigid body”
And it’s better to have the “collision hull center -doted sphere line” at the center of the character, I guess…
And it’s maybe, better, to add an “invisible collision box or dummy polys ( as in my file)” as the main Actor ( and disable it for the armature).
This way you can add a Material to it and tune “friction”
Bye

hi oto thanks again for your advice.

changing to dynamic instead of rigid body helped a lot for the movement, thanks!
however changing the armature, collision hull center destroyed the mesh the armature was parented to, then i tried changing the mesh, and the armatures center at once. this didnt destroy anything but when i pressed p the mesh would shoot off like a bullet to the left everytime. so this one i left how it was :slight_smile:

if i still cant the dynamics working perfectly i will probably go for invisible collision object. however what im really stuck on right now is figuring out how to get the armature’s look up/down animation to work with the mouse up/down movement. im totally stuck on this and i cant really move forward unless the player can actually do this :frowning:

hopefully ill figure it out soon !

Sorry I had to leave before, heres how you would do it.

You would add the shape action actuator, set to ‘property’ from the drop down box, set the property field to a property on the object (I’ll use ‘frame’, which is an integer). You would need an always sensor and a mouse sensor. All connected to a python controller.

Have the controller accessing a script/module along the lines of:

import Rasterizer

cont = GameLogic.getCurrentController()
own = cont.owner
mouse = cont.sensors['mouse']

height = Rasterizer.height
interval = height/number_of_frames_in_action # <--- make sure you change this constant!

own['frame'] = mouse.position[1]/interval

Is your game 3rd person or 1st person? If its 1st person this script won’t work.

I’d just like to append to andrew’s post that the frame property should probably be a float, not an interval, to smooth out rotation.

thanks andrew and oblivion !

i tried to follow what you were saying but i must be missing something because i just cant get this to work :frowning:

http://fleekyflux.com/3d/Prototype/players/player1.blend

Here it is:
http://www.pasteall.org/blend/241

http://fleekyflux.com/3d/Prototype/players/player11.blend

well its gotten to the point where the pitchangle animation aiming + everythign almost work together. at first i thought it was because bones were trying to do 2 things at once and therefore one would reset the other, so i tried deleting any keyframes that werent needed. but for some reason one will still override another? if anyone out there with more experence with armatures in the bge could take a look and give some advice on how to make the pitchangele animation and all the other animations work together?

Try turning off blendin on the the look animation? you probably shouldn’t use it there anyway, as you want the aiming to sync with mouse movements quickly.

the blendin tip helped thanks.

i tried putting a moving cannon inside the game for target practice. getting that in was easy, however getting a gun to play nice with my current setup was not.

however the most frustrating thing is still the player movement, ive tried adding friction but i must be doing something wrong because the player movement is always too slippery. I really just want quake3 generic fps style movement.

anyways no gun yet, but heres the blend to check out the full scene its one compressed blend so its a bit big (18mb)

http://fleekyflux.com/3d/Prototype/main_compress.blend

It shoots gnomes?
Ha ha ha!:stuck_out_tongue:

To slow the player down you could use a servo actuator with 0 set on x/y axes for linV (the target velocity) and then tweak the force to change the rate at which the player slows down (approaches the target velocity). Set 0 force max/min on z axis to enable the player to still fall along z axis.

This servo actuator should be triggered whenever the player is not telling the character to move. For a simple keyboard setup you could have:

keyboard sensor set to “All keys” and “Negative pulse mode”
connect this using AND controller to the servo

The servo will now be triggered when “No keys” are pressed.

Hope this helps.

Not downloaded your demo, but it looks great. I’ll keep an eye on this. :wink:

funkywyrm that works pretty good, except in situations where you are in the air.

is there a way to make it work only when on the ground ?

Add a collision sensor(with the property “ground”) to the AND controller?(assuming the ground has the property “ground”)

Cool! This is looking awesome!

Hello again,

the ground property stuff worked thanks minifig!

so more experimenting, i took the simpler fps template and modded it a bit, threw my level in there but also added in a crazy asteroid sculpture that coupled with the magnetic gravity in the fps template would make mc escher proud.

http://fleekyflux.com/3d/Prototype/fps_template_mod.blend

its a bit late so i may have left something out . but :

wsad to move, middle mouse button to jetpack
right is a gravity gun for greenobjects and left shoots (default simpler fps template stuff)

i really love what raider does i wish i could write python like him.

things are really starting to slow down for me in terms of blender i imagine any further steps i take will really have to be in figuring out python and the bge python api. i really wish i could just focus on making nice models but im sure any programmer worth there salt is already working on there own projects so ill just have to try to learn python which i know will take quite a while.

anyways there are a few bugs with all this but as usual its experimental so they should be expected. the most glaring bug is if you fall to fast into a mesh object you will fall through the mesh instead of colliding with it. i believe its due to the way raider coded jumping. i would take this out but his code confuses me quite a bit!

dont mind the uv seams btw, i was lazy and didnt do a proper material for this one :slight_smile:

Looking nice!:yes: