Driving Demo using Ammo.js


#1

Link to the Driving Demo:
http://drive.x10host.com/world/world.htm

This driving demo uses Ammo.js,
https://github.com/kripken/ammo.js/
Alon Zakai’s port of bullet physics to javascript via Emscripten
https://github.com/kripken/emscripten

6 vehicles drive around a simple world, from point to point. A dat.gui
interface allows adjustment of the raycast vehicle parameters. The user can also drive around.

Screenshot:


#2

This is FANTASTIC! EXCELLENT job! :slight_smile: I think if you add slope angle collision, it would bring a totally new dimension to the game!

Keep up the EXCELLENT work! <3


#3

I’m also working on a similar game project using threejs. I must say you have achieved a really good performance result.

If you can improve the terrain realism and slopes, it will be a great boost for you demo.


#4

I agree with @Atul_Mourya! :slight_smile:


#5

Do you mean a world model with slopes? If so, yes, slopes would make driving easier, but also require more vertices, which would lower fps. I will test out some slopey models anyway. Thank you for the feedback.


#6

I am seeing fps hovering in the mid to high 50s with sometimes a solid 60, but I can only get those numbers with lower poly models. I will experiment with some sloping terrains anyway. Thanks for the feedback.


#7

Perhaps you can use heightMaps and generate terrain from it. As from my experience, you may need to keep the terrain resolution (length and width) low in order to keep the polycounts lower.

Further, you can also try to create low poly trees and populate it on the terrain using instance geometry.
You can also use DecalGeometry to create tracks if you need to.


#8

Thanks for the pointers. I have research to do. I am particularly interested in geometry instancing, since I am loading a grid of 9 world models, and usually drawing more than one per tick.


#9

This is FANTASTIC! EXCELLENT job! :slight_smile: I think if you add slope angle collision, it would bring a totally new dimension to the game! Keep up the EXCELLENT work! <3


#10

This is a lot of fun already, the mechanic is really good !

I’m not shocked by the low-poly terrain, people don’t care that a game doesn’t look realistic as long as it is fun. Maybe you should avoid flat surfaces, like on the top of the slopes and the floor of the valleys, and that’s it. The low-poly make the thing hard and a little bit surprising, which is good I think. Some obstacles could add something however, or maybe some ramps or boost tiles or dangerous things to attempt shortcuts.

But the ground’s texture is horrible… I’d rather have a plastic-looking texture without normal map than this., sorry :sweat_smile:

great job !


#11

Thanks for your honest impression. I do not know why I love that wood texture, especially with the shininess on the bump map of it. It is almost my favorite part. Maybe it has grown on me. I do not think I will do much more with this little demo. The code is not such as to be built upon. But if I found a way to keep fps at 60 all the time, I would just rewrite it and keep building.