Programs
This is a growing collection! Take a look, be inspired then contribute yourself!
Now that we have a wide range of Pascal programs, we have arranged them and collated their details in the table below. Programs towards the top of the table tend to be more straightforward, with few if any added requirements, and should be appreciated by beginners. For these programs we have noted commonly used language features such as loops and selection statements so that you can use them for reference. Programs at the bottom of the table are advanced and show what can be achieved with the Pascal language by keen, talented students. These programs also contain many examples of common features, but we note only their more advanced features for reference purposes.
Select the programs from (i) the left panel, (ii) the links in the table or (iii) the list below the table. Compile programs requiring the Crt unit using Lazarus or see how to download and use Crt in Delphi in our Graphics tutorial.
| Name | Programmer | Description | Features | Requirements | Classification |
| ChristmasProg | Mitchell Weiss | Christmas tree decorations | If statements, char variables, Writeln, Readln | Visual effect | |
| Rocket | Alkesh Gajjar | Ascending rocket | Integer variables, for loop, Sleep, Writeln | Visual effect | |
| RockPaperScissors | Hasaan Ausat | Pascal version of the guessing game | Integer variables and char variable, repeat loop, if statements, Random | Game | |
| Roulette | Ayotunde | Betting against the casino on numbers and red/black | Procedures, Integer and real variables, repeat loops, if statements, Random | Game | |
| SUVAT | Alkesh Gajjar | Physics calculations | Integer and real variables, arithmetic operators, formatting of real numbers, Sqr | Educational | |
| Cars | Omar Hamid-Chohan | Selects web pages about cars | Integer and string variables and HWND (window handle) variable, constants, repeat loop, nested case statements, Readln, ShellExecute | Information | |
| Functions | Heemesh Vara | Demonstration of inbuilt Pascal functions | Integer, string, char and byte variables, procedures, repeat loop, case statement, DateToStr, Ord, Chr, ReverseString, SetConsoleTextAttribute | Educational | |
| Betting | Alex Griffiths | Horse racing with odds | For loops and repeat loops, if and case statements, Boolean operators, Sleep, Random | Game | |
| Betting Game | Arnav | User bets on Premiership matches with odds | For loop and repeat loops, if and case statements, Sleep, Random, Append, AssignFile, CloseFile | Game | |
| Bogosort | Lewis Wright | Frivolous random sort | Constant, Boolean variables, for loops and repeat loops, function, array, Random | Educational | |
| MarbleDrop | Adam Renak | Simulation of falling marble deflected randomly left or right by pins | Procedures, arrays, repeat loop, case statements, Random, Writeln | Game | |
| Battleships | Lewis Wright | Pascal version of the paper and pencil battleships game | Procedures, arrays, Boolean variables, for loops and repeat loops, if and case statements, Boolean operators | Game | |
| DelphiManager | Matt Tucker | Soccer simulation, giving minute-by-minute updates of the score and frequent highlights | Many examples of different types of procedures, arrays, loops, and selection | Game | |
| Arithmetic | Peter Hearnshaw | Arithmetic using Reverse Polish Notation (RPN) | Implementation of a stack, arrays, Chr, Ord, StrToFloat, Inc | Educational | |
| Calculator | Christopher Winward | Calculator that evaluates expressions comprising integers and/or fixed-point real numbers with the operators +, -, *, / and ^ and brackets. | Object-oriented code, pointers, implementation of a stack, TLists, error messages, enumerated type, nested case statements, nested routines, helpful comments, C-type operators, the ** operator for exponentiation (in the Math unit), Inc, Exit | Educational | |
| CollatzASM | Felix Thompson | In-line assembler code for calculating Collatz chain lengths | ADD, MOV, CMP, JE, JMP | Educational | |
| Encrypt | Peter Hearnshaw | In-line assembler code for encrypting a number | LEA, ADD, SUB, DEC, MOV, CMP, JG, PUSH, POP | Educational | |
| Mazer | Ihsan Fazal | Maze game | Procedures, reading file of records into array, Windows.Beep (for music), Random | data-mazer01-local.txt | Game |
| Crossword | Adam Renak | Matches target partial words with wildcards to words in dictionary | String arrays, reading of text file, procedures, Length, Inc, LowerCase | DictWordlist.txt | Educational |
| Compressor & Decompressor | Adam Greenberg | Compression and decompression of text files | For loops and while loops, arrays, file handling, string manipulation, thorough commenting, FileSize | reactions.txt | Educational |
| Shoot | Nathan | User "shoots" at moving target | Timers, Images, Random, ShowMessage, Close | Frame-based | Game |
| Tester & TestMaker | James | Tester inputs the tests you make with TestMaker to test the user | File handling, arrays, ClrScr, assignFile, reset, rewrite, closeFile | Crt | Educational |
| SnakeWithoutATail | Joe | Snake that eats fruit | Case statement, CursorOff, GoToXY, Random, ReadKey and in Versions 2 and 3 objects and PlaySound | Crt | Game |
| Trapped | Reggie | Interactive story | procedure, TextBackground, Inc, Dec, Halt, TextColor, ClrScr, CursorOff, KeyPressed, ReadKey, GoToXY | Crt | Game |
| SpaceEvaders | Neil | Game in which you try to avoid vertically and horizontally moving enemies | If and case statements, TextBackground, TextColor, CursorOff, GoToXY, Random, ReadKey, Halt | Crt | Game |
| GoalQuest | Nikhil | Game in which you try to avoid moving enemies while heading for the goal | If and case statements, objects, TextBackGround, TextColor, CursorOff, GoToXY, Random, Inc, DecReadKey, Halt, Sleep | Crt | Game |
| MazePlus | Nikhil | Game in which you try to navigate the maze quickly and land on top of the target | TextBackGround, TextColor, WhereX, WhereYGoToXY, Ord, Time, AssignFileReset, CloseFile, Sleep | Crt, MazePlus.lpr | Game |
| Chainer | Nikhil | Runs three games in succession | TProcess with options and the CommandLine and Execute routines, TextBackGround, TextColor | Crt, MazePlus.exeGoalQuest.exe, Roller.exe | Educational |
| MarbleRun | Christopher Winward | Simulation of falling marble deflected randomly left or right by pins | Case statements, CursorOff, GoToXY, Random, ReadKey, Val | Crt | Game |
| Trains | Peter Hearnshaw | Active timetable for London to Liverpool trains | Arrays, string manipulation, DIV, MOD, Now | Crt | Information |
| Physics | Charles | Physics calculations | Enumerated types, set constants, case statements, ReadKey, LeftStr, Length, FloatToStr, StrToFloat | Crt | Educational |
| MorseCode | Jack Fearn | Translates to and from Morse code | Arrays, Ord, Chr, Windows.Beep, ClrScr, ShellExecute | Crt | Educational |
| Snake | Peter Hearnshaw | Snake that grows when it eats | Arrays, case statements, GoToXY | Crt | Game |
| StopwatchLaz | Daniel Lever | Times up to eight swimmers completing up to four lengths with one of four different strokes | Procedures, arrays, Time, GoToXY, ClrEol, Trunc | Crt | Information |
| ascii3D | Peter Hearnshaw | Retro car racing game | Procedures, arrays, repeat loop, Random, StringReplace, Delete, Writeln, ClrEol, ClrScr | Crt | Game |
| Risk | Michael Wardley | Console program based on the Risk board game | Procedures, validation, array of records, repeat and for loops, if and case statements, Random, Readln, Writeln, Sleep, ClrScr | Crt | Game |
| CrazyMaze | James Hall | Maze game | Maps constructed in spreadsheet, arrays (including 3D), procedures, GoToXY, ReadKey, TextColor, TextBackground | Crt | Game |
| PascalPokemon | Max Foster | Pokemon clone | Arrays, deeply nested selection and iteration constructs, file handling, string manipulation, records, classes and objects, c syntax, procedures with up to eight parameters, icon | Crt, map1.txt, map2.txt, map3.txt, PascalPokemon.ico | Game |
| MultiDraw | Ihsan Fazal | Draws parallel lines of different colours | InitGraph, WriteBuf, ReadBuf, PutPixel, GetMouseX, GetMouseY, CloseGraphRequest | WinCrt.pas, WinGraph.pas, WinMouse.pas | Visual effect |
| Roller | Neil | User makes the sphere jump to avoid horizontally moving barb | InitGraph, closeGraph, , inc, randomRange, randomize, delay, setWindowSize, setColor, setFillStyle, , fillEllipse, bar, setTextStyle, outTextXY, readKey, CloseGraphRequest | WinCrt.pas, WinGraph.pas, WinMouse.pas | Game |
| PixelSort | James Hall | Motion graphics | Arrays, Sin, Cos, ArcTan, UpdateGraph, GetMouseX, GetMouseY, Random, SetColor, Line | WinCrt.pas, WinGraph.pas, WinMouse.pas | Visual effect |
| WaveInterference | James | Draws sine waves and sums them | Conditional compilation, dynamic arrays, SetLength, Sin, Random, SetColor, MoveTo, LineTo, Val | WinCrt.pas, WinGraph.pas, | Educational |
| SuperHappyFunLand | James Hall | Draws from different positions of the observer 3D objects constructed from polygons | Multi-dimensional arrays, Sin, Cos, ArcTan, InitGraph, UpdateGraph, SetWindowSize, SetFillStyle, FillRect, FillPoly, DrawPoly | WinCrt.pas, WinGraph.pas | Visual effect |
| FlyingUK | Peter Hearnshaw | User navigates flight over part of the UK | InitGraph, PutPixel, SetTextStyle, SetFillStyle, OutTextXY, LineTo | Crt, WinCrt.pas, WinGraph.pas, WinMouse.pas, places.txt | Educational |
| 3D-Driving | Peter Hearnshaw | User drives round a circuit marked by hexagonal prisms | Round, GetMaxX, GetMaxY, GetMouseX, Sin, Cos, ArcTan | WinCrt.pas, WinGraph.pas, WinMouse.pas | Game |
| MolyMaker | Peter Hearnshaw | Predicts infrared spectra of molecules constructed by the user | Round, Sin, InitGraph, UpdateGraph, GetMaxX, GetMaxY, SetLineStyle, SetTextStyle, Line, LineTo, GetMouseEvent, PollMouseEvent | WinCrt.pas, WinGraph.pas, WinMouse.pas | Educational |
| CrazyPaint (includes saveall and loadall) | James Hall | Paint program that you can use to draw lines, fill outlines with colour, erase areas and load and save bitmap files | SetFillStyle, InitGraph, UpdateGraph, SetWindowSize, FloodFill, SetColor, SetBkColor, BlockRead, GetMem, FreeMem, Exec | WinCrt.pas, WinGraph.pas, WinMouse.pas, saveall.exe, loadall.exe, folders: Icons and savedata | Visual effect |
| GameOfLife (includes saveall, loadall and savepatt) | James Hall | Version of Conway's Game of Life showing patterns of cells surviving according to simple rules | AssignFile, Reset, Rewrite, InitGraph, UpdateGraph, SetWindowSize, SetFillStyle, Rectangle, SetColor, PutImage, BlockRead, GetMem, FreeMem, Exec, GetMouseX, GetMouseY, GetMouseWheel, GetMouseButtons, OutTextXY | WinCrt.pas, WinGraph.pas, WinMouse.pas, saveall.exe, loadall.exe, savepatt.exe, folders: Icons and savedata | Educational |
| Adventures | Peter Hearnshaw | Platform game with jumping goat | AssignFile, PutPixel, Bar, FillPoly, SetFillPattern | WinCrt.pas, WinGraph.pas, WinMouse.pas, donkey_left.txt, donkey_right.txt, spring.txt, carrot.txt | Game |
| Knowledge | Peter Hearnshaw | Taxi navigation in the West End | Random, UpdateGraph, GetMem, BlockRead, PutImage, FreeMem, GetMouseX, ReadKey, GetPixel, PollMouseEvent, GetMouseEvent | WinCrt.pas, WinGraph.pas, WinMouse.pas, folder of bitmaps: maps | Educational |
| FaceChange | Peter Hearnshaw | Changes the shape of a face in a photograph | Arrays, GetMem, BlockRead, SetWindowSize, OutTextXY, ClearDevice, PutPixel | WinCrt.pas, WinGraph.pas, WinMouse.pas, image.bmp | Visual effect |
| GASP | Peter Hearnshaw | Simulates the flow of instructions and data through registers as your assembler program is executed | TProcess for executing another application, many routines including Round, Sin, InitGraph, UpdateGraph, GetMaxX, GetMaxY, SetLineStyle, Line, LineTo, SetFillStyle, SetTextStyle, outTextXY, GetMouseEvent, PollMouseEvent, Pos, Delete | WinCrt.pas, WinGraph.pas, WinMouse.pas | Educational |
| My_first_sdl | Steven Binns | Motion graphic using SDL and SDL_gfx | C-type syntax, SDL_Init, SDL_SetVideoMode, EllipseColor, SDL_Flip, SDL_Delay, SDL_FreeSurface, SDL_Quit | SDL.pas, jedi-sdl.inc, SDL_gfx.pas, SDL.dll, SDL_gfx.dll | Visual effect |
| Invader | Steven Binns | Game of a bug's survival against white blood cells | Control by mouse, music, alpha blending, SDL_Init, SDL_SetVideoMode, SDL_BlitSurface, SDL_Flip, SDL_Delay, SDL_FreeSurface, SDL_Quit, FilledCircleColor | SDL.dll, SDL_gfx.dll, SDL_mixer.dll, SDL_ttf.dll, libfreetype-6.dll, zlib1.dll, John Stump - Death Waltz.mid | Game |
| A_star | Christopher Winward | Demonstration of the A* algorithm for finding the shortest path through a network of nodes | Object-oriented code, linked lists, conditional compilation, nested routines, sqrt, exit, SDL_Init, SDL_SetVideoMode, SDL_WM_SetCaption, SDL_GetVideoSurface, SDL_FillRect, SDL_PollEvent, SDL_GetMouseState, SDL_GetTicks, SDL_MapRGB | SDL.pas, jedi-sdl.inc, SDL_gfx.pas, SDL.dll, SDL_gfx.dll | Educational |
| CowGame | Peter Hearnshaw | Platform game with jumping cow, elephants and blimp | SDL_FillRect, SDL_GetKeyState, SDL_MouseButtonDown, SDL_BlitSurface, SDL_SetColorKey, FilledPolygonColor, SDL_MapRGB, SDL_DisplayFormat, RotozoomSurface, SDL_PumpEvents | SDL.pas, jedi-sdl.inc, SDL_gfx.pas, SDL_image.pas, SDL.dll, SDL_gfx.dll SDL_image.dll | Game |
| NetworkChat | Max Foster | Enables several users on networked computers to chat. Contains the SuperMaximo SDL AppEngine to facilitate programming with SDL_NET. | Pointers, buffers, default parameters, GotoXY, TextColor, SDL_PollEvent, SDLNet_CheckSockets, SDLNet_SocketReady, SDLNet_TCP_Send, SDLNet_TCP_Recv, SDLNet_AllocPacket | Crt, SDL.pas, jedi-sdl.inc, SDL_NET.pas, SDL.dll, SDL_Net.dll | Communication |
| AlphaServer and AlphaClient | James Hall | Enables users on networked computers to chat and move their named sprite | SDL_Init, SDLNet_Init, SDLNet_ResolveHost, SDLNet_CheckSockets, SDLNet_AllocSocketSet, SDLNet_FreeSocketSet, SDLNet_TCP_AddSocket, SDLNet_TCP_DelSocket, SDLNet_TCP_Accept, SDLNet_TCP_Open, SDLNet_TCP_Recv, SDLNet_TCP_Send, SDLNet_TCP_Close, SDLNet_SocketReady, TTF_OpenFont, TTF_RenderText_Solid | SDL.pas, jedi-sdl.inc, SDL_mixer.pas, sdl_ttf.pas, SDL.dll, SDL_mixer.dll, SDL_ttf.dll, libfreetype-6.dll, smpeg.dll, zlib1.dll, arial.ttf, folders: images, sounds | Communication |
| SaveUK | Peter Hearnshaw | Plane flies over map of UK and shoots down aliens | Round, SDL_Init, SDL_SetVideoMode, SDL_LoadBMP, SDL_FillRect, SDL_BlitSurface, SDL_SetColorKey, SDL_MapRGB, TTF_OpenFont, TTF_RenderText_Solid, SDL_DisplayFormat, RotozoomSurfaceSizeXY, SDL_PollEvent, SDL_GetKeyState, SDL_PumpEvents, SDL_Flip, SDL_Delay, SDL_Quit | SDL.pas, jedi-sdl.inc, sdlutils.pas, SDL_gfx.pas, SDL_image.pas, sdl_ttf.pas, SDL.dll, SDL_gfx.dll SDL_image.dll, sdl_ttf.dll, zlib1.dll, 13 bitmap images, libfreetype-6.dll folder : images | Educational Game |
| KoalasInSpace | James Hall | Koala moves and fires bullets at enemies that home in on it | Trig functions, sound mixing, input from keyboard and mouse button using SDL, SDL_BlitSurface, SDL_Freesurface, SDL_MapRGB, SDL_SetColorKey, , SDL_Flip, SDL_Delay, SDL_LoadBMP, TTF_OpenFont, TTF_CloseFont, MIX_LoadMus, MIX_LoadWav, MIX_VolumeChunk, MIX_PlayMusic, MIX_PlayChannel, MIX_HaltMusic, MIX_HaltChannel, Dispose | SDL.pas, jedi-sdl.inc, SDL_mixer.pas, sdl_ttf.pas, SDL.dll, SDL_mixer.dll, SDL_ttf.dll, libfreetype-6.dll, smpeg.dll, zlib1.dll, arial.ttf, images (folder), sounds (folder) | Game |
| SpaceShooter | Christopher Winward | Space shooter fires with guns and lasers at advancing rocks | Object-oriented code, pointers, bit masks, trig functions, sound mixing, input from keyboard and mouse button using SDL, timers, direct access to data, and subroutines with variable and default parameters, C-type syntax, SDL_gl_SwapBuffers, glLoadIdentity, glPushMatrix, glDisable, glTranslatef, gl_Blend, glBindTexture, glBegin, gl_Quads, gl_Texture_2D, glColor3f, glVertex3f | SDL.pas, jedi-sdl.inc, SDL_image.pas, SDL_mixer.pas, SDL_gfx.pas, GL.pas, GLU.pas, SDL.dll, SDL_gfx.dll, SDL_mixer.dll, SDL_ttf.dll, SDL_image.dll, libpng12-0.dll, zlib1.dll, folders: images, sounds | Game |
| MrSnugglekins and the Giant Sack of Catnip (includes earlier Pascal version of the SuperMaximo GameLibrary) | Max Foster | Cat tries to defend catnip against army of Spambots | Object-oriented code, virtual and abstract methods, pointers, 3D graphics using OpenGL trig functions, sound mixing, input from keyboard (and mouse and joystick/gamepad optionally) using SDL, timing, subroutines with variable and default parameters, C-type syntax, enumerated types, sets, MkDir, DirectoryExists, SDL_gl_SwapBuffers, SDL_SetAlpha, SDL_CreateRGBSurface, glDisable, glTexParameteri, gl_Blend, glBindTexture, glTexImage2D, glGenVertexArrays, gl_Texture_2D, glBindVertexArray, glDeleteTextures | At least OpenGL 2.1 with GLSL version 1.1, SDL.pas, jedi-sdl.inc, SDL_image.pas, SDL_mixer.pas, SDL_gfx.pas, dglOpenGL.pas, SDL.dll, SDL_gfx.dll, libpng12-0.dll, SDL_mixer.dll, SDL_ttf.dll, SDL_image.dll, libfreetype-6.dll, folder: assets | Game |

dita powered.