Open Source Games
Jan. 10th, 2019 11:56 amLet's talk about Free and Open Source games. I thought I covered some of these when I discussed programs that work with various GUIs such as SDL and FLTK. However, looks like I left many out of my lists. So, here are some games I've found interesting. They're cross-platform and don't require a ton of resources to build and run. So, they should work fine on low resource or older machines as well as the newer ones. I tend to prefer educational games, but there should still be a good mix of different types of games in the list. If you have other lightweight cross-platform favorites, I would be interested to hear about them. You're welcome to discuss the topic of C/C++ games further on the CPPDesign mailing list ( https://groups.yahoo.com/neo/groups/CppDesign/info ).
I have patches for several of these to fix bugs such as memory leaks and to add support for later versions of libraries. Some of my patches are available online. If you're interested in others that I have not uploaded yet, you can let me know via the CppDesign mailing list.
FLTK BASED GAMES
Checkers and sudoku come with FLTK as examples.
fltkmm
Mastermind game. This is one of the more lightweight versions of Mastermind that I could find that's still intuitive to play. There are some ncurses/PDCurses alternatives and some SDL alternatives, but I haven't found any I like yet.
I have patches to make this work with the latest version of the FLTK library.
https://www.muquit.com/muquit/software/fltkmm/fltkmm.html
wordsearch
I've been able to port this to DOS using DJGPP. It also works fine on Windows, Linux and BSD.
http://agtoys.sourceforge.net/wordsearch/wordsearch-2.2.html
qubix
While this ports without modifications to several platforms using Nano-X support for FLTK, I've been experimenting with patches and a port to use OpenGL/PicoGL as an alternative GUI. The program was originally written for a system that had Display Postscript support so it ports very easily to a graphics API like OpenGL.
https://www.fltk.org/links.php?V153+Q
npuzzle
http://jlehtinen.net/agenda/
SDL BASED GAMES
SDL is great toolkit for games and there are several nice games that work with it. Many of the games I've listed were written for SDL 1.2.x. I have patches in various states to get them working with version 2.x as well.
lpairs
http://lgames.sourceforge.net/LPairs/
scramble, hangman, concentration, torrent
These games are by the same author and use a similar back-end. I've made a library out of the shared code and am in the process of debugging ports to SDL 2.x.
pong
A copy of the original source and my SDL 2.x patches are available from the archive link at:
http://www.distasis.com/cpp/lmports.htm
Was also able to get this working for Android, but it requires a tablet with a keyboard.
drac
Basic solitaire card game.
I have patches for porting this to SDL 2.x as well. Was also able to get this working on Android systems.
https://github.com/ricoz/drac/
yahtzee
Works with SDL, ncurses/pdcurses or via command line. I have patches for using this with SDL 2.x.
https://www.muppetlabs.com/~breadbox/software/yahtzee.html
dual-n-back
This is a game, but it's also supposed to help improve memory.
https://sourceforge.net/projects/dualnbacklite/
tuxmath
A copy of the source and my SDL 2.x patches plus several memory and bug fixes and some modificiations for library updates are available from the archive link at:
http://www.distasis.com/cpp/lmports.htm
My patched version runs on Windows as well as Linux/BSD. The original source crashed on Windows.
Emilia pinball
I have patches porting this to SDL 2.x. I also improved Allegro support enough to build on DOS with DJGPP. I have an alternative build that works with SDL and picogl for systems that may not have easy access to an OpenGL library or mesa.
https://sourceforge.net/projects/pinball/
jooleem
I was looking for a bejeweled style game and this was the only one I found so far that I really liked.
https://sourceforge.net/projects/jooleem/
eremit
http://www.murga-linux.com/puppy/viewtopic.php?t=8724
anagramarama
https://github.com/Anagramarama/anagramarama
ReMined
https://sourceforge.net/projects/remined/
sopwith
http://sdl-sopwith.sourceforge.net/
PDCURSES/NCURSES/BSDCURSES GAMES
There should be several good games in this category but so far I just have one on my list. Please feel free to recommend your favorites in this category.
starlanes
This started out as a game written in BASIC with a few variants available. The version mentioned here is a variant that's been ported to C.
https://web.archive.org/web/20191230071944/http://www.barnsdle.demon.co.uk/game/starlanes.html
WIN32 GAMES
To make WIN32 applications work cross-platform, you'll need nano-x or winelib. The win32api is available with Open Source compilers such as MinGW on Windows sytems.
pyramid
This is a public domain solitaire-style card game. I'm currently working on converting this to run with SDL/OpenGL as the backend (instead of Win32) so I can more quickly and easily port it to other systems such as Android. It will make a nice test case for the GUI library I'm working on. If anyone's interested in status of the port, feel free to contact me about it.
http://jdmcox.com/
I have patches for several of these to fix bugs such as memory leaks and to add support for later versions of libraries. Some of my patches are available online. If you're interested in others that I have not uploaded yet, you can let me know via the CppDesign mailing list.
FLTK BASED GAMES
Checkers and sudoku come with FLTK as examples.
fltkmm
Mastermind game. This is one of the more lightweight versions of Mastermind that I could find that's still intuitive to play. There are some ncurses/PDCurses alternatives and some SDL alternatives, but I haven't found any I like yet.
I have patches to make this work with the latest version of the FLTK library.
https://www.muquit.com/muquit/software/fltkmm/fltkmm.html
wordsearch
I've been able to port this to DOS using DJGPP. It also works fine on Windows, Linux and BSD.
http://agtoys.sourceforge.net/wordsearch/wordsearch-2.2.html
qubix
While this ports without modifications to several platforms using Nano-X support for FLTK, I've been experimenting with patches and a port to use OpenGL/PicoGL as an alternative GUI. The program was originally written for a system that had Display Postscript support so it ports very easily to a graphics API like OpenGL.
https://www.fltk.org/links.php?V153+Q
npuzzle
http://jlehtinen.net/agenda/
SDL BASED GAMES
SDL is great toolkit for games and there are several nice games that work with it. Many of the games I've listed were written for SDL 1.2.x. I have patches in various states to get them working with version 2.x as well.
lpairs
http://lgames.sourceforge.net/LPairs/
scramble, hangman, concentration, torrent
These games are by the same author and use a similar back-end. I've made a library out of the shared code and am in the process of debugging ports to SDL 2.x.
pong
A copy of the original source and my SDL 2.x patches are available from the archive link at:
http://www.distasis.com/cpp/lmports.htm
Was also able to get this working for Android, but it requires a tablet with a keyboard.
drac
Basic solitaire card game.
I have patches for porting this to SDL 2.x as well. Was also able to get this working on Android systems.
https://github.com/ricoz/drac/
yahtzee
Works with SDL, ncurses/pdcurses or via command line. I have patches for using this with SDL 2.x.
https://www.muppetlabs.com/~breadbox/software/yahtzee.html
dual-n-back
This is a game, but it's also supposed to help improve memory.
https://sourceforge.net/projects/dualnbacklite/
tuxmath
A copy of the source and my SDL 2.x patches plus several memory and bug fixes and some modificiations for library updates are available from the archive link at:
http://www.distasis.com/cpp/lmports.htm
My patched version runs on Windows as well as Linux/BSD. The original source crashed on Windows.
Emilia pinball
I have patches porting this to SDL 2.x. I also improved Allegro support enough to build on DOS with DJGPP. I have an alternative build that works with SDL and picogl for systems that may not have easy access to an OpenGL library or mesa.
https://sourceforge.net/projects/pinball/
jooleem
I was looking for a bejeweled style game and this was the only one I found so far that I really liked.
https://sourceforge.net/projects/jooleem/
eremit
http://www.murga-linux.com/puppy/viewtopic.php?t=8724
anagramarama
https://github.com/Anagramarama/anagramarama
ReMined
https://sourceforge.net/projects/remined/
sopwith
http://sdl-sopwith.sourceforge.net/
PDCURSES/NCURSES/BSDCURSES GAMES
There should be several good games in this category but so far I just have one on my list. Please feel free to recommend your favorites in this category.
starlanes
This started out as a game written in BASIC with a few variants available. The version mentioned here is a variant that's been ported to C.
https://web.archive.org/web/20191230071944/http://www.barnsdle.demon.co.uk/game/starlanes.html
WIN32 GAMES
To make WIN32 applications work cross-platform, you'll need nano-x or winelib. The win32api is available with Open Source compilers such as MinGW on Windows sytems.
pyramid
This is a public domain solitaire-style card game. I'm currently working on converting this to run with SDL/OpenGL as the backend (instead of Win32) so I can more quickly and easily port it to other systems such as Android. It will make a nice test case for the GUI library I'm working on. If anyone's interested in status of the port, feel free to contact me about it.
http://jdmcox.com/