Sign in to follow this  

My design and my problem

This topic is 4256 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

Howdy, Currently I'm working on an Alley Cat remake. I want to greatly abstract the graphical representation from the game logic, and I'm having a problem implementing it. Here's how I (with the help of the guys from #gamedev) believe the things should be:
I would love to receive comments on the overall scheme drawn above. Also, I'm having a trouble understanding how to make my logic affect the representation. For example, the logic decides that the cat is falling and therefore the active sprite for the cat is now the 'fallingLeft' one. How do I manage this connection between the representation and the logic? Thanks a lot.

Share this post


Link to post
Share on other sites
Alley Cat was a lot of fun. Sorry I'm not too helpful tonight. Mentioning it brought back some great memories of sleeping dogs and swiss cheese.

Share this post


Link to post
Share on other sites
A little observation: you don't use IRenderable.
Having CCatDirect3DRepresentation refer to CDirect3DSprite is perfectly correct (they are part of the same Direct3D implementation of the graphics subsystem), but if no code refers to IRenderable that interface is redundant; probably IPresentation is enough.

To interface an ILogic with an IPresentation, you have to make explicit the IPresentation state changes: there could be new methods like fallLeft(), walkLeft(),standFacingLeft(), jumpLeft(), etc. covering all things that any agent could do.
You also need control over the location of the sprite, with methods on IRepresentation or CCat to set position or speed.
Don't you have an interface for other types of agent? Are there only cats?

Share this post


Link to post
Share on other sites

This topic is 4256 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