UFEC game

Posted in Uncategorized on March 31, 2010 by bbarrett

I “finished” my game for UFEC. I’ve spent the last couple of weeks frantically crunching trying to get it someway reasonable, so even though I posted it a few days ago I’m only now getting around to writing about it.

I’ve mixed feelings about the situation.

Primarily, at the time I was quite annoyed at how poor the game turned out, it need a lot more balance and polish. There are some odd little bugs in there that I simply didn’t have time to track down or weren’t too important.

With the benefit of a little break though, I’m quite happy with it. It isn’t finished, and I will surely come back to it in the near future to take it the whole way, but it contains the essential ingredients that I was hoping to include.

Its reasonably fun to play and looks nice in motion, even if the graphics could do with quite a bit of tweaking.

I’ve learned a lot too, I had never really designed a game before, and it definitely shows. I left all the gameplay decisions until too late, being more of a programmer I concentrated on getting most of it built rather than prototyping the core aspects of the game. Though I am pleased with the code, not too overdesigned yet still in good shape despite the epic hack-a-thon trying to get it done.

The “levels” were all thrown together at the last minute. While I sketched them out before making them, they were in no way designed and were more of a show case of most of the stuff I had done, in no particular order. The rather weak “level editor” is possibly another cause of this, all it allows is the placement and deletion of obstacles, its quite hard to “tweak” levels because you cannot move the pieces of terrain around.

There were some nice surprises. My totally unoptimised Java code, running immediate mode OpenGL and using a native Java physics library that I believe defensively copies Vec2 instances when you read them performed admirably, at least on the two machines I tested it on. One was a laptop with a graphics card that didn’t support power of two textures, so I assumed the hardware wasn’t great.

Its fine to talk about Java coming close to native languages in theory, but its quite another thing to see it actually happening. I’d really like to try it out on a wider range of hardware to see how it performs. Maybe I would be disappointed though [smile]

Download link

Feel free to leave any feedback in the comments, or you could use the UFEC thread for the game.


Posted in blatent_self_promotion, Critters, GameDev, Java, programming, UFEC on March 7, 2010 by bbarrett

The deadline for UFEC approaches rapidly. I may not have sufficient time.

I have so much to get done, I have to take a clincal approach to my TODO list and cut anything that isn’t necessary. I’m just hoping there will be enough stuff left to leave a fun game.

One of the UFEC elements is fire. I’ve put in a simple rendering technique that makes decent looking fire, but I’m not sure that it will suffice. The entire game is done in immediate mode, combined with rendering not a small number of particles I’m worried that the game will perform well on slower systems than my dev machine. I have a simple optimisation that could speed it up a lot, but that would require time to write and test that I’m not sure I have. Water rendering and handling is something I’m hoping to do today.

Input is a huge concern. The game game feels awkward to play at the moment. I really want to have a mouse only interface, but it is tricky. The problem is that I can reduce the number of actions that the user might need to perform at once to three, but that means relying on the middle button, which never really feels comfortable to hold on. Holding down the button is an essential part of each of the three actions – pan camera, select critters and “apply current mode”.

The current modes are currently “proliferate”, “evolve” or “attract critters to mouse”. The really ugly temporary UI I have implemented for them will eventually be usable by clicking on the icon of the action you want to perform, with shortcut keys available too.

My evolution element is very weak at the moment, I have evolved types but they act pretty much identically to the “default” critter type. They are drawn a little different, but not even *that* different.

Some of the other things I was working on is getting levels to transition and keeping the camera inside the bounds of the map. I also worked on giving feedback for when a critter is injured, they flash red briefly. I still need to add some visual cue for how healthy a critter is.

Some more good news is that I’ve broken my level editor mode (which I haven’t touched for a while). I’m going to have to design some levels for this game, which I’m not feeling confident about. Hopefully it won’t be too bad.

This week is probably going to be crunch mode. I’m considering taking a day or two off work coming up to the deadline to try get this done. I’m just hoping that my enthusiasm holds steady. And perhaps my sanity.

