Project Setup
- Create a library project called Checkers
- Set the output path to \Built Worlds\Demo Worlds\Checkers\
- Add a file called Checkers.v3d to the project and set it to copy to the output folder in the solution so that it can be shown in the world launcher. Note: v3d file name should match the name of the folder it is in
- Add references to Visual3D.Engine, Visual3D.Framework, Visual3D.ReferenceApplication and Microsoft.Xna.Framework
- Set the name for your project in
and nodes - Set the paths to your content in the
section, duplicate them in - Create the world class and inherit it from Visual3D.Scenes.WorldApplication
- Specify the fully qualified world application class name in
(e.g. Checkers.App) - Create the Main Menu scene class and inherit it from Visual3D.Scene
- Specify the fully qualified class name in
and in section - Init and register the controls in App.OnInitialized method. Be sure to call base.OnInitalized()
Main Menu
- Add class MainMenu, inherit it from Visual3D.UI.Form
- Register MainMenu in App.OnInitialized using GuiSheets.RegisterGuiTypes
- Add menu creation code (see Tech Demos example)
- Create CheckersMainMenu class and add form code (see Tech Demos example)
- Register the scene in App.OnInitalized using this.Scenes.Add method
- As we dont have anything in background for the main menu, create CheckersMainMenuRegion and inherit it from RootSceneNode
- Specify the region in CheckersMainMenu using SetSceneSegment method
Main Gameplay Scene
- Add class GameplayScene that inherits from Visual3D.Scene. Register the scene in App.OnInitalized
- Add class GameplaySceneRegion that inherits from Visual3D.SceneObjects.RootSceneNode
- Perform other steps as you did for the Main Menu.
Now you can move on.
