The Strangler – attempting a point-and-click game

August 24, 2011

Last month (July) I’ve been participating in a challenge, to make a game in a month, using any technology and tools. The only restriction was the theme: Justice. And even that was open to interpretation.

I saw this as an opportunity to practice a bit of game design and, more importantly, telling a story, so I decided to make some sort of classic point-and-click. I used my game engine Pixie, and the coding was quite straightforward, but it was rather difficult to come up with what was to happen in the game.

To make it a bit more interesting, I decided to try and make it in a bright and happy visual style, while keeping the story itself a bit more dark and sinister. There was something about those two conflicting ideas that appealed to me.

The game can be downloaded here  (for windows, but should run on Linux through Wine):

http://www.colossusentertainment.com/forumref/strangler_1_0.zip

And here are some screenshots:

The name of the game is "The Strangler", and is about Tom O’Reilly, Private Investigator:
strangler_02

The game starts with you, playing as O’Reilly, getting a visit…
strangler_07

… from a lady who has a case for you – to find out if her husband is a killer.
strangler_08

So you have to hit the streets in a search for clues, but you’re not very popular with the local PD:
strangler_12

There’s a couple of cut-scenes in the game, giving you another perspective on what’s happening:
strangler_17

I didn’t have time to  add much interactive dialogue (so that’s something I’ll be adding over the next couple of weeks). But there’s a little of it at least:
strangler_23

When you discover a new location, you get a marker on a map, which is used to move around in the game:
strangler_27

I had to come up with a bunch of characters for the game. Ten of them in total.
strangler_29

As I only had a month to do it, and everything took longer than expected (especially the animations), I didn’t have time to do the last scene of the game within the time set out for the challenge, but in the couple of weeks following it, I finished it off.

If you do try it out, please let me know what you think :-)

Also, as I usually do, I’ve released the source code for the whole thing:

http://www.colossusentertainment.com/forumref/strangler_source_1_0.zip

It includes both the code for the engine and the code for the game, but not the data-files for the game (you’d have to get them from the games zip file). The code is public domain. The source code for the game itself is not particularly pretty – time limitations meant doing quite a few nasty hacks. But sometimes it can be fun to see that other people hack their code too, so I’m releasing it as is :-)

Simple and efficient management of shared resources

June 22, 2011

Recently, Cliff Harris of Positech Games made a blog post called Optimising my ‘dumb’ textures, where he describes the optimisations he is doing to his latest game, to increase the load times when dealing with large number of textures that needs to be managed automatically, but also be shared between different game systems.

This made me think of resource managers in general, and how I’ve been planning for a while to replace the one in my Pixie Game Engine with something more robust, efficient and generic. It also struck me that this is a topic that often comes up, and I think all developers eventually reach a point where they need to solve this problem, so I thought I might as well give it a shot and share the resulting code as public domain, as I usually do.

So, my requirements for this system is that it should be really easy to use, but at the same time very efficient both in terms of memory use and performance.

In the solution I came up with, I use efficient hash tables to store the resources, but I wrap the access to them in a convenient resource class, which can be used as simply as this:

Resource<Texture> myTexture("myBitmap.tga");

In this example, Texture is the class that we want our resource manager to manage, and Resource is the templated wrapper class that we use to have it managed automatically.

There’s no problem having multiple instances referencing the same physical resource, like this:

Resource<Texture> myTexture("myBitmap.tga");
Resource<Texture> myOtherTexture("myBitmap.tga");

Even though we have two different resources, the fact that they’re created from the same filename means that they will both be pointing to the same Texture instance. The first of these two lines will cause the Texture instance to be created, while the second line will merely add an additional reference to the same instance.

Resources are automatically reference counted, so as resources are destroyed, the reference count goes down, and when it reaches zero (meaning there are no longer any Resource referencing the instance in question), the instance will be deleted automatically.

A good thing about this resource implementation is that Resource instances take very little memory – only 4 bytes – as they only store a pointer to the instance they reference. Also, they can be freely copied and assign, and the reference count will be adjusted accordingly, like this:

Resource<Texture> myTexture("myBitmap.tga"); // New instance created
Resource<Texture> myTexture2("myBitmap2.tga"); // New instance created
Resource<Texture> myTexture3(myTexture); // Ups ref count on "myBitmap.tga"
myTexture2 = myTexture3; // Ups ref count on "myBitmap.tga”
// and also causes "myBitmap2.tga" instance to be destroyed

This makes it possible to work freely with Resources, assigning them and copying them around, knowing that it’s all very efficient under the hood, and that the bulk of the data (as would be stored in, say, the Texture class) will be shared among all of them.

