Car Movement

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
Psyke
Posts: 5
Joined: Tue Jan 20, 2009 8:10 pm

Car Movement

Post 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!
User avatar
Kjell
Posts: 1924
Joined: Sat Feb 23, 2008 11:15 pm

Post 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
Attachments
Car.zgeproj
(4.41 KiB) Downloaded 642 times
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

hacks,.

Post 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,. . .
Attachments
Car2.zgeproj
additional hacks,. .
(6.14 KiB) Downloaded 651 times
iterationGAMES.com
User avatar
Kjell
Posts: 1924
Joined: Sat Feb 23, 2008 11:15 pm

Post 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
Attachments
Car.zip
(205.56 KiB) Downloaded 662 times
Car.jpg
Car.jpg (38.34 KiB) Viewed 7509 times
User avatar
VilleK
Site Admin
Posts: 2371
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post 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.
Post Reply