Sign in to follow this  

how much math for a 2.5d game?

Recommended Posts

XDaWNeDX    113
The game I have in mind, which I'm not sure is possible but I'll try when I get there is as follows, graphically.

a 2D world, created in 3D... So it LOOKS 2D. I want to take advantage of lighting.. So houses, etc would be a bit further back, so as not to take up the ENTIRE screen with shade, they'd be a bit back.

So I have two questions,

1. Is that possible? Can I create a 2d game, in 3d, with a sun that changes throughout the day in real time, without having to use 3d models, but still getting a shaded effect behind objects, players, monsters, etc? (the world is a 2d side scrolled, similar to that of maplestory's world. Sun would be going from left to right, not forward back.)

2. If so, how much math would be required for that, and what books should I get to learn about whatever math's I need to learn?
If not possible, how much math would be required for just a plain 2d game, without the lighting effects. No z axis. Well, everything set on 0, but still.

*By the way, I'll be using c++ and dx9, maybe dx10 but not 11.

Share this post

Link to post
Share on other sites
Daaark    3553
1. You can draw whatever you like on the screen. Simulate whatever you want, then draw it however you like. Just let your gamestate generate a list of things to draw, and pass them to the rendering code. Doesn't matter how many Ds you have.

2. I can recommend this [url=""]book[/url]. Also, the Khan Academy has videos on all kinds of math that are easy to understand.

You don't need 3D to draw things in perspective and have different layers scrolling at different speed. If you want shading on sprites, use normal mapping on them.

Share this post

Link to post
Share on other sites
apatriarca    2365
Lighting in a 2.5D can't be automatically handled by the hardware. Fixed pipeline lighting only works with 3D meshes with normals and some effects, like shadows, aren't implemented at all. You can implement all the effects you have in mind with shaders and maybe also with the fixed pipeline, but it's not easy or automatic. Note that depth is useful in 2D games even if lighting isn't implemented at all to render tiles in an order independent way (so that you can batch sprites based on texture or other criteria).

You should at least learn about vector and matrices and learn how matrices can be used to represent affine transformations. Some trigonometry can also be useful, but vectors or complex numbers can often be used to easily solve problems which would otherwise requires the use of trigonometry.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this