-
Notifications
You must be signed in to change notification settings - Fork 2
Lesson 03
We learned the basics of how to render meshes and how to move them around. Now is the time to take a step back to get an idea what we want the result to be and how to get there. Since in this tutorial the outcome is more or less given, this becomes an rethorical question, but still I want you to understand why we do things a certain way.
If you haven't done it yet, run and play a bit with the last lesson, so you know what we are shooting for. It isn't a Tripel-A game yet, but that is your job, we (FUSEE) provide the engine and show you how to work with it.
Enought rambling, we need a structure how to build our game. Like any other software, we want to work with all the good stuff C# offers.
- A class "GameWorld", so we have a place where we can put all our stuff, keeping the Main.cs file clean.
- A class "GameEntity", having functionality like: knowing its own position, rotation and scaling, as well as being able to render itself. No more feeding RC by hand.
- A "Target" and a "Player" class, both derived from "GameEntity". Implementing special functionality like the follow camera for the player or the switching of shaders for the targets.
- A "GUI" class, handeling all the GUI related output.
- A "Shader" class, as storage for our custom shaders.
As we move on the focus will get much sharper, but just for a taste you should look at this lessons project, which is an UML diagram of the final thing.
[> Lesson 04 - Structure: GameEntity](Lesson 04)