Peter's Delphi & Kylix

Source Code Page

== I have plans to port all code to ==

## Free Pascal & Free Lazarus RAD ##

 
All of the code on this page is freeware open source. And the executables files are included as separate files)

This Borland Inprise Delphi 5.0 and Kylix programs are for Kylix 3 [Linux OS].

In the case of the project the .exe files have also been included. Programs are Beta versions unless otherwise stated.

I don't mind what ever you do with the Source Code for these programs, however, I do request the you give me credit for my hard work. In other words, please leave my name on these programs... don't try to pass these programs as your work if they are not.

Links - Jump to:

Complete Delphi Projects - Source Code and Executable files available as
separate files (.zip archives)

Delphi Components With Source Code

Freeware components by Other People With Source Code.


 

<<< Complete Delphi Projects >>>

(all include .exe files in case you don't want to compile it)

(full source code, as 2 -- or more separate files)


Guess the Animal Game v0.01 beta

 

Draw Poker v0.03 for Delphi.

This is a port of Draw Poker v3.3 by Robert A Woodring II, written in C language. 

The original C source code version is available from: 
http://www.Planet-Source-Code.com

poker_003_src.zip 15 KB - The Delphi source files.

poker_003_exe.zip 228 KB - The executable file.


Colour_Life v1.0 - Game of Life in Colour.

color_life_1_src.zip 15KB - The Delphi source files.

color_life_1_exe.zip 225KB - The executable file.


Roman number converter.

This application program has a simple interface. Simply enter the Arabic number (e.g. 1234 or 456 or 777 or 9873 ... an integer using decimal digitals) and click on the button "Convert to Roman numbers" and it will appear in the box for Roman Number. Alternatively, enter a Roman Number in the box and click on the button "Convert to Arabic Number" and it will appear in the Arabic Number box.

arabic_roman_src.zip 6 KB - The Delphi source files.

arabic_roman_exe.zip 162 KB - The executable file.


Tank game v0.06

This is a little game where you are a man standing in a playing grid (a TStringGrid in Delphi) and you are surrounded by robots and mine -- you are in a mine field. You can move in one of nine directions and each time you move, the robots move one step closer to you. If you touch a robot or mine, then you will die. You can also use a sonic-screwdriver - which will kill any robot immediately next to you. You also have a limited number of teleports (random move)... but be careful because you may land on a robot or mine, in which case you will die.

tank_006_src.zip 24 KB - The Delphi source files.

tank_006_exe.zip 225 KB - The executable file.


Frog! Game version 0.05b

Make the Frog eat flies to survive. Retro game based on old Commodore PET game. New version uses TPaintBox component instead of TImage and this seems to fix known previous bugs. Now frog changes colour as he eats bugs (new to 0.05a).

IMPORTANT ANNOUNCEMENT:

This project is now on -- http://sourceforge.net/projects/frog-retro-game/
Please visit the above URL link for the latest release of the Source code & Executable files.

 

Frog_005b_src.zip 243 KB - The Delphi source files.

Frog_005b_exe.zip 395 KB - The executable file.

Frog_waves.zip 281 KB - Some sound wave files you will need.

Frog_waves2.zip 898 KB - Another sound wave file you will need.


AI-Life v0.02a

Is a zero player which simulates an environment where plants and critters grow and compete.

ai_life_002a_src.zip - 351 KB - The Delphi source code files only (includes original version by different author)

ai_life_002a_exe.zip 309 KB - The .exe and .hlp files

You will also need the component TGprogress.

gprogress_src.zip 23 KB - The Delphi source code files only


Chop_n_Join v0.06d

Chops large files into smaller files (typically floppy diskette size - but can be any size), and also joins them together (with .hlp file).

xxx

chop_n_join_006d_src.zip 11 KB - The Delphi source code files only

chop_n_join_006d_exe.zip 292 KB - The .exe and .hlp files


Do the Macarena 0.02

Watch this little guy (Mr Ascii) dance the Macarena !!! Fun. Stolen (er... converted to Delphi) from SWAG Pascal archives

( http://www.gdsoft.com/swag/downloads.html )

You will need these 2 components:

TFormResizer 2.0 ... http://www.delphi32.com/vcl/1289/

TThreadedTimer 1.2a ... http://www.delphi32.com/vcl/3086/

macarena_003_src.zip 9KB - The Delphi source code files only (also includes original SWAG Pascal code)

macarena_003_exe.zip 174 KB - The .exe file.

 macarena_004_src.zip 9KB - The Delphi source code files only (also includes original SWAG Pascal code)


macarena_004_exe.zip (updated 15 Dec 2005) 173KB - The .exe file.


Kylix 3 For Linux Source Code -
for the 'Do The Macarena' app

The Kylix source code files only (also includes original SWAG Pascal code).


GoMoku the game v0.04 

Played on a 15x15 board, the object of the game is to get 5 pieces in a row before the computer can.

Here is an article about the program which I will rewrite in the next few weeks (10 Mar 2002) (maybe I'll get around to rewrite the detailed artice... one day :-))) maybe, maybe not... it's not a high priority :-)))

Read my article which I wrote way back in 2002 and have updated it in March 2010. It is a plain html document.... e.g. if you can view this page then you'll be able to view the article also.

Link (URL):

Go-Moku Game - My Approach To Writing It In Delphi

by Peter E. Williams (yours truly) !!! ;-))

to the text html article where I describe how I went about so of the basics of designing the Artificial Intelligence logic for how the computer figures out where to move. The logic is pretty good !!! ;-0))

Enjoy.  ;-)))

omoku_004_exe.zip 244 KB - The .exe file for the game

gomoku_004_src.zip 33 KB - The Delphi source code files only


Guess the Animal Game

v0.01 beta

