Friday, March 21, 2014

Rc Car Game: 1

For the past several months I've been working on an RC car racing game, similar in style to Re-Volt (a classic for those who haven't played it). Here is a video of what I have so far.


As you can see it's currently pretty rough and all. I had to write my own custom vehicle class because the native jBullet vehicle didn't like wheel collisions. With RC-cars they are all basically monster trucks and the wheels need to collide with and roll over obstacles. The method I wound up using attaches a physics object to the chassis via a custom slider joint (a spring that can also rotate). Each wheel calculates it's own, local physics as opposed to the more common method where the vehicle looks at 4 separate rays and does the physics all at once. The wheels don't actually spin though, they just slide across the ground. This means overall lower performance, though I can run up to about 14 cars on my i-7 before the lag becomes unbearable. I've tested it on a friends Macbook and she could run around 10 cars, so for the time being I'm relatively happy.

The cars are all stored in a simple Xml document which links to their model, texture, and lists their wheels and the stats for all of the above. I plan on moving a number of the stats to wheel and engine objects which will be their own separate Xml files in the future. I hope that in the final game the player will be able to choose chassis - body type - wheels - engine - transmission and be able to customize the suspension just like you can with a real RC car.

This isn't going to be a simulator though! I like arcade-y fun. There will be weapons, power-ups, and ridiculous AI. I also currently support local co-op via keyboard sharing, and I plan on adding network multi-player. Joystick support will be incoming soon as well.

This will be a paid game when it releases though I have been toying with the idea of making these super early development builds free to play at some point. I plan on releasing the game Minecraft style, with cheaper alpha - beta builds and slowly increment the price until release.

Let me know what you all think and if you'd like to see some more footage or any articles of how it's done! I'd gladly share some code if anyone is interested.