game lag

i have run into another prob (big suprise :wink: ) in the game i’m making i got past the prob with the add object acutator. but when i run the game, the objects that are added lag when coming to their assigned positions and are off cue. heres the game file so you can see what i mean. (the white square that flashes will be a muzzle flash)

extract the file named ‘game’ in your blender install folder and run it from there (ignore the sdl.dll)

right clicky

thanks
dojo

What do you mean by lag? and off cue? I don’t see any jumping or anything when they’re added or collision the floor.

Please explain the problem a little more.

when you move while firing, the muzzle flash and the bullets are offset in the opposite direction you are moving.
i.e.
i am firing, the muzzle flashes (white plane) are perfectly aligned. i continue to fire and now move backwards. the muzzle flashes are offset and are floating in the air further from of the gun than they should be. did that help?

dojo

Make the muzzle flash an add object with animated vertex colors, (In the material IPO buttons) which is parented to the gun. Then, when firing, play the IPO.

If you have 2.25, you can find an example of this in my website, in the game Moonlight. Open the exe in blender, and look at how the muzzle flash works. :slight_smile:

Ah, I see the problem now, the only solution I can think of is not to have the plane (muzzle flashes) added, but just be visible then not visible which requires some game logic.I can see no solution for the bullets but to make them faster when they are added so it seems that they’re being shot in the right place.

Hope this helps :wink:

i would do some gamelogic… if i knew any, :wink: . but thanks for teh tips. although, i’m confused about the vertex coloring. is there a tutorial you could point me too that would help?

dojo

please tell me how you did the thing with the mouse moving the sight. I have to use the arrow keys in my fps.