animals_exe.zip 168 KB - The .exe and .dat files for the game

animals_src.zip 9 KB - The Delphi source code files only

 

Hunt the Wumpuz 

'Hunt The Wumpuz' (c) 1996-2002 by Peter E. Williams, based in concept only on the game 'Hunt the Wumpus' by Gregory Yob. Note this is Windows clone of Mr Yob's original game. If you enjoy this game then you should thank Mr Yob for inventing his game (many years ago), as I do.

All of the code for this game was written by me (except the component for displaying the .gif map, which is freeware). I wrote it because I enjoyed the original and there was no Windows version. It is a simple game and was fun to write.

This game is Freeware open source (written in Delphi 5), and I think Mr Yob's game was also open source. Mr Yob's game was published in computer magazines and books. I am not making nor attempting to make a single cent from this game.

Note: if you want to re-compile this program then you will need TGifImage 2.2 from http://www.melander.dk/delphi/gifimage/ (TGIFImage Home page).

wumpuz_002a_exe.zip 216 KB - The .exe file for the game (including map & instructions files)

wumpuz_002a_src.zip 23 KB - The Delphi source code files only (including map & instructions files)


Nuclear the game v0.03a 

Is a fun game against the computer. A simple board game ... hard to beat.

nuclear_003a_exe.zip 228 KB The .exe and .hlp files for the game

nuclear_003a_src.zip 28 KB The Delphi source code files only


Simple Ed v0.05

Is a simple text-only editor written using tmemo component. Allows multiple editor files to be open, line & col counters on edit file's window caption, tiling & cascading of windows. Recent files opened/saved list implemented via an inifile.

Basic but a simple guide to how to do it. Could easily be modified to use trichedit component with addition of toolbar buttons for richtext effects (e.g. underlining, bolding, etc) ... these features were deliberately omitted since this is a text-only editor.

simple_ed_005_exe.zip 194 KB - The .exe file for the game

simple_ed_005_src.zip 19 KB - The Delphi source code files only

 

Snake Game v0.01

(Version #??) original by "//hIDRA_5" with modifications by PEW

The original snake game for Delphi was by //hIDRA_5, and can be downloaded 
from http://www.planet-source-code.com/ (until he updates it with this new version).

I am one of many people who have visited the above site and downloaded the source to the original game. The attached files form the new version of the snake game, as modified, enhanced and debugged by myself. I am sending this new version (0.01) including this file, to //hIDRA_5, in the hope that it will become the "official" next version, replacing the original.

Firstly, I would like to thank "//hIDRA_5" for sharing his source code and cool little game with the rest of the world. I hope that the new version will be accepted as an improvement to it. :-)))

It seem that "//hIDRA_5" after my many attempts to contact him, has decided to ignore my new version, so I am making it available here.

snake_001_exe.zip 308 KB - The .exe file for the game and fonts.

snake_001_src.zip 124 KB - The Delphi source code files and fonts.


Tragic Poet

This is a cute little program which I found on the internet in Commodore 64 BASIC source code and which I have converted to a Delphi program. It's not the greatest example of Delphi since it was originally written in BASIC - note I have debugged it to make it operate correctly. 

It will generate the required number of lines of random poetry. Original author unknown. 

Also included is the original C64 BASIC program and a text listing of the Commodore BASIC program (as a .bas file), as produced by a Commodore emulator.

tragic_poet_exe.zip 180 KB - The .exe file and the original C64 program and text basic listing.

tragic_poet_src.zip 6 KB - The Delphi source code files only


 

<<< Delphi Components
(with source) >>>

DColorButton v0.04

dcolorbtn_004_src.zip 10KB

A descendant of tbutton with colour background and text. (with sample project).

The component publishes 3 properties:
Color -- the normal color of the face of the button

DownColor -- the color of the button when it is 'down' -- e.g. when you click on it and hold down the mouse button the button will be this color.

DisabledColor -- the color of the button when Enabled := false

NB -- Test project contains a number of buttons and 1 timer and toggles the enabled property to show how the appearance of the buttons change in different states.

ArrayColorButton v0.02

arraycolorbtn_src.zip 8KB

A descendant of tbutton with colour background
and text, with Row and Col properties.

Label3d

label3d_src.zip 9KB

A descendant of tlabel with 3D effects,
e.g. Raised, Heavy Raised, Recessed, Heavy
Recessed (or none).

Richbutton

richbtn_src.zip 17KB

A button with a richedit face.


Miscellaneous
Components

myinifiles.txt

This is link to the text file (myinifiles.txt)

Intructions on how to make the MyIniFiles.pas unit, which is a modified version of Borland's IniFiles.pas

BTBeeper 0.06 Component

BTOdeum.pas component is a freeware beeper Delphi component. With full source.

by Theodoros Bebekis, Thessaloniki, Greece,
email: bebekis@mail.otenet.gr

available from:

Delphi Super Page (DSP) at

http://sunsite.icm.edu.pl/delphi/

and

Torry's page at

http://www.torry.net/

TFormResizer 2.0 component

Easysize.pas () is a freeware component for Delphi (1..5). "The TFormResizer component resizes all of the components on a form when the form size changes." With full source.

available from:

Delphi32.com at  http://www.delphi32.com/vcl/1289/

TStringAlignGrid

You will need the tStringAlignGrid component for some of my programs. Below is the contact details. Just go to the website below and download the latest version of tStringAlignGrid and install it. With full source.

Contact: Andreas Hoerstemeier, email: andy@hoerstemeier.de

available from: http://www.hoerstemeier.com/

TCard

 Is a component for drawing graphical cards for card games. Freeware, with full source. "Show cards and decks, with no additional DLLs."
Used in my Poker 0.02 game.

by: Giulio Ferrari
Available from: http://www.gferrari.com/