Packaging Confessions

posted in: Software | 0

Since June 2002 I have been offering software from my website, http://www.wra1th.plus.com/, to the RISC OS community, namely RiscLua, a port of Lua. New versions have come and gone, http://www.wra1th.plus.com/lua/version.html, to keep up with developments in Lua, and because I have often changed my mind about the best way to present the software for the user’s convenience.

This article is not about Lua but about packaging; it just happens that RiscLua is the only template that I have for discussing the subject. There are many possibilities; I am by no means sure that any of the ones that I have chosen in the past are optimal. In the end it is the user who must be the arbiter of that. So I certainly welcome feedback, and not just from users of RiscLua.

So what does the package contain? There are five main ingredients:

  • Executables – in this case lua, the interpreter, and luac, a bytecode compiler and disassembler.
  • System variables – defining a filetype run-action, so that programs can be run by doubleclicking the icon of a file – LUA_INIT for prelude code, run before any program – LUA_PATH to tell the require function where to find libraries of Lua code, and LUA_CPATH to do the same job for dynamic linking libraries (a feature not available before 2015, and probably of little relevance in the RISC OS context).
  • Utilities – for running in a Taskwindow, for displaying intermediate bytecode, and for linking in libraries and interpreter to produce standalone executables.
  • An HTML/CSS manual for the current version of Lua, with an extension for the non-standard, and in particular the RISC OS, parts of RiscLua.
  • Example programs and tutorial material.

At one point, in 2003, I implemented the interpreter as a relocatable module and used the Resource Filing System for the Obey files setting up the system variables. However I gave up this option when I realized that it was easier to keep other tasks insulated from errors if I implemented it as an application, even in the case of interpreting wimp-tasks. Besides, RISC OS has the convenient system of !Boot files for setting up system variables, defining filetypes and their run-actions and RMEnsuring the existence of resources. It would be daft not to take advantage of this.

To begin with I called the application !Lua. Later, as the versions multiplied and the chances grew that different versions would interfere with each other, I started to use the version number as part of the name, at least for the binary files. So the latest version is named  !rlua7. Then there is the question of where you put the other stuff: the documentation, the utilities and the examples? Inside the application, or outside? These choices are important for ease of updating, both for me and the user.

You might not want to download the whole package just for some trivial correction to the manual. It has been my habit to upload zip files to my website with FTP, so do I have one big zip file or lots of smaller ones? Writing tutorial material is, for me anyhow, a gradual process of many small steps. I suddenly get interested in this or that topic and fire off an addition to the tutorial material or to the examples.

A particularly thorny aspect for me has been the question of software libraries. Luckily Lua has by tradition taken the road of minimalism – provide as little extra possible and leave it to the user to write their own libraries. Provide possibilities not solutions. Lua is often compared unfavorably with Python on this score. But libraries bring into play the question of authority. In a small user-base each user may prefer to knit their own jersey rather than get one off the peg.

So I have been in two minds about providing libraries, not wishing to set them in concrete. This is particularly true of libraries for writing wimp-tasks or for the toolbox  where I have had second thoughts about the best approach quite frequently. Fortunately it is very easy for the user to set up their own libraries, because the require function discovers where to find them by using the strings package.path and package.cpath which the user can modify at the start of her program. The system variables LUA_PATH and LUA_CPATH are only used to initialise these strings.

The way that RiscLua is packaged is actually irrelevant for most uses, which only need to know where the Lua interpreter is and what its commandline arguments should be. A vital consideration, however, is whether the platform on which you use RISC OS has VFP or not. Until 2015 RISC OS only handled floating point calculations in software. In consequence it was never a good choice for intensive number-crunching. But things are different now and so RiscLua has to come in two packages, one for use with VFP and the other for use with the older ARM chips without it.

Under the Microscope: Mutant Penguin

posted in: Games | 0

Originally released in April 2017 and recently updated with a few improvements and 2 new levels, Mutant Penguin is a free release from Amcog Games. It was developed using the AMCOG Games Development Kit which we took a look at recently.

The game itself

Mutant Penguin is a retro maze game with 14 levels inhabited by multicolored slug-like pods – your main objective is to evade each level through squashing the pods with ice blocks. The game comes with 3 original music tracks that add a good level of atmosphere to the game.

The game itself is reasonably simple, there’s not much game logic other than the lives counter and high score system. Not that it’s a bad thing for a game like this – anything more than what’s already in place isn’t really required.

Performance & Compatibility

The game’s gameplay is smooth and stable, it plays as you’d expect for a retro puzzler like this. Longevity-wise, the game’s novelty doesn’t run out as quickly as you might expect, the puzzle element of the game makes it quite addictive, especially in the later levels.

