Has anyone done any experiments with car physics to see how many cars can be on screen at once? I know it’s depends on a lot of different factors like how many polys the car has, number of materials, texture size etc. Assuming those are all optimal, is it possible to get say four cars (each with four wheel colliders) moving around at say > 20 FPS?
I had a play around with this and found that i could only get a couple of cars on the screen each with 4 wheel colliders while still maintaining a frame rate of > 20 FFS. Each of my cars had about 1000 polys.
Hi iphonefreak,
I’ve made an example project with iPhone and cars with wheel colliders in a scenario with about 2k of triangles and with a couple of cars, I couldn’t get more than 15FPS. I believe that there must be a better way to simulate this cars.
Specially considering this video:
4 was our limit with mesh collider terrain and AI scripts running. We optimized everything to the point of extreme though. 1 texture for the track, stadium, all 4 cars, UI, exciters and even the dust particle.
We also have rigid-body panels that release and fly off of the vehicles as well.
It’s one thing to get vehicles on screen, it’s another to get a full game running with scripts and everything necessary. Once we can actually (efficiently) write obj-c based logic the frame-rate will open up a bit.
You will not be able to match the pure performance of dedicated and native game code written from the ground-up for one particular title.
But good luck matching the speed in which a game can be developed using Unity. It is the best thing out there for rapid iPhone game development currently.
RBGames
Work in progress . Manage to achieve a reasonable 13-18FPS, on ipod touch G1, after very extensive tuning. As you can see the draw call is very low and main FPS killer is the physics.
Scene contains
3 AI cars ( very very low poly) with 4 wheel colliders (3x5 draw calls)
1 skybox ( 1 draw call)
1 track + terrians low poly 10K (3-5 draw calls)
- GUIManager and a 5xsprites. ( 1 draw calls)
- Thread spawn modification
Scrapped :
- Lightings → use vertexlit
- 1 texture per object. → texture atlas whenever possible.
- combinemesh scripts ( long load time)
- Realtime car timing and position. (update every 3 secs)
- Radar
- other Cameras e.g, for rear view mirror
- Disable all Debug.logs…
TODO
- Audio
- occlusion Culling
- Remove wheel collider for AI cars.