Archive for the Java Category

Deadlines

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:

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