Clean Game Library

About...    
News...    
Download...    
Games...    
Quick tutorial...    
Frequently Asked Questions...    
Support...    
                                 
SourceForge.net Logo    

                

   Getting started...
This quick tutorial will help you to install the package and get started with games programming in Clean. The best way to learn is by doing it, so just follow the steps! You might want to print this page before you start.

System requirements
You will need a (fast) PC with:

  • Windows 95 or higher
  • About 50 Mb harddisk space

Installation
To install the complete package:

  • Download the complete package from the download page and install everything as described.
  • After the installation, you should be able to start the following programs: Clean IDE (Start, Programs, Clean, Clean IDE) and Tile Studio (Start, Programs, Tile Studio, Tile Studio).

Compiling the example games
Before starting to make your own game, try to load and compile one of the example games Charlie the Duck:

  • Start Clean IDE ()
  • Now, from the menu bar, choose File | Open... and type: C:\Clean or whereever you installed Clean. Then: ObjectIO\Game Examples\Charlie and load Charlie.prj. This is a project file which contains all information needed to compile the game.
  • Now, press Ctrl-R (Run). This will compile everything and start the game. During the game you can move Charlie around with the arrow keys and press Space to jump, Esc to quit.

Editing graphics and levels
Leave the Clean IDE open and start Tile Studio. Choose File | Open and select Charlie.tsp. This file contains all the graphics and levels for Charlie the Duck. Tile Studio can generate Clean source code which is imported into the game.

You can either edit separate bitmaps ("tiles") or level maps. Press Ctrl-Tab to switch modes. See the Tile Studio Tutorial for help.

If you installed Clean in a different directory than C:\Clean, you will have to change the output directory in Tile Studio (Code | Select Output Directory) to the new location of Charlie.prj.

Now make some changes in the graphics or levels and select Code | Generate Code (F10). Then switch back to the Clean IDE (Alt-Tab) and press Ctrl-R again to recompile and run the game with the changes you made.

Experiment...
The best thing to do next, is experiment a little with the example games. Make small changes to the code, then run the game and see what happens! For example, try to make an object move twice as fast, try to swap the levels, try to put Charlie's background in front of the foreground, try to make frogs fly...

Take a look at the examples in Tile Studio, and note how the names of maps and tile sets can be used in a Clean program.

Also, study the file StdGameDef.dcl, which is listed in the project window. This file contains the complete definition of any game.

If you are not familiar to the Clean IDE, you may experience problems with the editor. The shortcut keys for menus don't work normally at the moment. To press Alt-F (File), first press the Alt key and then the F.

Bounce example
Here is a simple example of a ball bouncing through a level filled with blocks. It shows how to easily import a level from Tile Studio with only very little Clean code.


Clean Game Library About News Download Games Tutorial FAQ Support
Maintained by Mike Wiering, last update: March 25, 2006