Alternate Reality – Graphic card woes

I was fortunate enough to be able to upgrade the old laptop I was using to a decent spec PC. Everything initially looked very positive. Windows 7 installed smoothly, detected all the right drivers and the PC seemed to perform very well. I installed Visual Studio 2008 Express which I am using to develop my Alternate Reality remake and everything compiled fine.

However when I ran Alternate Reality X (as I’ve now started calling it) but it was very slow. SFML (the media library I’m using for the project) uses OpenGL to produce all its graphic output and I’m also using OpenGL to produce the 3D view in the game. The onboard Intel graphics in the PC obviously doesn’t have proper Windows 7 drivers which support OpenGL (despite the OpenGL logo being displayed within the graphic card driver tab within Windows).

The number 3 on the status bar below indicates the number of frames the game is currently running at with the alternate graphics option. It’s not quite so bad with the original graphics which are smaller dimenstions. On my previous laptop (also using Intel graphics but with proper OpenGL supported Windows 7 drivers) the game ran around 30 frames a second. Sadly there seem to be no better drivers available.

I ordered a new graphics card with an NVidia chipset but didn’t realise that the PC didn’t have a PCI Express x16 slot! I’ll get this sorted eventually. In the meantime I’ll focus on parts of the game which aren’t really affected by the slow speed.

The Bards Tale

I’ve been giving a lot of thought over the last few weeks to the games that I’ve played over the years and the features I want to include in my game. One game that ’ve played quite a lot over the years was the Bards Tale, first on the Commodore 64 and later the Commodore Amiga.

Bards Tale 2 – The Guild where you create your party (Amiga version)
Your party of adventurers had to explore the city of Skara Brae as well as the dungeons beneath to destroy an evil wizard and free the city from his grasp. The game featured a 3D view of the city streets and animated pictures of the numerous monsters you encountered. Gameplay was combat heavy (even for a CRPG!) with large scale battles sometimes featuring multiple groups containing dozens of monsters against your party of six. Although fairly simplistic in many ways there are a number of features in the Bards Tale that I liked and can imagine incorporating into my own game.

Bards Tale 2 – Exploring the streets of Tangramayne (Amiga version)

Combat was turn based and almost entirely textual in nature. The party and its enemies initially faced each other from a distance before advancing into range for combat. Only the first four characters in your party could attack hand to hand with the others having to rely on magic or missile weapons to attack from a distance. Magic played a big part in the game with a number of different types of magic user, some of which could only be accessed when a certain level of proficiency had been reached. One unique class within the Bards Tale was the Bard of the title who could play a number of tunes which produced magic – providing you made sure he had plenty to drink at the tavern.

Bards Tale 2 – Combat (Amiga version)

It was possible for you to encounter wandering monsters who offered to join and fight for the party. I also like the layout and interface for the game which I think is very clear and easy to understand. I’d imagine my CRPG will have a similar type of layout where you can always see how your party members are holding up – nothing worse than not being able to see if a character will last another round.

My new CRPG project

I think the first Computer Role Playing Game (CRPG) I ever played was Ultima IV: The Quest of the Avatar on my Commodore 64. I was only about 12 years old at the time and Ultima IV wasn’t readily available in the UK at the time. Fortunately my Uncle worked with someone who had a lot of American imports of new games and I obtained a loan of Ultima IV from him. Whilst the graphics were simplistic (even back then!) I soon found myself drawn into the game and the story. I’ve since found the CRPG genre to be my favorite type of game. As well as the Ultima series other favorites included the Bards Tale and Alternate Reality: The Dungeon. Later when I upgraded to an Amiga I played Dungeon Master, Eye of the Beholder and Ultima VI. Finally I got access to a PC. These old games used a variety of different styles of play and features to create their fantasy worlds despite the limited platforms that they ran on. However, despite their dated graphics and limitations I often find myself drawn back to these games and their conventions. I think there is a certain charm and entertainment value about these early CRPGs that many newer games have failed to capture or build on.

Ever since I received my first home computer I wanted to design and create my own Computer Role Playing Game (CRPG) such as those that were popular for the 8bit and 16bit computers of my youth. I designed many games over the years (mainly on paper) but never managed to take one of those designs and implement it as a playable game. Twenty years later and there are a wealth of programming languages and gaming resources available for free on the Internet. In addition my programming skills are much better than they used to be (though still not great). I’m now keen to design and develop my own “Classic” CRPG, incorporating my favorite design features and ideas from my years of playing CRPGs. Hopefully along the way I’ll add a few good ideas of my own and maybe even create a game that some people might be interested in playing! I’ll record my design ideas and progress as the game develops. In addition I’m planning to play a lot of the old games through for inspiration and plan to record my experiences about these from time to time. I’ve never actually finished very many CRPGs that I’ve played and there are a number I’d like to finish. I think I probably spent most of my time designing rather than playing.

I will be developing the game initially under Windows using Microsoft Visual Studio Express, C++ and the Simple, Fast, Multimedia Library (SFML). This library has proved powerful but relatively easy to use in the past. Eventually I would expect to be able to offer Linux and Mac versions as SFML is supported for both platforms. However I still have only a vague idea of what the design and content of the game is likely to be at this early stage.

Shops & Signs

