Jump to content
  • Advertisement
Sign in to follow this  
fantasy_world

how to design classes ?

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

Hi, I have read some directX tutorials. I want to create a simple library which supports a simple framework for working with DX. I don't know steps I have to do to design classes. So anyone tell me which steps you have done to design classes for a library. (should I write down any ideas in my head... then what's next ?... a diagram...?) SO what do a game programmer have to do when designing a game engine... thanks [smile] (sorry for my bad english)

Share this post


Link to post
Share on other sites
Advertisement
i think practise is the best teacher in learning how to design code. theres no better way to learn then by trying yourself, and failing horribly [smile]. why do you want to write a library, anyway?

Share this post


Link to post
Share on other sites
I want to create a library because I want to practice.
I know I have to practice but I also need some guides. It's not easy to practice if I don't know what I have to do.

Any tools required ?

Any suggestion ?
thanks [smile]

Share this post


Link to post
Share on other sites
theres really no clear formula. since you want a simple wrapper, consider what you'd like to wrap (that was catchy). for instance, you'd probably want a window class that creates a window and initializes whatever dx stuff you want. mostly, just whip up what you'd like in your head, and just go at it. you will redo it multiple times, so don't worry about being perfect. just get it to work.
as for tutorials, the chris hargrove tutorials are both game related and wrap win32 and dx. they are worth scanning for ideas.
good luck.

Share this post


Link to post
Share on other sites
Here is my idea

- cApplication: this class will control the program flow by calling virtual functions of cObject (an abstract class).
In this class there is a stack manager that store the classes (like cGraphics, cInput, ... these classes are derived from cObject class).

- ....

So should I use STL and if so, where can I find a good STL tutorial ?

thanks [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by fantasy_world
Here is my idea

- cApplication: this class will control the program flow by calling virtual functions of cObject (an abstract class).
In this class there is a stack manager that store the classes (like cGraphics, cInput, ... these classes are derived from cObject class).

- ....

So should I use STL and if so, where can I find a good STL tutorial ?

thanks [smile]

About the stl of course you should use it. here is one tutorial linky
and here is the docs click

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!