Author Topic: 21C - New Open Source BlackJack/21 Game For Mac OS 8+ & more  (Read 2844 times)

Offline alexfree

  • Enthusiast Member
  • ***
  • Posts: 37
  • New Member
21C - New Open Source BlackJack/21 Game For Mac OS 8+ & more
« on: September 28, 2020, 01:25:30 AM »
This is the first game I've ever written. Since I wrote it in C89 I got it portable enough to compile with Macintosh Programmer's Workshop. Let me know if you encounter bugs/fun with this!

https://macintoshgarden.org/games/21c

21C by Alex Free
1.0 Release - September 28th 2020

==About==
A portable and open source command line game of Blackjack/21 written in Ansi C/C89.

==Release - Compatibility==
- 21c_1.0_win32 - Windows 95-Windows 10 (64 & 32-bit)
- 21c_1.0_classic_mac_os - 68k/PPC universal SIOW app for Mac OS 8+
- 21c_1.0_mac_os_x - PPC, x86, x86_64 universal executable for Mac OS X 10.3-Mac OS X 10.15 (10.16/arm with rosetta
unknown)

==Features==
- 'Infinite' deck to draw from
- Infinite splitting
- Dealer hits until 16
- Early surrender (late surrender turned out to not be fun)
- Bet and save your balance and pick up where you left off later
- BSD 3-Clause License, Ansi/C89 100% compilant
- Saving:
When you save, a file named 'save.txt' will be generated in the current directory. If 'save.txt'
is in the current directory when executing '21c' you will be prompted to load it if so desired.

==License==
3-Clause BSD License, see 'license.txt'

==SOURCE INFO==
Tested To Compile With:
- Macintosh Programmer's Workshop 3.0 GM (MrC - PowerPC, SC - 68k) (Classic Mac OS)
- Xcode 3.0/1.5 (GCC 4.04) (Mac OS X)
- DevCPP 4.99.5 (GCC 3.4.2) (MiniGW/Windows 95 OSR 2.5+)

This should essentially compile on any OS with a C89 compilant compiler.

Each folder contains the same source file '21c.c' in a different EOL format.
- eol_cr contains the classic Mac OS EOL format.
- eol_crlf contains the Windows EOL format.
- eol_lf contains the unix EOL format.

Universal Mac OS X/Mac OS 11 compile:

gcc -mmacosx-version-min=10.3 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch ppc64 -arch i386 -arch x86_64 -o 21c 21c.c

Compatibility
Architecture: 68k PPC x86 (Intel:Mac) x86 (Windows)
Mac OS 8+
Mac OS X 10.3.9+
Windows 95 OSR 2.5+
Mac Mini G4 early 2005 - 1.42GHZ w/ 1GB RAM - Triple booting Mac OS 9.2.2, Mac OS X 10.3.9 & 10.4.11

Offline alexfree

  • Enthusiast Member
  • ***
  • Posts: 37
  • New Member
Re: 21C - New Open Source BlackJack/21 Game For Mac OS 8+ & more
« Reply #1 on: September 30, 2020, 02:06:17 AM »
I present to you all version 1.0.1!
21C by Alex Free
1.0 Release - September 28th 2020
1.0.1 Release - September 30th 2020

==About==
A portable and open source command line game of Blackjack/21 written in Ansi C/C89.

==Release - Info==
- 21c_1.0.1_src - Source
- 21c_1.0.1_src_1.44mb_floppy - Source floppy image
- 21c_1.0.1_win32 - Windows 95-Windows 10 (64 & 32-bit)
- 21c_1.0.1_dos16 - DOS/some Windows versions (DOS 3.30+)
- 21c_1.0.1_dos16_1.44mb_floppy - DOS/some Windows versions (DOS 3.30+) floppy image
- 21c_1.0.1_classic_mac_os - 68k/PPC universal SIOW app for Mac OS 8+
- 21c_1.0_mac_os_x - PPC, PPC64, PPC750, PPC7400, PPC7450, PPC970, i386, x86_64 universal executable
for Mac OS X 10.3.9-Mac OS 11 (ARM requires Rosetta and is untested but should work).

==Features==
- 'Infinite' deck to draw from
- Infinite splitting
- Dealer hits until 16
- Double Down on an intial sum of 9, 10, or 11
- Insurance bet if the Dealer's first card is an Ace
- Early surrender (late surrender turned out to not be fun)
- Bet and save your balance and pick up where you left off later
- BSD 3-Clause License, Ansi/C89 100% compilant
- Saving:
When you save, a file named 'save.txt' will be generated in the current directory. If 'save.txt'
is in the current directory when executing '21c' you will be prompted to load it if so desired.

