#ifdef tb_generate_documentation #error This file should not be included in any project. It is for generating TurtleBrains documentation using Doxygen. //-------------------------------------------------------------------------------------------------------------------// /// /// @page pageGameDevelopment Developing Games /// More info can be found about this on the following pages: /// - @subpage pageOverviewScreenResolution /// - @subpage pageGameMainLoop /// - @subpage pageGameSceneManagement /// - @subpage pageGameOverview /// - @subpage pageGameEggDropTutorial /// - \subpage pageOverviewSpriteSheets /// - \subpage pageOverviewEntityCollision /// /// Overview like information can be found on these pages: /// - @subpage pageOverviewAudioSystem /// - @subpage pageOverviewEntityManagement /// //-------------------------------------------------------------------------------------------------------------------// /// /// @page pageGameOverview HowTo: Start a Game Project /// @brief Provides a high level look at creating a Two-Dimensional Game using %TurtleBrains. /// /// @details Starting your first game with TurtleBrains /// -# Derive a custom class for a scene from TurtleBrains::Game::GameScene /// -# Create an instance of the TurtleBrains::Game::GameApplication /// -# Call RunGame(gameScene) and watch the magic unfold /// /// @section sectionBasicGameStep1 Create your game scene /// The most involved step will be creating the gameplay scene, a class derived from TurtleBrains::Game::GameScene that /// manages the objects and logic for the game. /// /// my_game_scene.h /// @snippet tb_basic_game_example.cpp exampleBasicGameSceneHeader /// my_game_scene.cpp /// @snippet tb_basic_game_example.cpp exampleBasicGameSceneSource /// /// That will create an extremely basic scene presenting a black screen, pretty boring. From here you can load assets /// for the scene in OnOpen(), which is invoked just before the scene will be made active and visible. Also add any /// graphics and entities, bringing the scene to life. /// /// @section sectionBasicGameStep2 Start and run the game. /// With MyGameScene prepared, even as a mundane black screen, the game can get started. It is a simple process of /// creating an instance of GameApplication and invoking RunGame with the yet to be interesting MyGameScene. /// /// main.cpp /// @snippet tb_basic_game_example.cpp exampleBasicGameMainSource /// /// That was short and simple, and results a blank, black screen. What fun that is! /// /// @section sectionBasicGameStep3 Bring life into the game. /// Now we can add awesome things to the game. [documentation still in progress, need to write a full sample project] /// //-------------------------------------------------------------------------------------------------------------------// /// /// @page pageGameMainLoop Game Loop /// @details The game loop is split into three primary functions; Simulate, Update and Render that keep the game moving /// along and displaying new frames. /// /// - Simulate can be called 0 to N times per frame and will be called at a fixed time interval. Generally this is where /// game logic should be placed so that the game is deterministic. By default this fixed time interval is called at /// 100hz although can be modified with TurtleBrains::Game::GameTimer::SetMillisecondsPerStep(). /// \n\n /// - Update will be called once per frame, every frame, and is supplied with the deltaTime. deltaTime is the amount of /// time that passed since the previous call, although clamped to a maximum of 1/30 if the previous frame took longer. /// Update is generally where input should be checked since input is polled once a frame and Simulate could skip /// a key press or release. /// \n\n /// - Render is also called exactly once per frame, after both Simulate and Update calls so that the new frame can be /// displayed. /// //-------------------------------------------------------------------------------------------------------------------// /// /// @page pageGameSceneManagement Game Scene Management /// @details Admittedly the scene management is fairly basic, supplying no transitioning between scenes or other /// glamorous features*. But you can create multiple scenes derived from TurtleBrains::Game::GameScene and change /// between them using TurtleBrains::Game::GameScene::ChangeToScene(). /// /// Although there is no transition help, a GameScene has powerful management of @ref TurtleBrains::Graphics::Graphic "Graphic" /// and @ref TurtleBrains::Game::Entity "Entity" objects. Each scene is an @ref TurtleBrains::Game::EntityManager "EntityManager" /// that will automatically perform Simulate, Update and Render on all entities. /// /// Like the GameScene each Entity also contains the functionality of a GraphicList, meaning multiple Graphic objects /// can be added to and managed by the single entity object. /// /// When adding an Entity or Graphic to be contained by a GraphicList or EntityManager it is critically important /// to understand the difference in how the object gets added. When adding by pointer, the container will take full /// control and will even call delete on that object. Useful when adding elements that can be forgotten about. When /// adding a by reference, the container will not delete the object, but it is extremely important to keep the /// object in scope until it is removed from the container. /// /// The @ref TurtleBrains::Game::Entity "Entity" also contains a stack based state/behavior "machine". This allows /// multiple behaviors to be pushed onto the entity that pop off or change depending on the needs at that moment. /// /// *at current time, though transitions would be nice to support in future releases. /// //-------------------------------------------------------------------------------------------------------------------// #endif /* tb_generate_documentation */