Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am working on a 3D racing game using SDL and OpenGL. I thought it would be easier to use a 2D physics engine, since I really don't need the 3rd dimension. There will be no flying cars or jumps, they will just be stuck to the floor, so I would use 2D colliders and that things to simulate collisions in a plane but render the actual game from a 3D perspective. So the real question is: is it possible, is it a dumb idea, what else can I do?

share|improve this question

closed as primarily opinion-based by bummzack, Byte56 Jun 10 at 13:43

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

    
How about you try it out, and if you have problems or questions, you post them here? –  Panda Pajama Jun 10 at 5:25
1  
It's certainly possible. I've worked on racing games which did similar things. The main issue is just that your game will effectively be 2D, but with a 3D viewpoint; it'd be difficult to support (for example) slopes, banked roads, overpasses, or other 3D world geometry in interactive areas (apart from walls). –  Trevor Powell Jun 10 at 5:26
    
Yeah I guess I could try, but I was looking for a pros and cons answer or some online resource to do something like it. –  user3195897 Jun 10 at 5:28
    
@TrevorPowell I guess I'll be needing banked roads so what if I use some trigger collider to add a force instead of, well... colliding. –  user3195897 Jun 10 at 5:38
1  
Any pros and cons are completely dependent on your precise game. The current answer is saying exactly what you said, so I'd recommend you try it yourself and see if it works for your game. Be bold! try things out! make mistakes and learn from them! –  Panda Pajama Jun 10 at 5:57

3 Answers 3

up vote 9 down vote accepted

Yes, it's possible.

No its not a dumb idea. In fact many of the older racing games did something similar. Super Mario Kart is one example. The rendering uses 2d sprites in 3d space instead of polygons, but the physics engine is all 2d.

Super Mario Kart for NES

share|improve this answer
    
References for the physics engine in SMK? –  Byte56 Jun 10 at 15:09

It's not dumb, but realize that car/racing physics are very different from traditional game physics. You're not going to be able to just drop in Box2D.

Traction, handling, acceleration, braking, etc. are all going to need a good deal of special casing. It'll likely be a lot easier sticking to 2D collision handling, of course, but collision is hardly going to be the most complex thing you'll have to deal with.

share|improve this answer
    
What other things I'll need to deal with? I mean is it related to physics or other aspects of the game. –  user3195897 Jun 10 at 6:44

It depends on what level of physics realism you are aiming for. If you're fine with a Mario-kart type of racing game, then you won't have much trouble with a 2D physics engine. But if you want a top-heavy vehicle to roll over when it goes around a sharp turn at high speed, then you will need 3D physics.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.