Additionally there’s a couple of helper functions to get the filename that a resource was created from, and to get a list of all managed resources of a specific type – which can come in handy if you need to loop through and perform an operation on each of them, such as Cliffski’s case where he needed to restore lost surfaces after Alt+Tab.

The code is public domain, it’s stand-alone and compiles as is – but it does include several of the data containers I originally developed for Pixie, so there’s quite a few files in this package, even though the resource system itself is only four fairly small files.

Download Resource Manager Source Code

I hope someone will find this useful, if nothing else as a starting point for their own system. I’ve done some quick performance tests, and on my computer I can create and destroy one million resources in less than half a second, so the resource system adds very little overhead to the process of loading and managing your assets :-)

TIGJamUK3

June 6, 2010

This weekend, I spent in Cambridge at TIGJamUK3 an indie game dev get-together of about 30 people, where we came up with weird themes and tried to make games designed around them in only 2-3 hours each!

Lot’s of good fun, and I managed the deadline for the three jams I participated in (I tend to have to stay so focused when making a game in such a short time period that my brain gets fried, and then I have to rest for a bit :P )

For the first game, the theme was either "Fish" or "Summer & Heat" – or a combination of both, at your choice. There was a conversation about sharks, in regards to the "Fish" theme (with Terry showing pictures of "invisible sharks"), and I recalled a terrible movie I saw once (Mega Shark vs Giant Octopus) and quickly decided on a fighting game with a shark and an octopus. Coming up with the idea for these things are usually quite a challenge, as you can’t ponder for too long, so you sort of have to stick with the first one you get and try to make it work.

The result, three hours and a couple of extra minutes later:

tigjam_sharkvsoctopus

DOWNLOAD SHARK vs OCTOPUS

For the next jam, the theme was either "Camera" or "Antidepressants" – or a combination of the two. This time, we decided on only two hours time limit. I felt warmed up at this point and decided to do a combination of the two, and also to push myself a bit and try to draw stuff myself instead of using Poser – something I’m not used to doing at all!

The result of this one, which I managed comfortably within the two hour time limit:

tigjam_smile

DOWNLOAD SMILE, YOU’RE ON CAMERA

For the last jam I did, the theme was "White hole" or "Staying awake", or a combination of the two. I went with "Staying awake", and the time limit was three hours. I aimed WAY too high with this one, and took about 20 minutes extra to just wrap up what I had into *something* at least – it’s a game where you have to stay awake or you endup in a nightmare place.

tigjam_dreamscape

DOWNLOAD DREAMSCAPE

All in all, a fun weekend, and it was good to finally meet some of the people I’ve gotten to know through various forums! Thanks to the organisers and everyone involved.

Debug Text Render

January 4, 2010

DebugFont

When working on games, I often find it useful to be able to quickly and easily display text strings on the screen for debugging purposes. A long time ago I wrote a simple little piece of code which could draw text onto a bitmap, and without having a dependency on anything else – it doesn’t use any other classes, functions or libraries, and it doesn’t need any external data – the font bitmaps are included in the source file, as a static array. This system, in all its simplicity, have turned out to be very, very useful, and I’ve used it for most of my stuff for the last 10 years or so.

I recently spent a little time cleaning it up a little, and thought I’d release it to anyone who’s interested. As usual, it’s public domain, so use it in any way you like.

You can download the DebugFont source code here.

To draw text on any bitmap, you simple include "DebugFont.h", and do something like this:

DebugFont font;
font.Blit(pixelDataPtr,w,h,20,30,"My text"); // 20,30 is the x,y position of the text

Where pixelDataPtr is a pointer to the pixel data of the bitmap we want to draw onto, andw and h are the width and height (in pixels) of that pixel data area. The pixel data of the bitmap to draw on, can be 8-, 16- or 32-bit data.

As I finish the refactoring of more parts of my Pixie game engine, I’ll try and post more of these little useful, stand-alone code snippets which can just be dropped into any project – let me know if you find any of them useful :-)

New Characters for Jade Figurines

September 16, 2009

I’ve been making some more characters for my Jade Figurines game recently, so just thought I’d post some pics of them, along with some close-ups of some of the characters which is already in the game:
First up, a captain for the Watch, to go along with the guards – a bit tougher, a bit meaner: 
jade_watchcaptain jade_watchman
Also, another wizard (the story I have in mind calls for two of ‘em): 
jade_goodwizard jade_evilwizard
I’m also going to have elves in the game. Now, elves are quite different from humans, and have their own agenda – you can never fully trust them, and they are as often an ally as they are your enemy: 
jade_elf
And finally, I’m having Orcs as well – but not your ordinary "hordes of darkness and evil" Orcs, but rather a wild and primitive people, proud warriors who fights fiercely and have their own culture and values, but are not outright evil: 
jade_orc
There’s more to come, of course, but these are the latest additions…

