Best Method To Make 3rd Person Car Race Game?

Hi,

Been a while…
I would like to make a 3rd person car racing game but am unsure how to implement it properly.
Is there a tutorial floating around somewhere for such a project?
Target platforms are HTML5/Android/iOS.

Let me know, thanks!

J.

I wrote a simple overhead racing game called Victory Lane using Defold a couple of years ago.

The dev dairy thread is here and the source project can be downloaded here.

Hope it helps.

1 Like

Instead of trying to implement everything at once break it down into one thing at a time.

Do you want a 2d game like the Sega game Out Run or Mario Kart for the SNES or a 3d game with a third person camera?

There are many physics tutorials online for cars and some here which could be learned from. For example https://www.reddit.com/r/gamedev/comments/30vvsu/simple_2d_car_physics/

Yes, something like Sega’s “Outrun” would be fine.
3rd person racing game(camera behind player’s car).
The biggest hurdle is rendering the road.
Other stuff is simple sprite scaling.
I’ll google some more, but if there is something I could look at that would be helpful.

J.

There are different ways of doing this.
E.g. skewing 2d sprites to create arbitrary polygons, to get a 3D perspective.
You can also rasterize the polygons yourself.

As usual, google has some good resources on making games:
http://www.extentofthejam.com/pseudo/


https://codeincomplete.com/posts/javascript-racer-v1-straight/

The first link helped me a lot when I did a racer a couple of months back. I chose to rasterize the image myself.
It’s not terribly complicated, but in the end I also got performance issues, since I modified a buffer, and set a texture every frame, pixel-by-pixel from Lua ^^

Next time, I’ll move that code to C++ and do the rendering there instead.

As for physics, the game logic is in 2d (top down), with each object (car/bonus) represented as a box.
With so very few obstacles, it’s easy to do a box-box check yourself.

The background, sun+mountains (made by @Axel), and the objects are made of sprites so it’s only the road and the sides of the road that is rasterized.

7 Likes

Ahah lovely. I was wondering how Lua and Defold would perform on something like that. I guess, on mobile is out of the question but desktop is ok?

2 Likes

This was for a mobile app, and it ran well on modern devices, and ok on some older androids/iPhones 4S.

4 Likes