Here s the procedure you must follow to make a new program in Jamagic :
Load the Jamagic software.
Click the Jamagic icon that should have come up on your screen after you finished loading. If there is no icon, you might find Jamagic under Programs in your Start menu. After you click this icon using either of these methods , some nice spinning graphics come up, after which you will get a screen like the one shown in Figure 3.1.
Figure 3.1: Initial Jamagic screen.
Click File in the upper-left corner, then select New, and then Project. You should now have an image like the one in Figure 3.2.
Figure 3.2: Jamagic project screen.
In the Project Name field, change the name from Project to Project1. (It doesn t matter if you use capitals or not: PROJECT1 is the same as Project1. In computer-speak, this means that Jamagic is not case-sensitive. ) Please note that you could use just about any name that you want here instead of Project1, but for now, let s stick with this to keep things easier.
Leave all the other fields on the New Project form as-is for now. For future reference, however, you should know what these other fields are for:
The Directory field lets you search your computer and choose where your project will be stored.
The Project Type drop-down list lets you select what type of application your game will be. One of the selections is a stand-alone application, which means that you ll be able to distribute your game even to users who do not have Jamagic on their computers. (This capability will not be enabled in the limited version that comes with the book ”you must purchase Jamagic from www.clickteam.com if you wish to distribute stand-alone games .)
In the Platform drop-down list, you can specify which platform you want your game to work on, which at this time is limited to Windows 32 bit (Win32). This means that it will run on Windows 95 and greater (not Windows 3.1, which is too bad if you are in the stone age of computer use).
In the Project Template field, you can choose a template to follow. It is best to leave this as Default, which is the most general template or setup for the programs that you will use.
Now click OK at the bottom of the New Project form. A message will pop up and inform you that the directory you have chosen does not exist and it will offer you the option of creating it. Select Yes. Here you are simply telling the computer to go ahead and start making Project1 and you are asking it to store this project in the directory that you have requested . You will now see the screen shown in Figure 3.3. There are lots of mysterious looking things on this screen, but you ll soon be familiar with most of them.
Figure 3.3: Jamagic project screen.
Double-click the Sources folder. Then click the Source subfolder, which should have popped up underneath. Source is short for source code , which is computer lingo for your program lines.
Click the empty screen that appears. You will see a flashing cursor in the upper-left corner. You are now ready to type in your source code (that is, write your program).
To get started, let s do something really easy, but important ”let s add some comment lines. As you will find out the more time you spend programming, it s a very good idea to put lots of comments in your code. When you come across these comments a long time after you write the code, they will help you figure out what you were doing so that you won t have to start all over.
To add the comments, type in the following code:
//Project1 by your name here // This is my first project. // We will begin very simply, and then add more and more.
You can jump to the next line by hitting Enter, but you must remember to put in the slashes ( // ) at the beginning of each line. These slashes tell Jamagic that a comment is coming. In fact, you may have noticed that what you were writing was in red until you put in the second slash. This red font means that Jamagic has not yet made any sense out of what you are writing. By the time you put in the second slash, Jamagic knows that a comment is coming, so it changes what you are typing to green to indicate that it is all OK.
You can write anything you want after these slashes. They are for your benefit ”the computer does nothing with comments in the sense that they do not affect what your program does. We will use them a lot!
Now let s save what we have. To do so, just click File and then Exit. The computer will ask you if you want to save your project. Answer Yes. You will now find that you have exited Jamagic and your usual screen should be visible. Your project, named Project1, has been saved in the C:\Program Files\Jamagic\Projects directory, as was indicated by the default setting in the New Project form.