This repository contains new games written in the Yabasic implementation of the Basic language, as well as some modifications of older Basic games to work within Yabasic.
The games in this repository are primarily in the style of "economic simulation" type games.
This repository accompanies Programming a Basic Game workshop for the Electronic Faire 2025 at Temple University's Charles Library.
Slides (PDF)
Slides (GDrive)
TutorialsPoint Online Ya Basic Compiler
Using the Yabasic Unix binary works on MacOS, but is a bit tricky to get working.
- Download the yabasic tar-file from 2484.de Search for "Compile the sources for Unix"
- Uncompress the tar file (see instructions above). You should end up with a folder like yabasic-2.91.1/
- Install homebrew from https://brew.sh/
- Install libffi using homebrew:
brew install libffi - Install xquartz using homebrew:
brew install --cask xquartz - Go to your yabasic-2.91.1/ folder. Run
./runme. This installs ayabasicexecutable. - Type
./yabasicto open theyabasicinterpreter - Alternatively, if you have
.yabfile, run./yabasic yourfile.yab
Note: The game code here is intended for those new to programming: heavy commenting, global variables, magic numbers, and verbose programming style abound.
This is a simple economic simulation game inspired by Star Trader and Dope Wars/Drug Wars.
This is a cybernetic hoss-racing gambling game inspired by Quibble Race in the games collection UFO 50.
This is a desert travel survival adventure game, and the second time I've programmed this game. It is in the style of the game Oregon Trail. I programmed the first version of Gobi as a web-based game and now ported it to Basic. It was originally inspired by an unknown Shareware game that I had on a CD-Rom of hundreds of Mac games in the mid-90s, now lost to time and memory.
This is a light port of the original 1973 version of Hamurabi published in Basic Computer Games. Detailed notes at the end of this document. The source code for the original was published by David Ahl.
This is not a game but a lifting of the source code comments/remarks from Oregon Trail and then an attempt to write a modern version of the hunting simulation algorithm in Yabasic.
Not much of a game. This is an extremely simple simulation of the dice game Pig, for one player! The goal was to teach how to set up a recurring game loop.
Not a game! Pretty much a "Hello World" program to introduce Yabasic to an audience.
Also not a game. This demonstrates random number generation.
- Basic Computer Games by David Ahl
- McCracken, Harry. “Fifty Years of BASIC, the Programming Language That Made Computers Personal.” TIME, 29 Apr. 2014, https://time.com/69316/basic/.
- Birth of Basic. Directed by Mike Murray and Dan Rockmore, Dartmouth
- People’s Computer Company. What to Do After You Hit Return (1975). 1975. Internet Archive, http://archive.org/details/Whattodoafteryouhitreturn.
- “Star Trader.” Wikipedia, 16 Feb. 2025. Wikipedia, https://en.wikipedia.org/w/index.php?title=Star_Trader&oldid=1275966462.
- Porting 47 Year Old Basic code from The Oregon Trail
- Explorations in TinyBasic
King of Sumeria or The Sumer Game was originally written by Doug Dyment in the Focal language for DEC computers in 1968.
The game consists of ten rounds wherein the player, as the ancient Babylonian king Hammurabi, manages how much of their grain to spend on crops for the next round, feeding their people, and purchasing additional land, while dealing with random variations in crop yields and plagues. The Sumer Game was inspired by The Sumerian Game, a much more in-depth text-based economic simulation intended for children, developed from 1964 to 1966 by designer and elementary school teacher Mabel Addis and IBM programmer William McKay.
Around 1971 David Ahl ported the game to DEC BASIC, and then published it in his classic type-in program book 101 BASIC COMPUTER GAMES in 1973 and in expanded form in Microsoft BASIC in 1978 for BASIC Computer Games.
I was able to translate Hamurabi from its original code in BASIC Computer Games to Yabasic with only minor changes needed.
These were:
- I added more spacing for better formatting in the print around variables in PRINT lines with concatenation, and changed all semicolon separators to commas.
- Any line with a conditional and implied goto jump needed an explicit
GOTOandENDIFfunctions added. For example:if L<7 THEN 565' needed to be changed toIF L<7 THEN GOTO 565 ENDIF` in Yabasic. RND(1)is translated toran()in Yabasic.- After some tests with various BASIC emulators I believe
PRINT CHR$(7)produces a bell sound, so I translated line 990 tobellin Yabasic, however I couldn't get this to produce sound on my computer.