Interviews and Dune 2, Oh My!


Ok, so lots of interviews over the past couple of weeks. So far I think they have gone well.

I have been asked several times in my interviews if I do any projects in my own time. I usually end up mentioning my graphics engine, and also my earlier Java stuff. One project from first year was a remake of the classic RTS Dune 2. While not a finished project (by any means), it was awesome to work on.

Unfortunately, I didn't have the project readily available for interviewers. When I got home, I dusted off the old Java code and got it to compile (first try!). When I ran it, it kept freezing after about 14 seconds in. It took a while to pin-point the error, but it ultimately boiled down to playing sound effects. If I played the 'cannon' sound too many times in rapid succession, Java would freeze. Turns out, when I wrote the code (10 years ago!) I used the AppletAudioClip. Seems that the implementation isn't really the best (ala this Stack Overflow question).

SO, I replaced the sound implentation to use the Java Clip. After that, it worked great!

Now my next challenge is that the assets are ripped from proprietary products, mostly from Dune 2 itself, but also Dark Colony and Star Craft (and maybe some others I can't remember). So far, I committed the code to my GitHub account without these assets. I'm not sure of the legal issues that would be involved with using these assets, so I just decided to omit them.

Having said that, below is a video of my implementation! Please note that this was my first project after my first term at university, where I had just learned Java and Object Oriented Programming. Go easy on me :) Also, unfortunately, I couldn't get the sound to work properly with recordmydesktop (it kept making the video choppy), so I recorded some gameplay without sound.

That's all for now!



p.s. I found an awesome project that has implemented the original Dune 2 fully in the browser - check it out here!