First Step Pascal

This tutorial guides you through the process of really getting started with the SwinGame SDK. In this tutorial you will learn to open a window, draw images, draw sprites and move, play sounds, and have some interactivity within your game. At the end of the tutorial you should be much more comfortable using the SwinGame SDK and ready to start working on your own game.

OK so at this stage you have:
 * Gone through Getting Started
 * Chosen Pascal as your programming language
 * Downloaded the Pascal SDK
 * Gone through the instuctions for Windows, Mac or Linux.

Now it is time for your first program in Swingame: "Hello World".

Hello World
Follow these steps to get a "Hello World" program working with SwinGame.
 * 1) Extract the files you get from the SDK into a folder of your choosing, e.g. "c:\temp\HelloWorld" on Windows
 * 2) Open a console window (run cmd on Windows) and move into the folder above, e.g. "cd c:\temp\HelloWorld"
 * 3) You can compile the game using winbuild.cmd HelloWorld.exe on Windows or ./build.sh HelloWorld on Mac or Linux.
 * 4) Open the "GameLogic" file. You should be presented with the following code:

The purpose of this code is to create a starting point for your project. You can run this program by executing the application from the bin directory of your project. Navigate there with your file explorer and double click the application to execute it. Alternatively you can run it from the command line. After you have had a look close the window.

You can basically read what it is doing

See if you can find the parts of the code that are doing the following things:
 * Loading all the resources you need for the game
 * Opening up a blank screen 640 pixels wide (x axis) by 480 tall (y axis). You should change this to 800, 600 for this project - see picture below
 * Starting a Loop, inside which it does the following:
 * Clearing the window
 * Drawing 3 filled rectangles, setting their sizes and different colours width height and position
 * Putting the game's "Frame rate" up on the screen in the top right hand corner
 * Writing the words "Hello World" 3 times in different colours below the rectangles
 * Writing the words "Hello World" once at the top in large letters
 * Telling the loop to stop when someone closes the window



Now you do this...
To help your understanding of what is going on in this code do the following:
 * Change it to an 800 by 600 window
 * Change the big "Hello World" to your name
 * Move the Red Rectangle so it is in the bottom right hand corner
 * Make the Red Rectangle twice as big

And that is it! You have completed your "Hello World" next we look at adding an image.