rik.org rik.org Developing software and games



Home

Who Are You?

Cipher Work Log

Books

Email Rik

Archive

 

Sunday, 19 September, 2004

Always keep a Hippo Handy

You may be wondering what I am talking about. Handy Hippo is a new company that is dedicated to card making that I was involved in setting up. If you are into making your own greetings cards, then this is the shop for you.


Monday, 20 January, 2003

Recap

It has been a while since I wrote a new article here, and I still haven't written one (things have been very busy). However, I thought I would offer a recap of some of the articles hidden away on this site.

Optimisation is important and understanding how to optimise code effectively is an important skill when developing games and the technology that powers games. Faster, faster, faster offers some tips and suggestions on optimising your project.

If you are interested in game technology then you might be interested to read about the Virtual Machine inside Cipher, or keep up to date on building games that can be translated to the hundreds of languages spoken across the world.

If you are more interested in the process of development then try reading about programming style guides, daily build processes, installer frustrations or the general tendancy for things to get a lot more complicated than they need to.

Failing that, why not find a new book to read.


Sunday, 5 January, 2003

Console Wars

This Christmas has been a hot battle in the console wars, with the "next generation" consoles really taking off. Here in the UK, PS2 is continuing to sell by the truck load, with XBox coming in second and Gamecube a disappointing third. There were some great offers around if you wanted to buy a console this Christmas, which I guess was one of the reasons that so many people did. PS2 had GTA3: Vice City and XBox had great deals with 4 games for under £200 (3 of them were actually good as well!).

I am still pretty shocked at the difference in visual quality between the XBox and PS2 though. The other day a friend of mine came over with his XBox and a copy of Burnout. This game is not only awesome fun, but looks just incredible. It was enough to convince me that I really should go and buy myself an XBox as soon as possible. A few days later I made a trip into town, but had a fair bit of trouble finding someone that stocked Burnout. I had pretty much given up hope and thought "What the hell, I'll just get a PS2 instead". I got a friendly store to load up Burnout on the PS2, just to make sure and it looked like every other PS2 game I have ever seen. Noisy graphics, with loads of aliasing artifacts and flat looking textures. It played the same, but looked liked a computer game.