As the game is written in BBC BASIC, it should play fine on a vast majority of RISC OS machines, be it legacy 26-bit computers or 32-bit machines. The game runs well on a Raspberry Pi 2 running RISC OS 5.24 and I’d imagine it should be fine with pretty much any other modern RISC OS compatible board you throw at it – Titanium, Beagleboard etc.

Overall

As you might expect from an Amcog Games title by now, Mutant Penguin is a solid and well-authored game. It successfully delivers that retro feel Anthony at Amcog has worked to achieve.

Mutant Penguin is free to download from the Pling Store. A copy with full source code is also bundled with the AMCOG Games Development Kit.


RISC OS Games Month 2018

August is Games Month on the RISC OS Blog, where we focus exclusively on gaming, be it reviewing new games or taking a trip down memory lane with a look at a classic title. Stay tuned for more games articles throughout August!

DOSBox on RISC OS: A quick guide

posted in: Games | 1

If you fancy playing some retro games from the MS-DOS era, there’s a few options available to you – obviously you can run them on original hardware running DOS, you could install FreeDOS on a modern x86 system or you can play them through the widely popular DOS emulator DOSBox, which is available for RISC OS (it’s the latest version too!).

So seeing as it’s RISC OS Games Month on the RISCOSBlog, it’s only right that we take a look at DOSBox and a few games I recommend.

What is DOSBox?

DOSBox s an emulator which emulates an IBM PC compatible computer running a DOS operating system, many IBM PC compatible graphics and sound cards are also emulated. This means that original DOS programs and games are provided with an environment in which they can run correctly.

You can use DOSBox to run legacy DOS applications although for the most part the only real use case nowadays is to play pre-Windows games, unless you’ve got some ancient DOS-only application that you need to use for work and there’s no modern alternative for it.

It has been reported that people have had Windows 3.11 (Guide) and Windows 95 running on the Raspberry Pi and Pandaboard running RISC OS, albeit quite slowly.

Setup on RISC OS

So there’s two DOSBox ports available for RISC OS. There’s standard DOSBox, which is the latest version but it has been reported to be a little buggy and unstable, as well as slow on some machines (especially Raspberry Pis!). Then there’s FastDOSBox (Site appears to be down at the moment!) which is older but is reported to be more stable and faster. Running in full-screen mode also makes things much faster, so keep that in mind if you’re experiencing performance problems.

Once you’ve downloaded DOSBox and placed it on a location on your RISC OS system, download some games and remember the path on your drive where they’re stored.

In DOSBox, you’ll then need to mount the folder where your DOS games live so that DOS thinks you’ve got an external drive mounted. You can do this by running the command: mount c <location>

Here’s an example of that command specific to RISC OS on my Raspberry Pi: mount c /sdfs::myraspberrypi/$/gamesfolder

Change the SDFS bit to ADFS or whatever is relevant to your system. That command sets that folder up as a C drive.

Once that’s set, you can then move into that directory by running cd gamesfolder.

To run a game stored in that folder, just type the name of the .exe file and press enter.

Where to find games

The legal status of a good chunk of DOS games is questionable nowadays, a lot of them are now considered abandonware and can be downloaded free of charge. There are some however that, while they can be sourced for free online, they are still copyrighted and thus you’ll need to purchase a copy legally or you risk burning in hell for all eternity.

Abandonware Games has a large selection of DOS games available for download. The categories included are action, racing, RPG and strategy games. With about a thousand games to choose from, there’s a whole load of games available to you. You can also search the site by game title or keyword, each game is accompanied by a wealth of information from the year of release to the types of visuals, to how many times it has been downloaded.

After Abandonware Games, DOS Games has one of the biggest collections with over 500 games in its database. The updates are spaced out, but every now and then a load of new games are added.

Recommended games

Star Wars: X-Wing was the first space flight simulator game from LucasArts for the PC. Released in 1993, it was widely praised by critics and was one of the best selling games of the year.

Players take on the role of a pilot for the Rebel Alliance as they battle against the Empire in space combat. The game is broken into three tours, each having 12 or more missions each.

You can control either an X-Wing, Y-Wing or A-Wing fighter in the missions, with the goal of completing the primary objective before you can move onto the next mission and tour.

The game’s timeline is set just prior to the ‘A New Hope’ film and continues through to the end of that story with Luke Skywalker attacking the Death Star.

The game is still commercially available and can be purchased from GOG.com for about 7gbp – the game can then be loaded into DOSBox and away you go. Due to being a big Star Wars fan I may be a bit biased, but 25 years later I’d still say this game is worth shelling out a few quid for.

