From 8b9989c0742bfe8f8732380aacb873a0a7af5c45 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Thu, 2 May 2013 04:12:26 -0700 Subject: [PATCH] Created Scene System (markdown) --- Scene-System.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Scene-System.md diff --git a/Scene-System.md b/Scene-System.md new file mode 100644 index 0000000..a27877c --- /dev/null +++ b/Scene-System.md @@ -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). +... \ No newline at end of file