Jump to content
  • Advertisement
Sign in to follow this  
Shadowed

My design and my problem

This topic is 4478 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!