I’ve finally managed to make a bit more progress over the weekend, adding signs to the City doors and also adding some code to display City establishment images (E.g. Guilds, Inns etc) with some relevant menu text. A lot of time was spent capturing all the images for door signs and establishments from the Atati 8bit version. After a few attempts to add code to work out if a door should have a sign on it I decided to take the lazy route and simply use a different wall type. My map format uses an Integer for each wall which means I’m not limited to just a handful of different wall types to make up the City and Dungeon walls. Potentially this means that I could add more interesting details to later versions of the remake such as tapestries or mirrors or windows for City locations. The downside is that I have to manually edit the map entries for shop doors (OK I could write a program to do this but I haven’t yet). The map format is in a human readable format so it’s easy to find a map cell and edit the wall types. The other reason for this easy to understand map format is that I like the idea of creating a map editor at some point. Many areas of the City are difficult to get to so I’m keen to try and open up the map a little bit. It’s also possible someone else might be keen to write a map editor.

To date my Alternate Reality remake is looking like the Atari 8bit version though the view window is bigger and due to the higher resolution walls and signs are clearer from far away. City establishments contain additional menu items from the 16bit versions of the game. So for example visiting an Inn in the remake will give you the option to apply for a job (see above) – a feature which was never implemented in the 8bit version (it would have been added in a future scenario had they been created). I’m also modelling the menu system along similar lines to The Dungeon and the 16bit City as I find these cleaner and easier to read than the original Atari ones. One major change I’m considering for shops is making items selectable from a list rather than skipping through one item at a time in places such as the Smithy. I’m keen to start building up some simple shop functionality so that the remake starts to feel more like a game. Dungeon content has kind of taken a back seat just now.

City Backgrounds added

Thanks to information I’ve received today I’ve now been able to add the four City backgrounds into the project. There are different mountain range backgrounds within the City depending on whether you’re facing north, south, east or west.

I’m now having a go at adding the door signs for the various City establishments (E.g. guilds, shops etc). I thought I’d come up with a quick way of dealing with this but I’ve still got some work to do as the signs are not appearing from the outside of the shop only the inside! I’d forgotten how the City map structure works. My map structure can easily accomodate additional textures to deal with different wall types but would require me to edit lots of doors manually which I don’t want to do if I can avoid it.

Return to Alternate Reality

Well it’s been a long time since I posted anything on this blog even though there has been a fair bit of progress on the Alternate Reality front in the last year. Whilst I’ve not done a lot in the last few months I did some good work during the summer and what I’ve produced to date is far better than what I had created in SDL. The screenshot here is from the City using the original Atari 8bit graphics. I have been very happy using SFML instead of SDL for my media library and so far it has delivered everything it promised. As before I’m concentrating on coding and using the original graphics and sound for the time being so as not to get hung up on editing new graphics all the time. SFML is platform independent with SFML libraries for both Linux and Mac (and lots of bindings) so I’m keen to find a couple of willing people to maintain these versions. Porting should be very easy as there is nothing Windows specific in the project to my knowledge.

So far I’ve implemented the following features:

  • Improved 3D view window which is larger than the original game
  • Smooth scrolling in the 3D view – finally!
  • Different zones within a map to define different graphics in some areas e.g. Crystal Caverns
  • Dungeon Teleports
  • Dungeon location specific messages
  • Weapons and Wealth status screens
  • On screen Compass
  • Movement around the City or Dungeon 1st level

OK so lots still to do but I’m pleased the smooth scrolling is now working as I expected that I would find this difficult. I need to say thanks to Jim Norris for providing me with the information on the map zones and the full Dungeon teleport data otherwise I wouldn’t have been able to complete these parts.

Next thing I would like to do is move all the game data into external data files. Most data is already in this format but some is included in the source files. I’d also like to add a simple option page so that players can choose between The City and The Dungeon. Once these are done I can get down to some interesting bits so that what I’ve done actually starts to feel like a game!

Alternate Reality and SFML 1.2

Following the release of the SFML 1.2 library I began playing around with my Alternate Reality CRPG remake again. I wanted to use OpenGL to draw the 3D view but be able to use the built in 2D functions of SFML for all the other elements on the screen such as text. I was able to do this successfully and it seems to work pretty well. Previously I had used SDL with OpenGL but I’ve now transferred all the main code over to SFML. Still lots of code to move over before I’ve transferred all the functionality of my SDL version. This includes the combat, encounters and character creation sequence. I feel I’ve done the most tricky bits though!

Added Tile Properties

It took me a while to sort out the new file format for the terrain objects but I’ve now got a simple machine/human readable format which I can reuse for the monster and item files. Now that I’ve done this I’ve thinking of splitting game objects into 3 different areas – terrain, monsters and items. The map/item format is very simplistic just now so will probably need to be expanded at some point.
As always I’m wasting time changing little image files instead of sticking with a handful of basic tiles and adding features to the editor and game. Anway I finally added some properties for the different types of terrain in the game. Decided to leave out animation and visibility for tiles just now. For now I’ve kept it very simple with tiles having a small number of properties:

  • Tile no – the image number from the tile sheet
  • Name – a text description for look commands
  • Passable – can the tile normally be walked through
  • Map link – does the tile offer an entrance or exit to another map level (E.g. staircase)

I’d like to really start making Demons Eye feel more like a game. I might add a player status and inventory pages and some simple console style messages. It would also be nice to be able to have a bit of simple treasure hunting and combat!