Skip to main content

Posts

Project Tethys Post-mortem

Project Tethys was my entry for Ludum Dare 29 . Here's the elevator pitch: Project Tethys is a fast-paced underwater 2D shoot-em up inspired by the likes of Defender and Resogun . You control an advanced combat submarine tasked with defending an underwater research facility against an invading army. If you enjoy classic arcade-style action, this game is for you! So far the game has been getting pretty good feedback. It's the most polished entry I've ever submitted for a Ludum Dare and the one that I'm most proud of so far. Here's what it looks like in action: I've carried on working on it since the end of the competition, fixing some of the problems people have commented on and adding more of the features I'd originally planned. Expect another post about that when I'm ready to release it. Tools Unity 4.3 (free version) GarageBand for iPad bxfr Nuke 8.0 (specifically the ModelBuilder node) Paint.NET VLC What went right Makin...

Ludum Dare 29: Beneath the Surface

I'm halfway through making a game for Ludum Dare 29 . The theme this time around is "Beneath the Surface". For once I've had an idea right from the start that's practical, fun and in keeping with the theme. It's a lovely change from my usual pattern of starting with an idea that turns out to be impractical or boring & having to start over halfway through the competition. So on that basis alone I have high hopes for this one. Here it is: Project Tethys It's an underwater shoot-and-rescue-em-up inspired by the likes of Defender and Resogun . You control a state-of-the-art combat submarine tasked with defending an underwater research facility from an invading army. Or at least, that's what it should be if I can finish it in time... The controls are arrow keys or WASD to move, left mouse button to fire. There's still loads left to do: implementing the rescue mechanic; sound effects; enemy AI; a high score table; a menu system; better model...

OpenGL in OS X 10.9

Apple announced details of OS X 10.9 "Mavericks" today. For anyone who writes cross-platform graphics software, one of the biggest bits of news was that it will finally support OpenGL 4. Specifically: OS X 10.9 will support the OpenGL 4.1 Core Profile This info comes from their release notes . I haven't been able to find any info about supported extensions yet. While welcome, the news is still a bit disappointing. OpenGL 4.1 is now a 3 year old standard, so I'd hoped for something a bit more recent. I believe the Intel HD4000 and HD5000 chips used the MacBook Air & Pro only support up to OpenGL 4.1, so I guess that played a part in the decision.  OS X will be still be the lowest common denominator for OpenGL, relative to Windows and Linux; but at least the denominator is not quite as low any more!

Iterating faster

Today I spent a few minutes writing a Makefile. I think they may turn out to be some of the most effective minutes I've ever spent. At work we build using SCons . When I change a single source file, rebuilding takes between 50 and 65 seconds. That's more than long enough to lose my focus and get distracted, so to stay productive I have to work in larger batches. I code in longer bursts and recompile less often, so that the ratio of productive time to down time stays up; unfortunately that also means fewer opportunities to test my changes. That's not ideal, but it's manageable much of the time. Not at the moment though. Right now I'm developing an algorithm where I need to be able to quickly try out different approaches for each of the steps. In this situation I really want to see the effect of each change in isolation, so I can't batch up my coding. All of a sudden those 50 second build times are a real problem. I spent a little while looking into ways to...

OpenGL ES and occlusion queries

This is a follow-up to my earlier post "WebGL doesn't have query objects" . Since I wrote that post, the situation has changed a bit. It's still true to say that WebGL doesn't have query objects, but the underlying reason - that OpenGL ES doesn't - is no longer true. For OpenGL ES 2.0 , there's an extension which provides basic query functionality: EXT_occlusion_query_boolean  (which seems to have been based on ARB_occlusion_query2 from regular OpenGL). For OpenGL ES 3.0 , the functionality from that extension appears to have been adopted into the standard. The extension provides two query types, both of which set a boolean value to indicate whether any pixels passed the depth and stencil tests. While this is progress, unfortunately it's still not sufficient to implement the pixel accurate collision detection method I described in an earlier post. For that purpose it's not enough to know whether any  pixels passed the tests; you want to kno...

A handy little script for QtCreator users

If you use QtCreator for what it calls " generic projects " I've written a little script which might be useful for you: https://github.com/vilya/newfiles This script will rescan your project directories to see whether any files & include directories have been added or removed and update the QtCreator project files accordingly - something QtCreator isn't yet able to do for itself. It has a few extra features too, such as whitelisting or blacklisting paths using shell-style wildcards. See the README file at the link above for more details.

How to outperform std::vector in 1 easy step

Everyone who's familiar with C++ knows that you should avoid resizing a std::vector inside a loop wherever possible. The reasoning's pretty obvious: the memory allocated for the vector doubles in size each time it fills up and that doubling is a costly operation. Have you ever wondered why it's so costly though? It's tempting to assume that because implementations of the STL have been around for so long that they must be pretty efficient. It turns out that's a bad assumption because the problem, in this case, is the standard itself: specifically, the allocator interface. The allocator interface provides two methods that obtain and release memory: allocate allocates uninitialized storage (public member function) deallocate deallocates storage (public member function) (taken from this page ). What's missing is a   way of growing an existing memory allocation in place. In C this is provided by the realloc function, but there's no equiva...