Pyskool

A remake of
Skool Daze and Back to Skool

Pyskool rescaled

Soup of the day

Pyskool 0.5 has been released. Copies are waiting over at the download page.

The main change since 0.4 is the addition of an in-game menu. Pressing F10 will bring up the menu, whereupon you are presented with suitably labelled items bound to the following operations:

  • Resume the game
  • Save the game
  • Load the most recently saved game
  • Increase the scale of the screen
  • Decrease the scale of the screen
  • Quit Pyskool

To move between items, use the up and down arrow keys. To execute an item, press Enter. To hide the menu, press Escape (or F10 again).

Other changes include the ability to increase or decrease the scale of the screen while Pyskool is running (thus enabling the related menu items to actually work as advertised), and the exposure of the game key bindings (q - Up, a - Down etc.) in the Keys section in the new global ini file, pyskool.ini. (Before 0.5, the key bindings were sort of hidden in the keys module, where non-programmers may have feared to tread.)

The plan for 0.6 is…undecided at the moment. I think the menu could be improved - by adding submenus that make saving to and loading from specific files somewhat easier, for example - so I might work on that. Or I might give the stock graphics a bit of a makeover (which could take some time, since I’m no artist). We’ll see. In the meantime, enjoy ordering from 0.5’s menu.

Pyskool reloaded

SAVE "game": LOAD ""

Pyskool 0.4 has been released. The download page has a copy waiting for you.

The main addition since 0.3 is the ability to save and load games. In my opinion, this is the best feature yet, since it makes playtesting much less time-consuming: save the game at a critical point, and then reload upon demand until happy with how things unfold. Being able to save games is also handy for regular playing too, of course. Maybe you need only one more shield in Skool Daze (or Back to Skool Daze), but it’s 9pm and therefore time for bed; instead of starting over when you get home from skool the next day, just save the game, and load it again whenever you’re ready.

Anyway, here are the things you need to know to enjoy the save/load feature:

  • Press F2 to save a game

  • Press F6 to load the most recently saved game

  • To load a specific previously saved game from the command line, use the -l option, e.g.:

    $ skool_daze.py -l save/skool_daze/pyskool-0.4-20100528-123456.sav
    
  • To load the most recently saved game in a given directory from the command line, use the -r option, e.g.:

    $ back_to_skool_daze.py -r save/back_to_skool_daze
    

By default, games are saved in a directory called save/game_name (where game_name is the name of the game), but you can change that by setting the SaveGameDir parameter in the GameConfig section in config.ini.

Other changes in 0.4 include:

  • Skool Daze mode now uses the speech bubble graphic and jagged message box extracted from the original game (thus raising Pyskool’s faithfulness coefficient a little)
  • The score box is drawn using labels defined in the MessageConfig section in messages.ini (thus enabling localisation of that text)

The plan for 0.5 is to add some kind of in-game menu, at the very least offering options to resume a paused game, save the current game, and load the most recently saved game (so you need only remember the ‘menu’ key instead of the keys for all those operations). But plans are subject to change, so I wouldn’t recommend betting your house, career, life or other valuable item on it happening.

Tweakability, Maximum

Cheat, 0; MaxLines, 100

Pyskool 0.3 has been released. Visit the download page to get a copy.

The main change since 0.2.4 is the addition of over 100 configuration parameters and command arguments to tweak in the ini files. Note: ini files (plural), which is the other thing: the monolithic ini file has been split up into multiple ini files in a single directory:

  • command_lists.ini - command lists
  • config.ini - configuration parameters
  • font.ini - font character bitmap descriptions
  • lessons.ini - the main timetable and lessons
  • messages.ini - messages
  • skool.ini - walls, floors, doors and other parts of the skool
  • sprites.ini - sprite and character definitions

This split makes it easy (for example) to drop in a complete replacement for all the messages in a game simply by replacing messages.ini. And having all the messages in a single file will make it easier (for example) to create a localised version of a Pyskool game. (You’d need to create a new skool font too; perhaps I should start looking for some free bitmap fonts to distribute with Pyskool so that we can have Monsieur Roquitte teaching la chimie some day.)

0.3 also includes a couple of utility scripts: createini.py, which I use to generate and maintain the ini files; and extract-png.py, which extracts graphics from memory snapshots of the original skool games and creates PNG files (like the ones included in Pyskool).

Looking forward to 0.3.1 (or 0.4, as it may be), I have been experimenting a bit with Python’s pickle module recently to see if it could work as a back-end for saving and restoring games. I’m not sure yet if it’ll be up to the job, but we’ll see.