Page 1 of 1

Car Movement

Posted: Tue Jan 18, 2011 9:48 pm
by Psyke
Hey guys!

I started playing with ZGameEditor and I'm really impressive with this awesome tool.

I followed the tutorial that comes with it (a simple game) and I'm really happy with the results.

I'm trying to make a car movement, but I don't know how do I start, because Up/Down, Left/Right movement is made with just changing the X and Y velocity, but car movement is a little more complexy I think (for me).

I just want to rotate using the Left and Right keys and to accelerate using the Up key, really simple.

I used Game Maker for a while, and in GM there are some variables that I can do that movement, like speed and direction. But in ZGE I don't know how do I do that.

If someone has any tutorials or documentation/help I will appreciate!

And sorry for my english!

Posted: Wed Jan 19, 2011 7:15 am
by Kjell
Hi,

ZGameEditor doesn't have such variables build-in no. But, fortunately it's really easy to do this yourself :) Attached is a basic example .. in case you have any questions, just let me know!

K

hacks,.

Posted: Wed Jan 19, 2011 7:20 pm
by jph_wacheski
Welcom Psyke!

here I am just riffing on Kjell's example; added some tire tracks, and some camera rotation (in the Z axis) so the car points up-screen,. . we could do a nice little game with this setup,. . .

Posted: Wed Jan 19, 2011 9:03 pm
by Kjell
Hi guys,

@Psyke - And with only a few more calculations you can make the car behavior look pretty convincing in 3D as well ( see attached ).

@jph - Yea, there's always room for good ( arcade style ) racing games :)

K

Posted: Thu Jan 20, 2011 7:53 am
by VilleK
Jph: Yeah, nice additions! I can't see the tire tracks though maybe something to do with alpha or z settings?

Kjell: Ha ha, what can I say? Very good work on the car handling and animation, also the reflection looks great.