Dungeon Master-style game

August 29, 2009

The last few days, I’ve been experimenting a bit with art for a type of game I’ve been wanting to make for quite some time: a game in the style of good old Dungeon Master. Did you use to play it, or other similar games? If so, I’d like to hear about what sort of things you remember from it, what made it fun and what would make you want to play a new game in the same style :-)
Anyway, here’s a few examples of what my game will look like:

DmTestTroll

DmTestSpider

DmTestDragon

Video: Jade Figurines

August 24, 2009

I’ve put a video on youtube of the Jade Figurines game I made recently. The video doesn’t really do the game justice though (it’s much smoother than in the video), so you’re still better off downloading it.

If you have any thoughts, suggestions or ideas, I’d love to hear them.

Thieves and Warriors

August 17, 2009

Here’s a little preview of a game I’m working on, called "Thieves and Warriors". I’vementioned it before.
taw_title
(all the screenshots can be clicked on for full size view)
The game is somewhat inspired by old RPG games like Phantasie 3 (oh, and Pirates! as well, obviously), but even more inspired by oldschool pen and paper RPG’s. Ther’ll be lots of stats and numbers, none of it hidden away. And not so much animations or effects – more static screens and menus.
taw_party
You control a party of adventurers. I won’t have a limit on how many, but eventually it will become difficult for you to manage, I guess.
taw_town
The game starts off in a town, and you will also be returning to the town after completing quests. When in the town, you’ll be able to visit the market or tavern.
taw_tavern
The tavern is where you get your quests. The quests will be auto-generated, but quite simple to their nature.
taw_travel
To get where you’re going, there will be one or more days of journey, where you can be beset by foul weather, food shortage and more.
taw_battle
You can also be attacked, and I’m not quite done with how that will work yet – thinking of having it like a game board with abstract pieces.
taw_entrance
When you reach your destination, which is inevitably some sort of dungeon (keeping it classic, remember), which I haven’t even started to visualize yet – it will be auto-generated, but apart from that I don’t know. I’m considering a "doodles on graph paper" kind of look, but need to experiment some more.
Making the background pictures have been quite a challenge for me – have never used Poser to this extent before, and I’m really quite happy with the result :-)

The Jade Figurines

August 16, 2009

So, over the weekend (from Friday to late Sunday), I made a small beginning of a game, as an entry to the RPGDX competition. Now, 48 hours is a very short time for this, so I didn’t manage to complete the whole thing, but I did manage a very good start. There’s one short level, and the beginnings of a second, but I will continue to work on this, and make it into a full game :-)

If you want to try it you can download it here:

Download The Jade Figurines

Here’s some screenshots of the game, but they don’t really do it justice, so download it and give it a try instead :-)

jade_title

Title screen – having to work fast means you can’t really be to particular with how things look..

jadescreen1

The game starts in quite a generic setting – a dark forest. The sword at the bottom shows the direction you should move.

jadescreen2

Simple "cutscenes" are indicated by black bars top and bottom.

jadescreen4

There’s fighting too – though I’d really like to improve on it, it’s currently a bit rough as a result of the tight time frame.

jadescreen3

Fighting can be difficult, and you can easily be knocked down. I didn’t have time to add a health bar, so you can’t die.

jadescreen5

Decided to use a combination of text boxes and speech balloons for a comic book feel.

jadescreen6

A shot from the second level, which takes place in town. This is the big scene where you get you mission…

I’d appreciate any feedback on the game as it stands so far – there’s lots of things I’d like to improve, and I have a lot of ideas for things to add, but it’s always good to get input from other people at an early stage…

There’s also a video of the game available, and some pictures of more characters for the game.

48 hour Sidescrolling RPG Competition

August 6, 2009

rpgdx2009

RPGDX is having another one of their friendly mini-competitions, where you’re trying to make games (mostly RPGs) in a limited time period. The competitions are just for fun, and you don’t win anything besides the bragging rights… and the winner is voted by the participants.

This time, the theme of the competition is to make a sidescrolling RPG in 48 hours, and is set for August 15-16. Basicly, you start when you wake up on saturday morning, and try to finish something before going to bed at sunday night, and you do as much as you want to in between. You can use any engine, tool or language you like, and for any platform.

As 48 hours is a rather short time to make a game, it usually results in quite small games, and it is important to stay focused. It is a great learning experience: having to make quick decisions, stick to them and not be too particular with what you do – the important thing is to have something playable in the end.

More details about the competition can be found here:http://forums.rpgdx.net/viewtopic.php?t=2237