The XBox version just looked so much better, with sharper, more detailed graphics. It looked like you were watching some mad racing event on TV, instead of playing a pixilated computer game. No Sale for PS2. Another walk around the shops revealed an XBox version, so I ended up getting an XBox, Burnout, Splinter Cell, Halo, Jet Set Radio Future and Sega GT Arse (I think that's what its called).

Splinter Cell is incredible. Absorbing, tense and a visual masterpiece. Halo is FPS fun at its best and I am enjoying Jet Set Radio Future as well. All in all, I am well impressed. Sony has obviously won this round of the console wars, with the PS2 in such a dominant position that MS and Nintendo can only hope for a weak second place. It is a shame really, as the PS2 is painful to program and is graphically pretty weak compared to its rivals.


Tuesday, 19 November, 2002

Tivo at last

I have recently been given a Tivo for my birthday. Hooray!

Finally there is always something worth watching on telly when I slump down in front of it at the end of the day. I don't know where it finds all these programs I like, but somehow it manages it and saves them away for when I have the time to watch them. I love the friendly noises it makes as well.

For those of you wondering what a Tivo is, it is really just a very clever video recorder (only without the tapes). You can find out about it from the people that make them here

New Tools for Cipher

I have just finished a new tool for Cipher that automates creating new game projects. The Game Wizard just creates a simple default game for you, with a few default art assets all ready to go. It greatly simplifies the process of starting a new project. The tool is actually a standalone tool and not an MSVC AppWizard. I would have liked to make it an AppWizard, but it was just too complicated to do as a Cipher game is made up of 3 separate components. I needed to create a workspace that contained 3 projects. I needed to include a selection of art resources and a runtime copy of Cipher as part of the set-up as well, which made it even more complicated. In the end I just created a standard Wizard style application that takes you though the process. Once the project has been created, you can open it in MSVC like normal. You can try out Cipher and this new tool by registering on the Synaptic Soup Support Site.

Why is making the icons for programs so hard and why is it that Visual Studio can't really edit anything better than 16 colour icons with any comfort (even VS.NET)?


Sunday, 3 November, 2002

Develop Mag

A version of my optimisation article is in the current issue of Develop, a game industry magazine for developers.


Friday, 1 November, 2002

New Cipher Evaluation

I have just spent the last week preparing the new evaluation kit for Cipher. We have given our pricing and evaluation procedure an overhaul, so that it is now quicker and easier to for interested parties to try out Cipher. It is also cheaper and less complicated to license Cipher for use in a commercial product. The new evaluation kit also includes a lot more than before. Everything you need to build yourself a sample product, including all the tools are part of the evaluation. If you are interested, you can check it out by registering on the support site.

Most of the time was spent updating the support site to cope with a registration based login system (previously the entire site was just protected by .htaccess protection). I do not have much experience with developing web apps and database stuff, so the going was obviously slow and painful, but I am quite pleased with the end result. Previously, if someone wanted to evaluate Cipher, it took quite a bit of effort for them and us to sort everything out. The new system is faster, easier to use and a lot less effort for everyone involved. The net result is that we get a lot more people evaluating Cipher and registrations are coming in thick and fast.

FogBugz

The next version of Fog Creek's FogBugz is due out real soon now and since I have never really found a bug tracking tool that I am really happy with, I am quite looking forward to its release. Obviously I make use of a bug tracking tool, but I consider it to be the best of a bad bunch. Once you filter out all the "management finger pointing tools" (bug tracking tools that seem to be 95% geared towards producing reports that point out who is to blame for all the bugs and only 5% geared towards developers trying to track and fix them) there is not a lot out there. Despite its lame name, FogBugz appears to be geared towards making it easy to get bugs reported and for developers to track and fix them. What a great idea!

Update: Just found this on the FogBugz web site, and now I am really really looking forward to it... "FogBUGZ does not provide personal performance metrics for management, because in the real world, whenever people are measured based on the number of bugs they create (or fix, or report), every bug results in an argument. If you try to penalize programmers for writing buggy code, the only thing you can be certain of is that sooner or later, the number of "bugs" in the bug tracking database will approach zero, while the number of bugs in the software stays the same. FogBUGZ is not a crutch for your HR department. It's a tool to create higher quality software.". Excellent!


Monday, 30 September, 2002

Memory Management in Games

What are your thoughts on memory management in games? Should everything be allocated on the heap? Should it all be statically allocated? Should it be something else? Discuss...


Monday, 23 September, 2002

Documentation

Cipher's Programmers ManualCipher's technical support web site is created using a custom tool (called WebBuilder) I wrote a couple of years ago specifically for the purpose. This tool was also used to build Synaptic Soup's main web site as well as this web site. It was a pretty good tool. Since then the main site and this site have switched to being maintained with a package called CityDesk (which is excellent by the way) as it has better scripting and really nice site management features. The support site still uses WebBuilder though, as it has a lot of custom features specifically added for building API documentation. It will syntax colour source code it finds, it will build up consistent looking help for each function by parsing through comments and it will cross reference everything without any effort on my part.

As the release of Cipher 1.3 approached, and I was finishing off all the documentation, I decided that it was too much like hard work and there must be a better solution out there.

I decided to go and take a look at more general purpose solutions, like Doxygen, to see if they produced better results than WebBuilder. None of them seemed to produce the kind of results I was after. Doxygen for example, produces a source file centric view of the project. It is great for helping developers get to grips with a large body of source code, but Cipher's API documentation is more about "How do I draw this model" as apposed to "I am in blobby.cpp and I am not sure what this variable is about. What is it for?". I also felt the weight of two years worth of documentation already done, that would need to be moved over to the new system, so in the end I updated WebBuilder to support the new features I wanted.

The end result is a new look for Cipher programmers manual (the artist manual has not really been effected by the changes) that has much improved cross referencing, easier to navigate help and fewer clicks needed to get to the page you want. Maintaining things in the future will also be simpler. WebBuilder is still proving to be a flexible and useful tool that produces excellent results.


Sunday, 15 September, 2002

Cipher 1.3 Launched

The latest version of Cipher (the game engine I develop) has just been released. There are some movies of its new features up on the site...

You can find out all about the cool new features that have been added in this release over at Synaptic Soup's web site.


Thursday, 12 September, 2002

Ogg Vorbis

Not just a silly name, but an odd logo as well.You what? Ogg Vorbis is actually a file format similar to MP3. It has been designed for encoding music files at a very high quality, using very little disk space. One of the problems with MP3 is that it is patented, and if you want to include MP3 support in your application you have to pay someone a lot of money for the privilege. Ogg Vorbis, despite its silly name, is an open and patent free alternative. It is also able to deliver slightly better quality than MP3 in the same amount of space.

I had looked at Ogg a few months ago, with the view to adding support for it into Cipher, but I gave up. It needed about 800K of memory to decode a file and even a simple decoder program ended up being about 1Mb in size. This was just too resource hungry, especially on a console when memory is at a premium. Cipher and all its components come to less than 500K at the moment, so tripling it to add support for one more file format seems a bit silly.

I had a fresh look today and things have come on a bit. There are still a lot of rough edges, but the developers have made a lot of important improvements. I have been able to create a decoder that is 140K in size this time (though it took a bit of effort and the sample decoder that came with it was still about 1Mb). Memory consumption has come down a lot as well. Initial testing seems to suggest that it uses about 200K to decode a complete music track, which is still a bit steep, but much better than before. Like most open source projects, it is best not to look too closely at the code, as building it produces a slew of compiler warnings and some of the projects just don't build at all on Win32 without manual tweaking. Still, it has not taken long and I now have a set of libraries I can link with that will let me decode ogg files quickly and easily. There is a new API available as well, called Tremor, which is an integer only decoder. I think it was originally created to make it simpler to add support for ogg files in hardware MP3 players, but it may also be a simple, handy and compact way of adding playback support to software as well. I will keep my eye on that.

TortoiseCVS

I have also just tried out a program called TortoiseCVS. This is a front end for CVS, the source control system that most open source projects use (due to its free-ness, ability to work over the net and Unix origins I guess). This front end is implemented as a shell extension though, so there is no client program to run at all. You just do everything in Window Explorer. It was a pleasure to use, especially compared to the pain I could have endured if I have tried to use CVS directly. It also has a cool logo.


Thursday, 5 September, 2002

Broadband at Home

After many years of getting angry with BT's totally shambolic broadband program, I can finally have a broadband connection at home. What a relief. The old modem router goes in the bin (well storage for when the goodness screws up) and a nice new Netgear DG814 goes in the cupboard instead. I can now listen to ShoutCast radio at home and download game demos in less than a day. Hurrah!

The micro filter does seem to have screwed up my caller display though. It is now intermittent. Oh well, it is a price worth paying.


Friday, 30 August, 2002

ECTS

Just spent the day at ECTS. We had a few meetings, but still had enough time to look around. The main show floor did not have all that much to offer, though there were a few great looking titles. Splinter Cell looked like it was going to be great, and I got my first play of Mario Sunshine which looked like more Mario 64 (excellent!). The "Playstation Experience" was far better presented than the rest of the show though. This is really a separate show, open to the public, that Sony had organised to show off new PS2 titles. MS and Nintendo have a lot of work to do if they want to compete with these guys, as it was clear that they know exactly what they are doing. There are one hell of a lot of third person cartoon platformers coming out for some reason though.

Price Cuts

Big news this week is that MS and Sony have both dropped the prices of their consoles. XBox is now £160 and PS2 £170 here in the UK. A lot of people are going to be getting consoles for Christmas this year.


Monday, 19 August, 2002

Faster, Faster, Faster

faster, faster, fasterGames are real time applications. Real time applications are a special class of computer software where performance is unusually important. Games need to generate 60 complex 3D images of their fantasy worlds a second. Games also need to update and move all the characters, bullets and effects using complex Artificial Intelligence algorithms before it is possible to draw the next frame. The point is, almost every part of a games code is used each frame, 60 times a second. It has to get the timing exactly right. It is no good if it can do some frames in 1/200th of a second, but others take 2 seconds, or the player will see glitches and jumps in the game. Optimisation is important and understanding how to optimise code effectively is an important skill when developing games and the technology that powers games.


Wednesday, 14 August, 2002

Shader Designer

Recently I have been working on a range of new visual tools for Cipher. The first of these to be announced was the Shader Designer. There is a small news item and a short article about the shaders used by Cipher over at the Synaptic Soup web site. The article has a bunch of images to go with it, and movies of the resulting shader effects.

Shader DesignerThe Shader Designer is basically a gui tool that has been designed for artists. They use it to create the shader effects used in their games. The Shader Designer also doubles up as a useful model viewer and animation tester which help to provide the art team with an acurate idea of how their models and effects will look in the final game.

I am pretty pleased with the way it turned out, especially the totally interactive nature of all the controls. As you type in a number of drag a slider, the rendered display is updating in real time. I was also quite pleased with the template driven command mapping. All the commands are specified in a template file, allowing support for new shader commands to be added without having to ship a new version of the Shader Designer. Since new commands are added all the time by us at Synaptic Soup and by third parties using a product license of Cipher, this is pretty handy.


Tuesday, 13 August, 2002

Build Times

I have been following a thread on the sweng-gamedev mailing list about build times. This discussion was really triggered by the recent release of IncrediBuild, a new tool that enabled distributed builds for MSVC 6 projects. This means that when you press Build in vc6, all the PC's in your office can share the work to get the job done in a fraction of the time. All the accounts I have heard so far on IncrediBuild have been pretty positive, though I have not tried this product myself as none of the projects I work on take any significant time to build. Cipher and Crazy Car Championship combined only takes 15 seconds to compile and link. People on the list had to live with build times of 45 minutes! I feel their pain though, having worked on a number of projects before Synaptic Soup with build times in this league.

So how do I keep build times so low. Here are a few tips that might help.

  • Don't include windows.h with every file in your project. It is big and slows things down a lot.
  • If you are using pre-compiled headers, or a common include file like stdafx.h, then make sure everything you include in it actually needs to be there across your whole project.
  • Keep dependencies under control. #include'ing in header files is a quick way to pulling in the entire project with every cpp file if you are not careful.
  • Don't #include a class or type when you can get away with a forward declaration.
  • Use Proxy classes for complex classes with simple public interfaces.
  • Break projects up into more manageable components
  • Avoid adding a load of features you don't need for "completeness".