Short video featuring some of the changes I’ve made:

Critters Game Update

Posted in Uncategorized on February 26, 2010 by bbarrett

I only finished a bit this week, I ended up doing less than I had planned. If I am serious about finishing this in time for UFEC then I need to step up development a lot. I hope to get a good bit done this weekend.

What I did get done though was some code to allow me to play some sounds. I don’t actually have any sounds made for the game yet – I might put out a help wanted request for that. At the moment I just have a test application that use lwjgl’s OpenAL bindings to place a few sounds relative to the listener and play them. One of the sound loops and moves around, just to test that too.

I also added in some code for allowing the critters to grow and split (a bit like cells). This will be the proliferation aspect of UFEC. You will have points, which will be obtained at reasonably regular intervals between some of the tougher obstacles. You can spend these points on multiplying your critters, or evolving them to give them special abilities. It is the latter that I sorely need to get working, hopefully this weekend should see the first one or two evolved types. There are some serious bugs with the proliferation code where two critters can get locked together, or a critter spawns around terrain. I will probably have to put additional collision geometry on the critters to make it work right.

I enabled the code that allowed the critters to take damage. At the moment they simply have their alpha value set proportional to their health, I will change this to a quick red flash when they are injured, and maybe they will look a bit grey when their health is low. I might also relax the springs a little bit, which might help make the injured ones look a bit worse for wear. If you use the proliferation action on an injured critter, it will restore their health before fattening them up or splitting them.

Video of proliferation mechanic in action.

I also fixed quite a few bugs, nothing particularly hilarious though.

I will finish up by saying that I’m thinking of calling the game “Primordial Blues”.

New game

Posted in GameDev on February 14, 2010 by bbarrett

I’m working on a game, a potential UFEC entry, depending on how finished it is by the deadline.

The gameplay will be somewhere between Lemmings, Fantastic Contraption and IWBTG if it works out.

Basically, you have to get a bunch of amorphous blob like creatures (currently dubbed ‘critters’) from the start position to the end of the level. There will be various obstacles and impediments on the way to prevent you accomplishing your goal. You can attract critters towards the mouse, guiding them but you don’t have direct control of them. I may eventually include a “mouse gestures” system to support command-verbs such as “leap” or “run”.

Currently, the obstacles are more of a nuisance than actual obstacles. I will soon be adding a damage system, so the little critters will be dropping like flies if you don’t take care of them.

I’ve uploaded a gameplay prototype to Youtube:

If you have any comments, they would be more than welcome!

Java GIF transparency stuff

Posted in Java, programming on December 2, 2009 by bbarrett

Still alive.

At work last week we had a problem with transparent GIFs. Our Java program needed to be able to resize images. However, the approach taken worked with all tested formats except transparent GIFs.

After searching the internet for a while, I was able to piece together a solution that a) worked and b) avoided unnecessarily allocating memory (which was a “feature” of most other solutions I found). It appears this is a relatively common problem, maybe some lost soul in a similar situation will find it helpful.
Continue reading

User defined macros

Posted in LISP, programming on December 21, 2008 by bbarrett

I have just finished hacking in user defined macros. For the moment they look like they will be up to any use I want to make of them at the moment. They are fairly simple, they are syntactically similar to functions. They must return a list. This then replaces the invoking code during compilation.
Continue reading

Back from beyond the grave

Posted in LISP, programming on December 15, 2008 by bbarrett


Long time, no post. I don’t really have an excuse for that. Just generally being busy and not having a huge amount of time for personal projects. Hopefully I will get a little time over christmas.

I’ve done a little here and there, but nothing that seemed worthy of an update.

Today, I have started back into my Lisp interpreter. I fixed a load of minor bugs. I’ve added small amounts of other functionality. For example, I have added a type, similar to Lua’s lightuserdata. To test it, I made a set of functions for file manipulation. That, combined with the eval function I already had allows me to define (purely in Lisp) functions for including files.
Continue reading