Warcraft: Orcs & Humans is a fantasy real time strategy game released in 1994 by Blizzard Entertainment. It was the first game in the Warcraft series that eventually led to the immensely popular massively multiplayer online RPG World of Warcraft and the still hugely popular Warcraft 3.

The game is widely considered a classic in the RTS genre and helped popularise many multiplayer aspects that are found in virtually all RTS games that have been released since.

You can play either as the Humans of Azeroth or the Orcish invaders – hence the name of the game. The game contains both a single player campaign as well as multiplayer skirmishes. In the single player mode, players will go through a number of objective based missions that typically involve base building, resource gathering and building an army to defeat the opposing faction.

Warcraft isn’t actually available for purchase legally from what I can see, and it is technically not an abandonware or ‘free game’. It is however available for download from a number of abandonware game sites, make of that what you will.

Civilization is a turn-based strategy game released in 1991 and developed by Sid Meier and Microproce.

Set between 4000 BC and 2100 AD, the primary objective is to manage and grow your civilizations through the ages competing with up to six other computer-controlled civilizations.

Players will find, manage and grow cities which in turn expand the domain of the civilization eventually leading to warfare and diplomacy with other civilizations. In addition to warfare, diplomacy and city management, Civilization also features a robust technology tree in which players are free to choose what to research and develop to advance their civilization.

Civilization can be found on many of the abandonware websites. There’s also a RISC OS port of FreeCiv that you can play Civilization on should you run into problems with the DOS version!

Prince of Persia is a 1989 fantasy cinematic platformer originally developed and published by Brøderbund and designed by Jordan Mechner for the Apple II.

Set in ancient Persia, your objective is to venture through a series of dungeons to defeat the Grand Vizier Jaffar and save an imprisoned princess.

Jaffar locks her in a tower and orders her to become his wife, or she would die within 60 minutes – so the clock is ticking for you to save her.

The game can be downloaded from a number of abandonware sites. It is a short game in comparison to newer games, but it’s definitely still worth a play-through.


RISC OS Games Month 2018

August is Games Month on the RISC OS Blog, where we focus exclusively on gaming, be it reviewing new games or taking a trip down memory lane with a look at a classic title. Stay tuned for more games articles throughout August!

Under the Microscope: Wolfenstein 3D

posted in: Games | 0

A while back we took a look at R-Comp’s re-release of their Doom Trilogy game bundle that had been updated for modern RISC OS systems and made available for purchase through the Pling Store.

That pack saw Wolfenstein 3D bundled with it. Tt wasn’t compatible with modern machines at the time, with it only being compatible with older 26-bit RISC OS systems. R-Comp have been busy since then however, they teamed up with Jon Abbott of JASPP to get the game running on newer RISC OS systems – including the Raspberry Pi and Titanium.

In addition to improved compatibility, the game has received a number of enhancements that improve the gameplay experience, namely new sound effects for collecting food, ammo, treasure and so on. The original PC version had these features in place, but the RISC OS port did not.

The music has been adjusted to better match the PC edition too, and the damage indicator has now been upgraded so the screen flashes red to indicate that you’re taking damage. Another neat upgrade is Wolfenstein now runs at a high resolution mode for modern monitors.

If you’ve already bought the Doom Trilogy re-release through the Pling Store, you can upgrade through the !Store app for free, which will bring your copy of Wolfenstein 3D up-to-date.

What is Wolfenstein 3D?

Released in 1992 by iD Software, Wolfenstein 3D is generally regarded as the first first-person-shooter game, and it laid down the foundations for later shooters from iD such as Doom and Quake.

The player controls an American soldier named BJ Blazkowicz, who is attempting to get out of a building controlled by Nazis during World War II through avoiding or killing guards and dogs. Blazkowicz runs through admittedly repetitive mazes looking down the barrel of his gun, blasting Nazi soldiers, and munching on turkey legs that you’d hope had been cooked thoroughly before consumption.

It may be a little basic now, but the game was revolutionary back in 1992 and was quite popular on RISC OS when it was ported over in 1994.

The game itself

While the graphics and audio may be very dated now, and the maneuvering feels very robotic and unnatural (you can only look around horizontally) the nostalgia value of playing through Wolfenstein 3D is still great. Everything from the graphics to the music to the sound effects is a blast from the past, and the things that were satisfying back in 1992, such as nazi blood spurting up against walls and discovering secret corridors you can’t believe you missed the last ten times you walked past it, are still just as satisfying now.

Something that I’d forgotten was a big part of what made Wolfenstein such an addictive, yet infuriating game, was it’s lack of a map, making it incredibly easy to lose yourself in its endless corridors and prison cells.

