Getting Started With Lazarus
Getting Started With Lazarus
Getting Started With Lazarus
Cliff Baeseman
Shane Miller
Michael A. Hess
All three had attempted to get involved with the Megido project which dissolved. In
frustration they started the Lazarus project. It has had a steady growth of supporters and
developers during the following years. The founders are not involved with the project any
more.
The next oldest member of the team is Marc Weustink. He got involved with the project in
Aug. 1999. Following him is Mattias Gaertner who got involved in Sept. 2000. Both of them
have been the major contributors to the core of what makes Lazarus tick. More about the
history in the Wiki
Yeah, but what about the GUI? What widget set are you
using?
That is the neat part. You decide. Lazarus is being developed to be totally and completely API
independent. Once you write your code you just link it against the API widget set of your
choice. If you want to use GTK+, great! If you want it to be Gnome compliant, great! As long
as the interface code for the widget set you want to use is available you can link to it. If it
isn't available, well you can write it.
For example. Let's say you are creating a product on Windows using the standard Windows
widgets. Now you want to create a Linux version. First you decide what widget set you want
to use. Let's assume you want to use gtk+. So you copy the code over to your Linux
development machine, compile, and link against the gtk+ interface unit. That's it. You've now
just created a Linux version of the Windows product without any additional coding.
At this point in the development we are using Win32, gtk2+, Carbon and QT as our API
widget set. Bindings for custom drawn components are in the works and other widget sets
are planned, too.
Pascal and Lazarus then the answer would be yes. This hasn't been added to the LCL yet but
it should be possible in the future.
Introduction
The following topics will help you to download and install Lazarus, and then use it to write a
simple "Hello World" program. You are also given advice about how to experiment to find
out more about Pascal and Lazarus.
You will type your programs into the Lazarus editor or copy them from the Programs or
Tutorials sections of the site. At a single click of a button, Lazarus will run the program in its
editor. It will translate the programs into machine code instructions that are executed by the
computer. Lazarus will provide information about any errors in the program if it is unable to
translate it. We hope you will agree that Lazarus is a great example of free software.
Click on the first topic title below, to continue:
1. Downloading Lazarus
How to download Lazarus from the web onto your PC
2. Writing your First Pascal Program using Lazarus
How to write your first Pascal program using Lazarus
3. Experimenting with Lazarus
Suggested experiments to learn more about Pascal and Lazarus.
4. Copying a Pascal Program into Lazarus
How copy a Pascal program (e.g. from this site) into Lazarus
Downloading Lazarus
Before doing this exercise you must
check the requirements (Windows 32-bits, memory, operating system, disk storage);
obtain permission from the PC owner;
consider whether to take a backup of all important material on the PC.
After Lazarus has started, you will see the following menu bar:
4. Click on Program in the list of options, as shown above, and then click on the OK
button. If you are using a very recent version of Lazarus you should click on Simple
Program instead and you will not see the unnecessary code before begin (making
Step 16 redundant).
You may see the following Project changed dialogue:
5. If do see the above Project changed dialogue, just click on the No button.
(It was a brand new project and so nothing valuable will be lost).
If you do not see the above dialogue you do not need to do anything in this step.
You should now be able to see a new project in the Source Editor
6. Save the file in a suitable folder as 'HelloWorld' by selecting menu item Project > Save
Project As...
The name on the first line of the program should change to HelloWorld.
7. Click to the right of 'begin' to place the cursor (a vertical bar) after 'begin'.
8. Press the Return key once (to go onto a new empty line), and carefully type
"writeln('Hello World!');"
9. Press the Return key again, and carefully type "readln;"
The program should now look like this:
10. Carefully check that every character is correct. Especially check that the single quotes
and the semi-colons are there.
11. The time has come to compile and run the program! Press the green triangle
the top left of the Lazarus menu bar, OR press the F9 key.
near
In case you were wondering, the file will be saved automatically, so you do not need
to save it first.
After a small delay, you should see a mainly black window appear:
12. If it did not work, you will need to check again for errors, and correct them before
clicking on the run icon again.
a. Carefully check that every character is correct.
b. Especially check that the single quotes and the semicolons are there.
13. If it did work, there are a few things for you to notice:
The green start icon has now changed to grey
, indicating that the program is still
running, and that consequently the icon is inactive.
There is a blinking white cursor (a horizontal bar) on the black window, indicating
that the program is awaiting input (due to the readln; statement).
14. Press the Return key again, to make the program terminate.
The Execution stopped dialogue appears:
If you want to, you can quit from Lazarus by selecting menu item File > Quit
Alternatively, you can move on to the next topic in this guide.
Installing Lazarus
Before doing this exercise you must have downloaded Lazarus onto your PC. How to do this
is described in the previous topic.
Make sure that you have permission to install the software on the PC.
If you are not an experienced PC user, it would be a good idea to obtain the help of someone
who is experienced at installing software.
The following steps describe how to install Lazarus to your PC.
1. Log onto your PC. You may need to use an admin account in order to install software.
2. Start Windows Explorer and navigate to the folder to which you downloaded the
Lazarus zip file.
Typically, you may have downloaded it to the My Documents/Downloads folder.
The setup file may appear as follows:
near the top left of the Lazarus menu bar, OR press the F9 key
After a small delay, you should see a mainly black window appear and at the top, it
should say...
6. Take a look at the Run icon, and you will see that it is no longer green:
The triangle is now grey
7. Press the little red square
running.
This is very useful if a program gets stuck in a loop for some unknown reason.
The familiar Execution stopped dialogue appears. Press the OK button to continue.
8. There are several ways to stop a running program:
o
o
o
o
Click the green triangle to run the program again and experiment with the various
ways of stopping the program.
9. The purpose of the readln; line at the end of the program is to prevent the black
window from disappearing as soon as the rest of the program has finished. Try
commenting out the readln; statement by typing // at the start of the line, so the line
becomes //readln;. Then click on the green Run icon.
Anything on a line after // is treated as a comment to help programmers and is not
converted to machine code.
The black window will disappear before you can see what has been output to it.
10. In the editor, remove the //.
Notice that the tab at the top left of the editor now says *HelloWorld. The asterisk
signifies that the program code has changed since it was last saved. The Save icon on
the toolbar also changes from grey to its active state, again indicating that there are
unsaved changes.
11. Click on the Save icon to save the changes you have just made.
Note that the asterisk has gone, and the save icon is now in its inactive (grey) state.
Tip: Computers can crash at any time, so always remember to save your work
frequently!
12. Run the program again.
With the readln; back in action, the console window will not vanish, as before, but
will wait for your input. Press the Enter key to allow the program to end.
13. In the editor, change writeln to WRITELN and run the program again.
Pascal is not case sensitive, so the program still runs as it did before.
14. In the editor, change WRITELN to write and run the program again.
Notice that the cursor is now positioned at the end of Hello World!. The writeln
instruction performed this write instruction then positioned the cursor at the start of
the following line.
15. Amend the program to:
a. Output Hello
b. Position the cursor at the start of a new line
16. Save the program as Hello. (Accept the default file extension .lpi).
17. Run the program to test it.
Features introduced:
After Lazarus has started, you will see the following menu bar:
4. Click on Program in the list of options, as shown above, and then click on the OK
button.
You may see the following Project changed dialogue:
5. If do see the above Project changed dialogue, just click on the No button.
(It was a brand new project and so nothing valuable will be lost).
If you do not see the above dialogue you do not need to do anything in this step.
You should now be able to see a new project in the Source Editor
6. In your browser, navigate to the page containing the Pascal program you want to
copy.
7. Copy the code into the clipboard by selecting it then pressing CTRL+C, as follows:
a. Use the mouse to position the cursor before the 'p' of 'program' in the first
line
b. Drag the cursor with the left mouse button down until the cursor is
positioned just after the final full stop after 'end.'
c. Press CTRL+C
8. In Lazarus, select all the text in the editor.
9. Press CTRL+V to replace all of this text with the copied Pascal code.
10. Carefully check that all the Pascal code is now in the Lazarus editor. Check that there
are neither extra, nor missing characters at the beginning and end.
11. Save the file by selecting menu item Project > Save Project As...
12. Navigate to a suitably named new folder and save the file with the name given in the
first line of the program.
The program is now available for you to edit and run. Remember that student programs may
require some adjustment before they will compile and run successfully. (We have tested all
of them, but sometimes changes to compilers necessitate minor alterations to the original
code).
Experiment with the program. See what improvements you can make.
If you want to, you can quit from Lazarus by selecting menu item File > Quit
Outcome
Comment
Error message in
Delphi: Could not
create output file
Error message in
Lazarus: Error while
linking
Readln; statement missing Console window closes
Typical message
content in Delphi
Typical message
content in Lazarus
Comment
Description of error
Typical message
content in Delphi
Typical message
content in Lazarus
Comment
Misspelled identifier
Spelling of identifier
must be consistent
Previous statement
not separated by
semicolon
Missing operator or
semicolon
Illegal expression
Total = 0;
Use of = instead of :=
for assigning control
variable in for loop
e.g.
Identifier redeclared
Duplicate identifier
Identifier of variable
contains space e.g.
Identifier of variable
Description of error
begins with digit e.g.
Typical message
content in Delphi
Typical message
content in Lazarus
Comment
Identifier of
procedure begins
with digit e.g.
identifier expected
but number found
"identifier" expected
but "ordinal const"
found
procedure 5Times;
Surname := "Coe";
Forename := Joe;
Illegal expression
Expression expected
but '.' found
MyReal := 0.34;
MyReal := .34;
Incompatible types
Expression operated
on by logical
operators not
enclosed in brackets.
Incompatible types
Operator not
applicable to this
operand type
Should be:
until (Count = MAX) or
Found;
Description of error
Typical message
content in Delphi
Typical message
content in Lazarus
Comment
e.g.
until Count = MAX or
Found;
Example
Comment
Overflow e.g. when a number Example of INCORRECT code: The compiler directive {$Q+}
is too large to be held in the
enables run-time checking of
program
Overflow;
type of variable used
overflow. With the default
{$APPTYPE CONSOLE}{$Q+}
{$Q-}, the program runs and
uses
outputs a negative number of
SysUtils;
milliseconds in January! An
var
MillisecsPerDay, Jan_ms : integer; integer is held in two's
{Use int64 instead of integer to
complement format, which
make
represents a negative
this program work.}
number when the most
begin
significant bit is 1.
MillisecsPerDay := 24 * 60 * 60 *
1000;
Description
Example
Comment
Division by 0
Infinite loop
in this example.
Example
Comment
Description
Out-by-one
Example
Comment
Avoiding mistakes
Follow these tips to reduce the number of errors in your programs:
Take frequent breaks; mistakes are more likely when you are tired.
If in doubt, check. Look at examples if you are unsure of the correct syntax. Read the
checklists above from time to time and be on the lookout for those mistakes.
Learn from your mistakes. Try to recognise the types of mistake you make most often
and concentrate on reducing those.
Do not rely on the compiler to find your mistakes; it will only find certain types of
mistake.
Check the computer output carefully to make sure it is correct. Your tests should
include normal, boundary and erroneous data. See our sample test plan in the
tutorial on testing.
Include checks in the program itself, such as validating the input and intermediate
results.
Try your hand at spotting the errors in our selection of Programs to Debug. See how
many of our deliberate errors you are
Action
Short-cut
Key(s)
Open file
Ctrl+O
Shift+Ctrl+S
F11
Ctrl+F12
Shift+F12
F12
Menu
Action
Short-cut
Key(s)
Shift+F11
Run program
F9
For the screenshots in the following topics we have dragged the dialogue boxes to
convenient sizes, so do not expect yours to look exactly the same.
Click on the first topic title below, to continue:
1. Writing your First Form-based Application using Lazarus
How to write your first form-based "Hello World" application using Lazarus
2. Simple data input
How to input data to a form-based application using Lazarus
3. Using two forms
How to use more than one form in Lazarus applications
4. Creating a form-based application using existing files
How to create a Lazarus application using existing .lfm, .pas and .lpr files
5. Using a Lazarus Project Information (.lpi) File
How to use a .lpi file to save and load project information
After Lazarus has started, you will see the following menu bar:
5. If do see the above Project changed dialogue, just click on the No button if you have
made no unsaved changes to your previous project.
If you do not see the above dialogue you do not need to do anything in this step.
6. Save all files. Shift+Ctrl+S gives the Save project dialogue followed by the save unit
dialogue. Navigate to a suitable folder and save the project as HelloWorld to which
Lazarus will give the .lpi extension. Save the unit as uHelloWorld, to which Lazarus
will be give the .pas extension. (You will be given the option to change to all lower
case but you can keep the mixed case name).
7. Open the View forms dialogue (Shift+F12) then select Form1 and click on the OK
button.
8. Click on the Abc button then on the form to add a label component to the form.
The label icon is shown here with its tooltip. (Make sure that the Standard tab of
components is selected).
9. View the Object Inspector (F11) and type Hello World! as the caption of the label.
14. View Form1 again, right click on it and select View Source (.lfm)
15. If you can think of anything we could have made more straightforward for you, then
please let us know. If it did not work, then please tell us what went wrong.
Features introduced:
If you want to, you can quit from Lazarus by selecting menu item File > Quit
Alternatively, you can move on to the next topic in this guide. The next program, GreetUser
has a little more functionality.
3. Rename the components by changing in the Object Inspector the Name properties of
the form, label, button and labelled edit to frmGreeting, lblGreeting, btnGreeting and
leForename, respectively.
4. Using the Object Inspector, change the Caption property of the form, label, and
button to Greeting, blank (by deleting the contents), and Greet me, respectively.
5. Using the Object Inspector for the labelled edit, click on the + to the left of EditLabel
then change the caption of the EditLabel to Enter forename then press button.
6. Double click on the button in the form to create the procedure
TfrmGreeting.btnGreetingClick(Sender: Tobject) then enter between begin and end
the three lines:
7.
8.
9.
lblGreeting.Font.Color := clRed;
lblGreeting.Caption := 'Hello ' + leForename.text + '!';
leForename.text := '';
Features introduced:
simple, and do not encrypt the password (or make it difficult to guess). If you go wrong you
can look at the essential code of five files after the instructions.
1. Create a new application and save the project as Password.lpi and the unit as
uPassword.pas.
2. Open the form and add a button (tool-tip TButton) from the Standard tab of
components and two labelled edits (tool-tip TLabeledEdit) from the Additional tab.
3. Rename the components by changing in the Object Inspector the Name properties of
the form, button and labelled edits to frmPassword, btnMain, leName and
lePassword respectively.
4. Using the Object Inspector, change the Caption property of the form and button to
Password Form and Main Form, respectively.
5. Using the Object Inspector for the first labelled edit, click on the + to the left of
EditLabel then change the caption of the EditLabel to Name.
6. Using the Object Inspector for the second labelled edit, change the PasswordChar
property from #0 to *. Click on the + to the left of EditLabel then change the caption
of the EditLabel to Password.
7. Add a new form to the project using the menu item File > New Form.
8. Using the menu item File > Save As ..., save the unit of the new form as uMain.pas.
9. Using the Object Inspector, change the name of the form to frmMain and its caption
to Main Form.
10. Add a label to form frmMain and change its name to lblMain
11. At the beginning of the implementation section of the unit uMain.pas, add the code
12. uses
13. uPassword;
14. At the beginning of the implementation section of the unit uPassword.pas, add the
code
15. uses
16. uMain;
17. View frmPassword and double click on the button. In its click event procedure insert
the code:
18. if lePassword.Text = 'pp4s' then
19. frmMain.Show;
20. View frmMain and open the Object Inspector. Select the Events tab for the form,
select the OnActivate event and double click in its empty edit box to be taken to the
FormActivate procedure in the editor. Insert the code
21. lblMain.Caption:= frmPassword.leName.Text + ', this is the main form.';
22. Run the program and enter 'Mo' for the name and 'pp4s' for the password.
uPassword.pas
unit uPassword;
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
StdCtrls;
type
TfrmPassword = class(TForm)
btnMain: TButton;
leName: TLabeledEdit;
lePassword: TLabeledEdit;
procedure btnMainClick(Sender: TObject);
end;
var
frmPassword: TfrmPassword;
implementation
uses
uMain;
{$R *.lfm}
procedure TfrmPassword.btnMainClick(Sender: TObject);
begin
if lePassword.Text = 'pp4s' then
frmMain.Show;
end;
end.
uPassword.lfm
object frmPassword: TfrmPassword
Left = 504
Height = 119
Top = 303
Width = 397
Caption = 'frmPassword'
ClientHeight = 119
ClientWidth = 397
LCLVersion = '0.9.30'
object leName: TLabeledEdit
Left = 57
Height = 28
Top = 46
Width = 80
EditLabel.AnchorSideLeft.Control = leName
EditLabel.AnchorSideBottom.Control = leName
EditLabel.Left = 57
EditLabel.Height = 21
EditLabel.Top = 22
EditLabel.Width = 41
EditLabel.Caption = 'Name'
EditLabel.ParentColor = False
TabOrder = 0
end
object lePassword: TLabeledEdit
Left = 176
Height = 28
Top = 46
Width = 80
EchoMode = emPassword
EditLabel.AnchorSideLeft.Control = lePassword
EditLabel.AnchorSideBottom.Control = lePassword
EditLabel.Left = 176
EditLabel.Height = 21
EditLabel.Top = 22
EditLabel.Width = 63
EditLabel.Caption = 'Password'
EditLabel.ParentColor = False
PasswordChar = '*'
TabOrder = 1
end
object btnMain: TButton
Left = 292
Height = 25
Top = 47
Width = 92
Caption = 'Main Form'
>TabOrder = 2
end
end
uMain.pas
unit uMain;
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
TfrmMain = class(TForm)
lblMain: TLabel;
procedure FormActivate(Sender: TObject);
end;
var
frmMain: TfrmMain;
implementation
uses
uPassword;
{$R *.lfm}
procedure TfrmMain.FormActivate(Sender: TObject);
begin
lblMain.Caption:= frmPassword.leName.Text + ', this is the main form.';
end;
end.
uMain.lfm
object frmMain: TfrmMain
Left = 433
Height = 50
Top = 330
Width = 320
Features introduced:
uMenu.pas
unit uMenu;
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
TfrmMenu = class(TForm)
btnRed: TButton;
btnGreen: TButton;
btnBlue: TButton;
procedure btnBlueClick(Sender: TObject);
procedure btnGreenClick(Sender: TObject);
procedure btnRedClick(Sender: TObject);
end;
var
frmMenu: TfrmMenu;
implementation
{$R *.lfm}
uses
uRed, uGreen, uBlue;
procedure TfrmMenu.btnRedClick(Sender: TObject);
begin
frmRed.show;
end;
procedure TfrmMenu.btnGreenClick(Sender: TObject);
begin
frmGreen.show
end;
procedure TfrmMenu.btnBlueClick(Sender: TObject);
begin
frmBlue.show;
end;
end.
uMenu.lfm
object frmMenu: TfrmMenu
Left = 670
Height = 91
Top = 255
Width = 320
Caption = 'Menu Form'
ClientHeight = 91
ClientWidth = 320
LCLVersion = '0.9.30'
object btnRed: TButton
Left = 16
Height = 25
Top = 24
Width = 75
Caption = 'Red Form'
>TabOrder = 0
end
object btnGreen: TButton
Left = 120
Height = 25
Top = 24
Width = 80
Caption = 'Green Form'
>TabOrder = 1
end
object btnBlue: TButton
Left = 224
Height = 25
Top = 24
Width = 75
Caption = 'Blue Form'
>TabOrder = 2
end
end
uRed.pas
unit uRed;
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
TfrmRed = class(TForm)
btnMenu: TButton;
procedure btnMenuClick(Sender: TObject);
end;
var
frmRed: TfrmRed;
implementation
{$R *.lfm}
uses
uMenu;
procedure TfrmRed.btnMenuClick(Sender: TObject);
begin
hide;
frmMenu.show;
end;
end.
uRed.lfm
object frmRed: TfrmRed
Left = 795
Height = 240
Top = 270
Width = 320
(The files uGreen.pas and uBlue.pas are very similar to uRed.pas and the forms uGreen.lfm
and uBlue.lfm are very similar to uRed.lfm).
Features introduced:
In the previous page we showed you how to add files to a project. If you have the .lpi file of a
project in your program folder, the necessary files are already part of the project from the
outset. For example, using the same example as on the previous page, within the
ProjectOptions tag of our MenuDemo.lpi project information file is the following units tag.
<Units Count="9">
<Unit0>
<Filename Value="MenuDemo.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="uRed.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
<UnitName Value="uRed"/>
</Unit1>
<Unit2>
<Filename Value="uBlue.lfm"/>
<IsPartOfProject Value="True"/>
</Unit2>
{Units 3 - 8 omitted}
</Units>
We chose the project option to save our session information in the .lps file.
Compare this entry in the .lps file for Unit 1 with the above:
<Unit1>
<Filename Value="uRed.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
<UnitName Value="uRed"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="3"/>
<WindowIndex Value="0"/>
<TopLine Value="6"/>
<CursorPos X="16" Y="26"/>
<UsageCount Value="22"/>
<Loaded Value="True"/>
</Unit1>
By saving our session info in the .lps file, we have prevented this data from being saved in
the .lpi file. Similarly our jump history appears in the .lps file rather than the .lpi file. For
some programs we will provide the .lpi file for your use. This is particularly helpful when we
have added packages to the project. An alternative method for obtaining a suitable .lpi file
for distribution is to publish the project. Publishing strips out the details that are unhelpful
to an end user.
Carry out the following steps to save session information in the .lps file.
1. Select the menu item Project > Project Options
2. Select the Session page
3. Select the option to save session information in the .lps file in the project directory
To publish the project, select the menu item Project > Publish Project ... then select or
navigate to a suitable Destination Directory. If you want a compressed file of your project,
select the appropriate "Command after" from the combo box. Click on the Ok button to
publish.
Features introduced:
Links
Online Books and Tutorials
Learn Pascal by Tao Yue
This clearly written Pascal tutorial includes programming assignments and solutions.
Pascal Programming Tutorials by Sheepdog Software
Do not be put off by the "no frills" appearance of this site. The tutorials begin with
straightforward examples, giving plenty of detail. They cover interesting extras such
as playing sounds, and progress to advanced material. Some examples use the crt
unit, which is present in Lazarus but not in Delphi. The crt unit includes the ClrScr
procedure to clear the screen and the GoToXY procedure to position the cursor
before writing to the screen. There are useful links to resources on other websites,
often covering difficult topics.
How to Program in Pascal and Delphi by Sylvia Langfield
Google Books has put online a significant number of pages from the Pascal section of
this excellent book.
The Pascal Programming Language by Bill Catambay
These pages have links to Pascal resources for a variety of operating systems, with
many references to the Mac OS.
Online Help/Reference
DelphiBasics
This impressive site is most helpful for visual programming in Delphi because it gives
form-based rather than console-based examples. It is packed with useful information
about the Pascal language, however, and can be a useful source of help for console
programs as you become more experienced. Ignore the Show full unit code option
for viewing examples and use the writeln procedure instead of ShowMessage.
Reference Guide for Free Pascal (Free Pascal is used by Lazarus.)
These authoritative pages include plenty of examples and cover the basics through to
advanced features of the languages. Differences from Delphi and Turbo Pascal are
noted.
Pascal Dialects
The Oxygene Language
Smart Pascal
DWScript
Online Dictionaries
FOLDOC
The Free Online Dictionary of Computing includes anything you might expect to find
in a computer dictionary.
Webopedia
Webopedia claims to be the only online dictionary and search engine you need for
computer and Internet technology definitions.
Challenges
Olympiad
The British Informatics Olympiad, sponsored by Lionhead Studios, is a programming
competition. In the first round, taken at their own school, students attempt to solve
three challenging problems in three hours. The top fifteen competitors in the nation
are invited to the final. The website has further details, past papers for download and
some of the solutions.
All Ireland Competition: Sample problems and solutions
Some of the problems are straightforward, but you are advised to solve them
completely within the time limit.
Project Euler
"Project Euler exists to encourage, challenge, and develop the skills and enjoyment of
anyone with an interest in the fascinating world of mathematics." You are able to
access a discussion thread for a particular problem once you have solved it. You may
find algorithms that are more efficient than your own and it is interesting also to
compare your code with solutions written in other languages.
Game Development
Pascal Game Development
Webmaster AthenaOfDelphi ensures that the site is a good source of news (such as
advances in Lazarus and Delphi), tutorials and discussions. She is organising the
development of the PGD Community Engine, which should allow students to produce
even better games.
Pascal Gamer Magazine
The magazine, edited by Jason McMillen, is a free, downloadable publication
covering game development and design with Pascal and Object Pascal development
tools. A section of the site provides a showcase for past PGDAnnual competitions
and, most usefully, source code for entries for Dogfight (the 2005 competition).
Freepascal meets SDL
An excellent site for learning how to use the Simple DirectMedia Layer
NeHe Productions
3D demonstrations and tutorials