Chapter One – Creating the base game

December 18th, 2009 Leave a comment Go to comments

In Solution Explorer of your new solution and project, right click and add a folder called « Classes ».

You should end up with something like this

You should end up with something like this

 

 

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 :

 

 

Folder_content

Creating Script Files

Return to Visual Studio and right click on “Classes” folder. Add->New Item then enter “IsometricGameInfo”

 

 

New_UnrealScript_GameInfo

The GameInfo class

Game_info_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).

You should now be in third person and look at this magnificent test map I created for you. Exit the game by closing the Log window by doing an ALT-TAB to get to it.

You should now be in third person and look at this magnificent test map I created for you. Exit the game by closing the Log window by doing an ALT-TAB to get to it.

 

 

If you missed the map download in the set up get it here : IsometricTest.udk

 

 

The log window is your best friend. If you want to trace into your code and know what or where, you will use the Log function. More on that will be explained in the creation of the player controller.

The log window is your best friend. If you want to trace into your code and know what or where, you will use the Log function. More on that will be explained in the creation of the player controller.

 

Do not forget to stop visual studio debugging, as it launches an external EXE its not aware when it closes.

 

 

 

Chapter One – Creating the Player Controller

 

 

 

Update me when site is updated
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • PDF
  • Twitter
  1. January 25th, 2010 at 18:58 | #1

    You could also create a project for everyone of the Unreal Engine System (Core, Engine, etc) so that you can go to class definitions by just right clicking the class, for example GameInfo, and then selecting “Go to declaration”. That makes thing way better.

  2. Hotdot
    January 26th, 2010 at 23:17 | #2

    in the last page (chapter 0 configuring nfringe – http://x9productions.com/blog/?page_id=373 ) I added information on doing that :)

  3. Valkry
    February 5th, 2010 at 09:42 | #3

    Si comme moi, vous venez d’installer l’UDK et Visual Studio pour vous jeter avidemment sur ce tuto si bien foutu.
    Et si malgré tout vos effort vous n’arrivez pas à avoir une fenêtre de log qui s’affiche à l’exécution.. pensez à lancer l’udk au moins une fois!

    If you can’t see the log window while testing this tutorial, think of launching at least one time the UDK after installing it.

  4. Rosicky
    June 6th, 2010 at 11:15 | #4

    Im getting the following using the May Beta:

    Warning: Warning, Failed to load ‘Class MyIsometricGame.IsometricGameInfo’ Failed to find object ‘Class MyIsometricGame.IsometricGameInfo’
    Warning: Warning, Failed to find object ‘Class MyIsometricGame.IsometricGameInfo’
    Warning: Warning, Failed to load ‘Class MyIsometricGame.IsometricGameInfo’ Failed to find object ‘Class MyIsometricGame.IsometricGameInfo’
    Warning: Warning, Failed to find object ‘Class MyIsometricGame.IsometricGameInfo’

    I’ve tried with fresh installs and redoing the tutorials but it always has this warning. Does anyone have any ideas?

  5. June 23rd, 2010 at 16:54 | #5

    Hi, You’ve got some good tutorials here, I’ve used them to gain a bit more familiarity. Just wanted to mention, as someone who was still learning when the last version update (may2010) went down, Most tutz (including this one) are a lil more difficult to wrap our head around since some of the paths and class structure has mildly changed. For example, no more UTGAME(the folder) and most everything moving more towards UDKGAME/UDKBASE, I see in UTGAME.UC its now extended from UDKGame, dunno if it was that way before… anyhow I digress… I basically wanted to ask if you would consider updating these as I for 1 would find it helpful and most others probably would too. I just wanna stress I know theres totally nothing wrong with your stuff, the new version just made it a little bit more confusing to get through your excellent tutorial on these very important concepts. Additional I guess Im secretly hoping to enjoy the benefits if you did update it a bit by using it to assist my own transition into this new version structure (lol i was still learning the old one)

  6. Krol
    September 11th, 2010 at 13:47 | #6

    Using UDK August 2010, VS 2008

    The build never finished for me, and I get a warning that says…

    Warning 2 The script file ‘Classes\IsometricGameInfo.uc’ is not located in a folder recognized by the script compiler. C:\Program Files (x86)\MSBuild\PixelMine\UnrealScript.targets 0 1 MyIsometricGame

    What does this mean?

    Also, I never get the window that displays the map, so I’m thinking this may be why.

  7. FuzzeWuzze
    September 11th, 2010 at 17:19 | #7

    @Krol
    I just followed it with the August SDK and it seems to work. I get the same warning but when i hit play it runs properly.

    One key is in your project settings make sure you point to the UDK.exe in binaries/Win32(or Win64) not the one in the base folder.

    When i rebuilt i got that error, but the build completed and then pressing play(debug) it opened up the UDK window and did its thing and started. Although it opened fine…

  8. FuzzeWuzze
    September 11th, 2010 at 17:34 | #8

    @FuzzeWuzze

    Oops i forgot to add, when you are creating your project make sure you delect “Create in a project folder” or whatever that option is. Otherwise VS makes a MyIsometricGame/MyIsometricGame/Classes folder scructure, which is not where it will expect the .uc files. If you remove that option it will just be MyIsometricGame/Classes and it will work. You will still get the warning, but UDK.exe will find the IsometricGameInfo.uc file properly, otherwise you will get yellow warnings in the UDK window when its loading.

  1. September 11th, 2011 at 20:32 | #1
You must be logged in to post a comment.