When entering a new room a Nazi will likely be hiding to one side of the entrance, but Blazkowicz can’t turn around very quickly so if you choose to aim at the wrong side the enemy will be shooting you in the back. Your health does not regenerate in between levels, although when you die you just restart the level you were on when you perished.

Performance & Compatibility

Wolfenstein 3D is now fully compatible with Titanium and other systems that require RGB/BGR colour swapping, meaning that this release will run on anything from a battle-worn RiscPC to a an ARMini, TiMachine or Raspberry Pi. It also seems to run well under RPCEmu emulation.

In terms of performance, the game runs just as well as it did when I last played Wolfenstein 3D – which was some 15 years ago on an Acorn A5000.

If you’re looking for a trip down memory lane as well as a good Nazi-killing section, then look no further.

Wolfenstein 3D is available as part of the Doom Trilogy pack from R-Comp. It can be purchased from the Pling Store for £14.99.


RISC OS Games Month 2018

August is Games Month on the RISC OS Blog, where we focus exclusively on gaming, be it reviewing new games or taking a trip down memory lane with a look at a classic title. Stay tuned for more games articles throughout August!

A look at the AMCOG Games Development Kit

posted in: Games, Software | 1

So a while back, AMCOG Games released their Games Development Kit to the public – allowing you to be able to make your own games written in BBC BASIC without having to worry too much about the not-so-fun aspect of game creation – libraries, sound samples, error handling etc.

Cyborg in action

The kit comes with libraries to cover core areas such as screen plotting, screen transitions, MP3 playback and audio as well as a selection of game sprites, music tracks and sound samples to get you started.

What’s included

The pack is available for £14.99 from the Pling Store, let’s take a look at what you get for your cash:

  • A core library to enable sprite plotting, error handling, screen transitions, MP3 playback and much more.
  • A tile library to provide a general game engine for games based on tiles.
  • A sound library and virtual sound chip: RDSP
  • Game sprites
  • Music tracks
  • Sound samples

Three complete games are also chucked into the kit for good balance too, so you can use them as case studies to see how they’re written and how everything comes together, or even just use them as a template for a new game.

A look at the included games

The kit comes bundled with three games. Mutant Penguin, which is also available for free download from Amcog’s website, Cyborg which would cost you £9,99 if you got it separately, and Sparky – a basic Pacman-style game.

Mutant Penguin in all its glory

Mutant Penguin – Retro platformer Mutant Penguin sees you in a universe where penguins have developed the ability to wear a stylish red bow tie. The aim of the game is to guide your penguiny friend around the screen, pushing ice blocks around to kill slug-like creatures called spods.

The game is available for download for free from Amcog’s website, although the version that comes bundled with the kit does include the source code, so you can inspect and dissect to your heart’s content.

Cyborg – The game sees you, a Cyborg treasure hunter, attempting to penetrate Castle CyberDroid on your quest to thieve ancient treasures from under the noses of hordes of security robots that are teleported into nearby rooms with a view to spoiling your fun.

The game is available seperately from Amcog, but unlike Mutant Penguin, it’s quite a complex game with multiple levels and a lot of game logic, so it’s available for purchase from the Pling Store for a tenner. Check out our review of Cyborg here.

Sparky – A much simpler game compared to the other two. Sparky was written in a very short space of time, which resulted in a couple of new methods being added to the tile library. The game is essentially a reverse-Pacman, you control your character and move him around the screen avoiding the ghosts, and drop dots rather than collect them.

Sparky is currently only available as part of the kit, and is presented both as a playable game, and as a five phase case study in using the kit to develop a game.

Sparky in action

Overall

The AMCOG Development Kit is compatible with RISC OS on modern hardware such as the Raspberry Pi, Beagleboard, Pandaboard and ARMx6. It will also run on RISC OS 4 and has been tested on RPCEmu running RISC OS 5.

It is available from !Store for £14.99, with updates for existing customers free of charge. If you’ve purchased it on CD at a show, there should be a code in the CD box that allows you to download the updated version from !Store.

In terms of whether it’s worth splashing the cash on this development kit. I’d say it’s definitely a hard offer to turn down if you’re also considering purchasing Cyborg, for a fiver more you’re getting a plethora of tools to help you create your own games in BBC BASIC. As the libraries, template sprites and sounds are already there for you – all you need to add is any additional logic or features you need – and obviously, implement your idea for your game.


RISC OS Games Month 2018

August is Games Month on the RISC OS Blog, where we focus exclusively on gaming, be it reviewing new games or taking a trip down memory lane with a look at a classic title. Stay tuned for more games articles throughout August!