c++ - Bridge simulation game -
i doing c++ project in university , create primitive bridge simulation game. there a grid of dots can connect create construction of bridge , object move on bridge. @ same time calculating how object interacts construction, whether bridge breaks or not. first bigger programming project. don't know start. advise me how should design this, classes, methods should there be? first objective create uml class diagram.
the thought create primitive version of game pontifex.
i think can straight model physical world in reality. example, create 3 classes project.
physicalobject class
this class physical object in real world.
suggested methods:
collide(physicalobject&,physicalobject&) //handle collision draw() //display object using grid on screen deform() //a virtual function
bridge class
this class derived physicalobject.
suggested methods:
construct() //for user design , edit bridge deform() //handle how bridge collapses
car class
this class derived physicalobject.
suggested methods:
move(double,double,double) //move in 3d space deform() //handle how auto deforms , breaks
at each time step, programme check if collision occurs , updates positions , shapes of objects. finally, programme renders visual effects.
c++ design
No comments:
Post a Comment