==License==
3-Clause BSD License, see 'license.txt'

==Changelog==
Version 1.0.1
- fixes dealer hit bug
- fixes save bug
- improves data input methods and bugs
- adds DOS support (not just MSDOS!)

==Building==
Tested To Compile With:
- Macintosh Programmer's Workshop 3.0 GM (MrC - PowerPC, SC - 68k) (Classic Mac OS 8-9.2.2)
- Xcode 3.0 (Apple GCC 4.0) (Mac OS X 10.3.9+)
- DevCPP 4.99.5 (MingW GCC 3.4.2) (Windows 95 OSR 2.5+)
- TurboC++ 3.0 (TCC 3.0) (DOS 3.30+)

This should essentially compile on any OS with a C89 compilant compiler.

Each folder contains the same source file '21c.c' in a different EOL format:
- eol_cr contains the Classic Mac OS EOL format.
- eol_crlf contains the Windows/DOS EOL format.
- eol_lf contains the Unix EOL format.

Universal Mac OS X 10.3.9+ compile one liner:
gcc -mmacosx-version-min=10.3 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch ppc64 -arch ppc750 -arch ppc7400 -arch ppc7450 -arch ppc970 -arch i386 -arch x86_64 -o 21c 21c.c

Compatibility
Architecture: 68k PPC x86 (Intel:Mac) x86 (Windows)
Mac OS 8+
DOS 3.30+
Mac OS X 10.3.9+
Windows 95 OSR 2.5+

Mac Mini G4 early 2005 - 1.42GHZ w/ 1GB RAM - Triple booting Mac OS 9.2.2, Mac OS X 10.3.9 & 10.4.11

Offline teroyk

  • Platinum Member
  • *****
  • Posts: 623
  • -
Re: 21C - New Open Source BlackJack/21 Game For Mac OS 8+ & more
« Reply #2 on: September 30, 2020, 09:07:22 AM »
You might interested in this Ansi C game lib and games:
https://github.com/Fabrizio-Caruso/CROSS-LIB/blob/master/docs/SYSTEMS.md
It still missing versions for Mac OS 9 so get contacted that developer.

Offline ovalking

  • Gold Member
  • *****
  • Posts: 210
  • new to the forums
Re: 21C - New Open Source BlackJack/21 Game For Mac OS 8+ & more
« Reply #3 on: October 01, 2020, 11:50:58 AM »
Well done on creating your first game Alex.
But I lost money - reckon the dealer was cheating.

Offline Fabrizio Caruso

  • Newcomer
  • Posts: 1
  • New Member
Re: 21C - New Open Source BlackJack/21 Game For Mac OS 8+ & more
« Reply #4 on: October 02, 2020, 01:19:13 AM »
You might interested in this Ansi C game lib and games:
https://github.com/Fabrizio-Caruso/CROSS-LIB/blob/master/docs/SYSTEMS.md
It still missing versions for Mac OS 9 so get contacted that developer.
@teroyk My universal library and retro-hardware abstraction layer CrossLib is primarily meant for 8-bit systems but it also has some initial and minimal support for 16/32 systems. You can compile games written with CrossLib for some generic Linux ELF Motorola 68020 targets as well as some 68000/8 targets such as the Amiga, Atari ST and Sinclair QL. This is just an initial support and the current result is just a version of the game that runs on the console and uses ASCII characters for graphics.
I will eventually try to add real graphics on some of these systems but it does not have the highest priority.
CrossLib is meant for games with simple sounds and simple tile-based graphics (smooth animations are possible through pre-shifted tiles). This makes sense on 8-bit computers and less less on powerful 16/32 bit targets.


Offline alexfree

  • Enthusiast Member
  • ***
  • Posts: 37
  • New Member
Re: 21C - New Open Source BlackJack/21 Game For Mac OS 8+ & more
« Reply #5 on: October 02, 2020, 07:30:38 AM »
Well done on creating your first game Alex.
But I lost money - reckon the dealer was cheating.

I’m glad you like it!
Mac Mini G4 early 2005 - 1.42GHZ w/ 1GB RAM - Triple booting Mac OS 9.2.2, Mac OS X 10.3.9 & 10.4.11