Chapter One – Creating the base game
In Solution Explorer of your new solution and project, right click and add a folder called « Classes ».
The folder “Classes” will hold all script to your UDK game. The compiler will ignore scripts outside this folder. Now check the content of your folder, it should now reflect this in windows explorer :
Creating Script Files
Return to Visual Studio and right click on “Classes” folder. Add->New Item then enter “IsometricGameInfo”
The GameInfo class
What is the GameInfo class for your game ?
First take a look at <UDKPath>\Development\Src\Engine\Classes\GameInfo.uc and read the comment at the top of the file. Reading a parents classes information is a necessary step to understand what you are doing and extending from the engine. So in broader terms, it indicates that it defines the game being played, like a sort of blueprint description. It specifies the game rules. For an example implementation of this class, see <UDKPath>\Development\Src\UTGame\Classes\UTGame.uc. Do not be daunted by the sizes of classes in the default game shipped with UDK. Try to check only what you need and at some point you will feel pretty at ease browsing a 1000 line file. Keep in mind everything has a purpose and doing back and forth between files is a necessary evil in programming. As such CTRL+SHIFT+F (Find in files in visual studio) will be your friend. When you search for a meaning of a function or where a function is declared, select the word and launch a find in files and you should get all references inside the search pane.
Creating our game
As you can see our class we created earlier extends from Object. This is not good, but know that all class created will extend Object by default. You will replace “Object” by “GameInfo”.
- Build->Build Solution.
- Hit the play button (F5 or F7 depending on the configuration of your Visual Studio).
If you missed the map download in the set up get it here : IsometricTest.udk
Do not forget to stop visual studio debugging, as it launches an external EXE its not aware when it closes.