Sign in to follow this  

Some game design questions

This topic is 4865 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently almost done with my second game(Tetris), and for my third game I'm going to try and make things a little big more professional, and do some actual design and research before diving into development. First of all, I'm not completely sure about the rendering. I'm doing to use D3D9 in Orthomode, but I need some information on how to wrap the rendering. I thought of making a IRenderer class, and then deriving all my game objects from a IRenderable class. The IRenderable has a RRESULT Render(IRenderer *pRenderer, ICamera *pCamera) function. (RRESULT is a RenderResult type/structure). So, rendering an object is just done by calling Object->Render(pRenderer, pCamera); Is this a preferred approach? I want to wrap everything in a IRenderer object so that rendering can be made cross platform(By deriving a CDXRenderer or COGLRenderer). Second is collision detection. What is the best approach for this? I for sure know it's a bad idea to have a CheckCollisions(CObject *pObject) in each game object and check all the objects like that which eachother. What other options do I have? Toolmaker

Share this post


Link to post
Share on other sites
Your approach sounds pretty sound.

Remember that your object can implement many different interfaces. So you could have an object that is renderable, but won't ever collide with anything (some background object like the sun, or something that would never be reachable on the map anyway)... so you could add that to a list of renderable interface pointers to render but not to a collision detection list. Conversely you could add them to both if they are renderable and collisions can occur.

As for collision detection strategies, that's a rather large subject. A lot of people use tree structures to organise objects so that only objects that have a chance of colliding are actually tested.

Careful not to get caught out in an engine trap though - but you sound like you are already ahead of the game there because you've actually *finished* some games ;-)

Share this post


Link to post
Share on other sites
I'm going to work with a friend on this, so we can play out large parts and motivate eachother. So at some point we could say, THATS IT, TOO MUCH ENGINE.

Are there any good articles on collision detection?

Toolmaker

Share this post


Link to post
Share on other sites

This topic is 4865 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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