A Game In Progress

New Gfpoken, Ngfp, Pyglet, And Python

TABLE OF CONTENTS

INTRODUCTION:

I wanted a project for learning more Python (a programming language) that also involved some sort of graphics since I had not done anything like it before.

Gfpoken was written in C (another much older programming language) and I liked playing it from time to time. So looking around I tried out Pyglet (a Python package for doing graphics and other things) and that was fun enough so I dove in and rewrote Gfpoken in Python 3.

Ngfp is New Gfpoken. Ngfp is a marble logic puzzle game.

BACK TO TOC

THE GOAL:

Simple (or not so simple) to solve the puzzle by placing mirrors which can change the direction a marble moves through the grid.

BACK TO TOC

HOW TO PLAY:

Starting a new game brings up an empty grid which you need to place the mirrors on the right. Clicking on them will let you pick up and drop them (you do not need to keep the mouse button pressed down to move something). You can also rotate existing objects on the guess grid by right clicking the mouse on them.

To find out where to place the mirrors you left click any white square along the edge of the guess grid to start a marble rolling through the grid. It will give you indications arrows of where the marble goes in and most of the time it will also give an indication arrow of where the marble should come out (some mirrors absorb the marble or some arrangements of mirrors can set up a loop which means there will not be an exit indication arrow). The marble showing on the screen is what interacts with the mirrors you have placed so until you have solved the puzzled the marble may end up in a different location than the exit indication arrow.

You have to use all of the mirrors listed on the right side of the screen. Sometimes you can have a solution which is a functionally identical match and that counts as a winner for this game along with an exact match.

Instructions and help are available in the game (clicking on the ? icon will give a short help screen - pressing F1, ? or H will give a longer help screen).

BACK TO TOC

RUNNING THE GAME:

For Posix/Linux/Unix type systems:

Opening a terminal and using the command “runngfp” should start it.

For Windows type systems:

Opening the command shell and using the command “runngfp” (or perhaps “runngfp.exe”) should start it (but because I do not have a Windows system I have not been able to test this myself to verify things yet).

BACK TO TOC

CONFIGURATION:

You can change the difficulty and size of the game via the Configuration dialog screen.

For Posix/Linux/Unix type systems:

Everything should work. See the About screen (question mark icon) and Help screens for more details.

For Windows type systems:

Not working yet. The game should run and be able to change the configuration but you cannot save or load the configuration (you can edit config.py to change the defaults if you install the source code version of ngfp).

BACK TO TOC

LOADING AND SAVING GAMES:

For Posix/Linux/Unix type systems:

Everything should work. See the About screen (question mark icon) for locations where games are stored.

For Windows type ystems:

I am still working on getting everything set up for Windows but Ngfp should still work as long as you don’t try to load or save a game.

BACK TO TOC

PYTHON, C, ENVIRONMENTS AND DEPENDENCIES]:

For Posix/Linux/Unix type systems:

If the binary wheel supplied via pip3 isn’t suitable for your computer architecture you will need a C compiler for getting Ngfp properly installed. Python 3 is also needed if for some reason it is not already installed.

I always recommend setting up a Python virtual environment to help keep projects isolated from the system’s Python setup.

Most Posix systems have Python 3 and a C compiler already installed so you may only need to get Ngfp and the dependencies via using pip3.

I’m unsure of what commands all of the various distributions use to install packages, but for Debian GNU/Linux I use apt install or apt-get install. Once you have the python3 and gcc packages available then pip3 install ngfp should bring in the rest of the needed dependencies.

For Windows type ystems:

I am still working on getting everything set up for Windows but Ngfp should still run. The problems of getting a binary compatible wheel done have not yet been figured out yet either, but if you can make it through installing Python 3 and the Windows C compiler then it should also run.

BACK TO TOC

PROJECT CODE AND BUG REPORTING:

The above is meant to only be a quick summary of how things are as most of the instructions for running the game are included in the game itself. Eventually I will also have the manual page working for a Posix/Linux/Unix type system for more details (it is in the source code version already not sure if it gets installed correctly yet) and also I should get the Windows aspects figured out.

Other goals of this project have been to learn new things like how to use git and how set up a public place for this code at:

https://salsa.debian.org/ant-guest/gfpoken-in-python

You can also get Ngfp directly as a Python module/package from:

https://pypi.org/project/ngfp/

I try to keep the TODO file up to date with what is being worked on, but also happy to have help or issues filed via the bug tracker/issues functions or sent to me via e-mail.

BACK TO TOC