Created Scene System (markdown)
+15
@@ -0,0 +1,15 @@
|
|||||||
|
The scene system is the backbone of the game client, utilizing the [strategy pattern](http://en.wikipedia.org/wiki/Strategy_pattern) to control various different logical scenarios found throughout the game (the main menu, the game world, combat scenarios, etc). It consists of the following files:
|
||||||
|
|
||||||
|
* scene_list.hpp
|
||||||
|
* base_scene.hpp
|
||||||
|
* base_scene.cpp
|
||||||
|
* scene_manager.hpp
|
||||||
|
* scene_manager.cpp
|
||||||
|
* main.cpp
|
||||||
|
|
||||||
|
## Breakdown
|
||||||
|
|
||||||
|
main.cpp simply creates an instance of SceneManager, calls it's Init(), Loop() and Quit() functions in order, and handles any fatal exceptions thrown from the rest of the program.
|
||||||
|
scene_list.hpp holds an enum class of macros, one for each scene in the game. All scenes in the game should include this file in the .cpp.
|
||||||
|
base_scene.hpp and base_scene.cpp hold the interface of the strategy pattern i.e. all scenes in the game MUST inherit from the BaseScene class. This class handles the game's screen (which is a static member) and the player's input (via SDL).
|
||||||
|
...
|
||||||
Reference in New Issue
Block a user