Thursday 5 April 2012

Prerequisites / New Project

I am writing this as if teaching someone with basic programming knowledge, who wishes to learn AGK.  It should also be useful to someone using AGK who wishes to improve their skills or learn new techniques.

Though not intended to teach the basics of programming, it's not beyond the realm of possibility to learn programming from it.

It can be followed by anyone without participation but to get the most out of it they should ideally have a copy of AGK and work along.

A free trial version is available from  http://www.appgamekit.com/free-trial.php and will allow the projects to be compiled and run on a PC.

More than anything, this is a an exercise in demonstrating programming techniques and to show how a program develops and changes over time.

AGK should be installed as per the instructions provided with the product and a new project started.

The directory structure I use, has all AGK development work stored in the folder P:\AGK, this in turn contains a folder called projects, which is where the project folders reside.

The full path to my projects folder is therefore P:\AGK\Projects.

Step 1 - Start a new project and select the AGK Portrait project Template.
Step 2 - Enter a Project title and choose the Folder to create project in.
After your first project is created, the location will assume the same project folder for each new project.

AGK will automatically generate Project filename and Resulting filename from the Project title and Folder to create project in that you provided.

The initial Display for the project will show the project tree.
At the top is the workspace, which I have renamed here to to Tutorial Projects as that is what this is.  You can have a number of different workspaces to allow projects of a similar type to be kept together.

Below the workspace is the name of the project, Build-It and below that a folder for Sources which contains the two standard files created for each project main.agc and setup.agc.

In the main window, under a tab labelled main.agc is the initial code which is created for all projects.

On disk, the layout is similar.
A folder is created for the new project and three files are created, main.agc and setup.agc as shown above, plus a third one, in this case Built-It.cbp, which is the project itself.

If this is the first project after a new installation, it's a good idea to compile the project (Using the Yellow Cog on the toolbar) and run it (using the green triangle) to make sure the installation is ok.
When the project is compiled for the first time, a new folder is created within the project folder called media and a new file called Build-It.exe.
The media folder contains all the files which go into the final release.  The Build-It.exe is a windows player program which will load and run the compiled version of the program Build-It.byc stored in the media folder.
To play the project on another windows computer both Build-It.exe and the media folder are needed.

Compiling a project also saves any changes to the project files, but you may want to save the workspace at this point by selecting Save Workspace as... from the File Menu.

No comments:

Post a Comment