Package: pygamelib
pygamelibA (not so) small library for terminal based game development.Preemptive warningVersion updates always bare the possibility of bringing some breaking changes together with new features and improvements. We try to limit these but when they do occur they are documentedon the wiki.IntroductionHistorically, this library is used as a base to teach coding to kids from 6 to 15.
It aims at giving an environment to new and learning developers (including kids) that let them focus on the algorithm instead of the lousy display or precise management.It started as a very simple library with very little capabilities, but over time it became something more. To the point that it is now possible to make very decent games with it.
So this isobviouslystill extremely simple compared to other game framework and it still does not aim at being anything serious for real game developers.
However, it can now be used by aspiring game developers for an introduction to 2D games development.There is aYoutube channelthat (will) contains tutorials.Here is a quick view of what can currently be achieved with that library:Have a look at theexamples/directory to see how most of these games have been done!If you want a quick peak at the new features in the most recent version, have a look at this:Strong pointsHopefully you'll find the pygamelib to have a lot of strong points:It issimple. It requires very limited Python knowledge to start coding games.Yetpowerfuloffering more advanced programmers alotof possibilities.The possibilitiesscale up with the studentsoffering basic feature and default values "good enough" for beginners and lots of tunning opportunities for the advanced coders.Lots of stuff are availableby default. Any idea how long it would take a beginner to display only a part of a board? 1 second with the pygamelib, probably slightly more if they had to do it by hand ;)It isTerminal based. This means no graphics card dependencies, cross platform, and a framework that stimulate imagination and creativity.Installation (recommended)The easiest way to install a stable version is to usepypi:pip3installpygamelibIt will pull all dependenciesInstallation from sources and requirementsPythonThe pygamelib only supports Python 3.6+. It willnotrun with Python 2.
We usepipenvto manage dependencies.Run Pipenv to install the requirements:pip3installpipenv
pipenvinstallIf you want the development dependencies you need to run:pip3installpipenv
pipenvinstall--devOr you can just runmake devenvif make is available on your system.Runing testsTo run the unit tests use the following command:python-munittestdiscover-stestsTerminal color and emojisIt is not really a hard requirement but colored emojis are really bringing the games created to life.We then recommend to have a color emojis font installed like Noto Color Emojis (on most Linux distributions you can install it from the package manager, search for "noto-color-emoji").If your terminal application is not displaying color emojis, please have a look at thisfileand follow the instructions.Running examplesTo run the examples usingpipenv:pipenvshell(pygamelib)cdexamples/suparex(pygamelib)python3suparex.pyLimitationsThere is tons of limitations but for the most important ones:Only one player is supported.There is little protections against messing up with the internal. This ison purpose, I want the kids to learn to use the API not mess up with the internals of every single class.It's pure Python (it's slow).