RISC World

Games World

Paul Brett with the latest gaming news.

Last issue I said things were likely to be a bit quiet on the gaming front, how wrong I was!

StarFighter 3000 V3

A new release of StarFighter is imminent as you read this issue. This new release not only includes a number of new bug fixes but is also Iyonix compatible, which has to be good news! StarFighter is published by APDL and I note with interest that an increasing number of their titles have been converted to 32Bit over the last few months (and there are more to come - ED). Still let the author Chris Bazley tell us in his own words.

"The game is now compatible with all modern RISC OS machines, from the humblest OS 3.1 A5000 to the next generation of 32-bit only machines such as the XScale powered Iyonix PC. On StrongARM machines with OS 4 the game takes control of screen memory caching in order to give enhanced performance. All aspects of the game that relied upon a 50Hz monitor refresh rate have long since been rewritten to use more reliable timing methods."

"A multitude of minor bugs have been fixed, including many that date back to the very first Fednet versions of the game. Two that justifiably achieved notoriety are the missiles-blowing-up-on-launch bug and the lasers-passing-through-satellite bug; both have now been fixed. In addition, the game has been enhanced by the discovery of several features that were formerly broken, such as proper runway taxiing by enemy fighters, missile launch from big ships and mouse control auto-centring."

"The game now integrates fully into the RISC OS desktop, with a comprehensive style-guide compliant user interface provided by the Acorn Toolbox. You can play the game in full screen mode, or in a window whilst other applications continue to run in the background. Standard 'save' and 'scale' dialogue boxes provide facilities to take screen shots and scale the viewing window to any size."

This all sounds like great news for RISC OS games players, as StarFighter is still one of the most popular RISC OS games ever.


Now a real treat for RISC OS gamers...

"Prepare yourself for a grand adventure: Ultima IV, sixteen times larger than Ultima III, is a milestone in computer gaming. Lord British has produced a game to challenge, not only your physical and mental skills, but the true fabric of your character. The evil triad of Mondain, Minax, and the hellspawn Exodus, have been vanquished and peace reigns throughout the land of Britannia. Evil yet abounds, but in isolated pockets and in the hearts of men. A new age awaits the coming of one who can conquer evil on all frontiers through the mastery of both magic and the use of force. Daemons, dragons and long-dead wizards still plague the countryside and must be destroyed. The seeker on the path of the avatar will faces hostile groups composed of mixed enemy types and will survive such encounters only by strategic use of weapons and terrain. Earthly victories over seemingly impossible odds lead to the final conflict, where the ultimate challenge -- the self -- awaits..."

Back cover of Ultima IV box

XU4 is a remake of the computer game Ultima IV. The goal is to make it easy and convenient to play this classic on modern operating systems. XU4 is primarily inspired by the much more ambitious project Exult. Linux is the primary development platform but it gets ported to Windows and MacOS X regularly. It should be trivial to port to any system with SDL support.

XU4 isn't a new game based on the Ultima IV story, it is a faithful recreation of the old game, right up to the crappy graphics. If you are looking for a game with modern gameplay and graphics, this is not it...yet. New features that improve the gameplay and keep with the spirit of the original game will be added. XU4 also tries to maintain strict compatibility with the original for its savegame files. You can use a game saved in XU4 with the original and vice versa.

XU4 has been ported to RISC OS by Alan Buckley and is part of the Unix Porting Project famous for converting many other programs to RISC OS. Once again RISC OS games players have been done proud by having such a classic game on our platform. In order to run the game you will need the SharedUnixLibrary and the UnixHome application which are in the Unix archive in the games directory.


Firstly, what is Popcorn? It's a library designed to help people write games in C. Programs written in C are generally faster than those written in BASIC, but much easier to cope with than writing ARM assembler. And modern RISC OS machines are fast enough that a game written mostly in C will still run at an acceptable speed. So C is probably the best choice for aspiring RISC OS games authors. Popcorn itself contains some assembler for the speed crucial parts, like graphics plotting.

Hive - a sample PopCorn game

Popcorn has four main parts, although the boundaries between them are a little blurred in places. These are:

  • The resource manager
  • The object manager
  • The sprite plotter
  • And other useful things

The resource manager

The resource manager is not as complicated as it might sound. Its purpose is to simplify loading files that your game needs. These files could be graphics, sound effects, or anything else.

All the resources your game uses must be listed in a text file, which Popcorn reads at startup. You can organise the resources into "groups", and then request Popcorn to either load or free a particular group. There's a call to find the address that a particular resource has been loaded at, so you can then use it just like any other data loaded into memory.

The sprite plotter

Popcorn contains a fast sprite plotter, written in assembler for speed. It supports sprite masks, for transparent areas, and also can use an arbitrary clipping rectangle. The plotter uses a special graphics format, to speed up plotting, but you don't need to worry about this because normal RISC OS sprites are automatically converted to this format when they are loaded by the resource manager.

Normally you don't even need to use the sprite plotting routines yourself, as the object manager will call them for you in most situations.

The object manager

This is possibly the most complicated part of Popcorn. Understanding how to use the object manager is mainly a matter of thinking about your game design in a particular way. Take, for example, a "Space Invaders" style game. Each alien would be represented by a Popcorn object. The bombs that the aliens drop would also be objects, as would the player's missile base.

But you need not stop there. Presumably you would also want a screen display of the player's remaining lives and score. Each number in the score display could be an object too. Objects need not have any graphics associated with them, so for example in a game with a playing area larger than the screen, you could use an object as the "camera" to keep track of what part of the game area to display on screen.

Objects have certain properties, the most obvious would be their position in the game area, they also can have a velocity. They have a size, which is used for collision detection, and they have a timer which can be used for many purposes.

Objects can also have a sprite, or series of sprites, associated with them. This allows Popcorn to automatically plot the objects' sprites without the programmer needing to write any special code.

If an object does require special treatment in some way, a handler function can be declared. When certain conditions are met, Popcorn will call your handler function to allow you to react to whatever condition it was. For example, in a space invaders game, the handler for the "alien" object could be called whenever the object was about to move off the screen, and reverse the objects direction, thus making the aliens move back and forth across the screen.

Other useful things

Popcorn also contains a few useful routines that don't fit into any particular category. For example, there's a call to change the screen mode, while saving the old mode so you can restore it later. This helps to make your games "desktop friendly". There's also a call to read the keyboard, like BASIC's INKEY function.

For more details on Popcorn have a look at the documentation, including the full tutorial on how to make a "Pong" game.


We will finish off this issue with another great slice of infuriating gaming from Neil White (Nex), in this case all you have to do is guide a small block from one place to another, how easy can that be?


Signing off

That is it for this GamesWorld, see you next time.

Paul Brett