Old Style Game Framework How To..

Creating a Game with Old Style Game Framework.

This walk through create a side scroller game, where the player runs across the screen and jumps over obstacles. The walk through uses the Old Style Game Framework (1.0.2), Game Doc (1.2.3) and Game Designer (1.2.2).

Updated versions: Old Style Framework (1.1), Game Doc (1.3) and Game Designer (1.3)

Initial Setup

  1. We are going to start with graphics and sound. Load up the Game Designer.
    1. For quickness, I'm using the images and sounds from Andrew Davison's book "Killer Game Programming. Chapter 12" at http://fivedots.coe.psu.ac.th/~ad/jg/ and Ernest Pazera's book "Isometric Game Programming with DirectX 7.0." I have modified these images to improve the resolution, adjust the size, and to change the style.. Contains:
      • RunnerLeft.png (6 cells)
      • RunnerRight.png (6 cells)
      • StandLeft.png (1 cell)
      • StandRight.png (1 cell)
      • jumpLeft.png (1 cell)
      • jumpRight.png (1 cell)
      • explosion.png (5 cells)
      • Fireball.png (4 cells)
      • sqTiles.png (5 cells)
      • GameOver.png
      • houses.png
      • Jojo.png
      • mountains.png
      • trees.png
      • treesBack.png
      • HUNTER.TTF (font)
    2. I've made a few sounds, using the free program BFXR sound effects.
      • Steps.wav (0.5 seconds), this is for the character's walking sound. We want it shorter then the total animation length so it will repeat correctly.
      • Jump.wav (0.25 seconds), this is for the character's jumping sound. each cell is 62 pixels high and 50 wide.
      • Explosion.wav (0.35 seconds), this is for when the fire ball hits.
      • Fire.wave (0.99 seconds), this is the fire ball sound as it flies through the air.
    3. These resources can be download in here.
  2. When you load up Game Designer for the first time, it will create "GameDesign.properties" locally. It stores application preferences. (There is no need to edit this). It also creates a "projects" directory for projects. As the name implies this is where your design projects will be saved..
    1. There is also a "lib" directory (part of the download), which contains the "GameDoc.jar" and the "OldStyleGame.jar" files used, and additional resources needed to run the program.
    2. You can upgrade the GameDoc.jar and OldStyleGame.jar to new versions by simple copying the new file into these directories. (Before the jar file names are the same when you save it)
  3. In Game Designer, select File -> New Game Design
    1. This will pop up a save window. When you first start, you will be under the "projects" directory. (You want to save future designs in this "project" folder.
      When the click save, the program will generate an image folder and audio folder, and two files: a gdx file which is used by the Game Design program and an XML file, which is used by the Game Doc library, and your game.
    2. Once back to the main tab, type in a name for your design: "Side Scroller" and a brief description. You can see the file location displayed as well.
    3. The Version drop down defaults to 1.
    4. The pretty print out put will save the xml file in a user friendly format. (Elements are indented for readability, otherwise the data is stored on a single line.)
    5. The digital signature is not implemented at this time.
  4. Additional setup: To make things easier, we are going to setup a few options.
    1. In the Options menu, select "Display Offset Grid". This will set the edge of the images inward from the top and left edges.
    2. In the Options menu, select "Render Offsets". Set the both to 20. A dashed line will display showing the new off set the images grid on the Animation screen so we can see how the image will appear to a location.
  5. In Version 1.3, You now have the ability to set Class Mappings in the Design XML, not just in the code. On the Main tab, you click "Add Mapping". In the new row select the type of Element you are mapping to, such as a Sprite, Animation or GameMap. Then enter the ID of the Element, which would be the same as the ID you entered in on the other screen. Last you enter in the full class path that you are overriding to. This class will need to extend the class of the Element you select. For example: The AdventureMap extends the GameMap.

Next -> Sound