forked from Revolutionary-Games/Thrive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a completely new GUI, and a new doc file
Important internal changes: * Most GUI callbacks are now methods of their HudSystems (cleans the code, mostly) * Saving/Loading has been disconnected from GUI for now, since we need to redesign how saving/loading works anyway. * CEGUIWindow now supports animations (which are used slightly) * A small change to microbe.lua, adding a species name. This is temporary, as the entire data-passing system needs to be changed (see Revolutionary-Games#240) See Revolutionary-Games#130
- Loading branch information
Showing
11 changed files
with
361 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#Quick Tips for Navigating the Source | ||
|
||
Most current work happens in Lua, with C++ development generally providing little more than interfaces to CEGUI, Ogre, and all the other parts of the engine. | ||
|
||
Before you begin, Google "Ogre3D", "CEGUI", "luabind", and "Entity Component System" so you know what they are. | ||
|
||
*Last Updated: Dec 27, 2014 | ||
|
||
#Lua | ||
* Lua files are loaded into the engine in the order specified in the manifests. | ||
* So, for any two files, the second one implicitly includes the first. | ||
* The main_menu, microbe_stage, and microbe_editor each have some structure in common: | ||
* The foo_hud.lua file defines the interactions with the GUI. | ||
* Each defines a FooHudSystem, simple ECS Systems that have no components (yet, anyway). | ||
* The :init method runs on program startup, and in these Systems sets up the callbacks for each button, and maybe saves a bit of extra state. | ||
* The :update method runs every turn of the game loop | ||
* See src/gui/CEGUIWindow.h for more details on the CEGUI features we currently have a Lua interface for. | ||
* Each folder also has a setup.lua file, which, naturally, does necessary setup for the game mode. They define two important things: | ||
* The necessary setup functions, that are called on startup | ||
* a small function at the end which calls Engine:createGameState, defining: | ||
* The Systems which will run in this GameState (and their order) | ||
* The setup function, which for simplicity just calls the functions defined above | ||
* The rest of the files in the subfolders contain more specific bits of functionality: | ||
* Organelles are defined in microbe_stage/, each file defining a class for a certain type of organelle, and factory functions for all the different organelles of that type. | ||
* Organelles are created by calling OrganelleFactory:makeOrganelle(data) -- the OrganelleFactory takes care of finding the right function | ||
* The code for Microbes is overall currently a bit messy, and will probably change soon. | ||
* The other files not in a subfolder define more general utility things -- hex coordinate math, lua interpretation in the in-game console, etc. Read as you need. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.