I’ve had a holiday and have worked on D2TM from there when I felt like it. The result is actually quite nice.
I have rewritten the selecting box logic, so now all mouse logic is in a Mouse class. Finally. I have also found this memory leak, which really wasnt a memory leak but sloppy initialization.
Also, I have made it far more easier to determine if a mouse is within a specific box of coordinates. Welcome the “rectangle” class. I have used it now in a few places and I intend to update the code where I find similar logic. I love removing code and keeping the game working.
Last but not least I tried to make the credits animation even more fluent. Although the animation did not get more fluent I did refactor the CreditsDrawer class.
I will be working on the GUI related stuff now again, so the menu looks ok and a new version can be wrapped up. Can’t wait? Then just check-out the source code 🙂
I’ve been quite busy with real life things. But D2TM is not far from my mind. Most recently I’ve discovered a memory leak. And its eating up all my time. So do know it is still being developed on.
I had refactored quite a lot. So much that I had broken a few existing features. Like skirmish mode. Just entering skirmish mode caused the game to crash. This is now fixed. I can now continue fixing up the GUI there and then finally release another unstable!
You might wonder if there is any progress. Well, wonder no more, but enlight yourself with the google code updates link…
So, in short, yes I am working pretty much on the project. I compare it a bit like a operating on a patient: multiple bypasses, a heart surgery, and much more still to be done.
However, although I have officially broken with the old code design and I’m trying to decouple as much of the components. (it really looks like spaghetti code with meatballs sometimes). It does mean I code a lot, but feature wise it will not be much better. In the end the code should be much easier to understand, maintain and so forth. This also means adding new features should be easier.
Currently I’m working on ‘getting skirmish to work again’ as I have broken serious initialization code in my previous commits. Once that works, I’ll fix up the drawing of the menu’s a bit and then release a new unstable.
Btw, thanks for visiting my blog post about refactoring. Looks like a lot of people read it. I’d like to hear what you think of it, so leave a comment or mail me. Thanks!
Always wondered what is meant by Refactoring code? Basically it means : change the code but without changing the observable behavior. A developer does that to improve readability, reduce complexity, make it easier to maintain (find bugs and fix them).
If you wonder how such a refactoring looks like, you are lucky because this blog post gives you a very nice view on how it is done on Dune II – The Maker.
This weekend a few patches have been applied, submitted by Peter. The optimal screen detection mechanism is much neater now. Along the way code has been cleaned. The project structure has been changed a bit as well (all source files are now under a SRC folder). Probably the structure will change a bit from here since I want to apply some architectural changes to seperate some concerns (or atleast, make a start).
Another feature (also thanks to Peter) is that you can now specify your resolution in the GAME.INI file. Also you can specify if you use the MP3 add-on and if you want to run the game full-screen or windowed.
On top of that, a patch has been applied so that the game should be more friendly for Linux 64 bit users. I don’t have a linux distro running, hopefully someone should be able to confirm this. Also, the build process should have been more fluent for linux users as well.
All in all its getting better and better! I’ll probably be releasing a new unstable release soon.
It has been a while. I’ve been very busy with real life issues. However, I’d like to thank you all for contributing to this project. Recently I have recieved 2 patches within 48 hours. One fixes the harvester stuck bug. Another regarding fblend and 64 bit linux OS’s.
I encourage you to keep doing this. I am always open for enhancing the project in many ways. A lot of things are on my TODO list. But if you are an expert on one of those things, don’t hasitate to contact me. A few things on my wish-list:
– restructure the project
– make it easier to check-out, and compile/run on your OS
– run unit tests (In java or C# this is so easy, but for C/C++ I haven’t found an easy way yet)
It is christmas evening (atleast now in the Netherlands). And, as a little present to you I have released a new unstable release. A new feature is that it will automatically try to find the best suitable resolution in full-screen mode. For now it uses the following resolutions: 1920X1080, 1600X900, 1280X1024, 1024×768, 800X600.
I’ve had the chance to use a wide screen monitor. And, I noticed the 800×600 resolution is just not that nice with such monitors. Since I had been rewriting the GUI parts, I just thought I would pick it up and make it really flexible now.
Its not done yet, but since most important functionality is already flexible, the game is very playable. But, it just not looks right.
Here is an example, running on 1024×768 resolution. I have also tried it on 1600×900 , and it works like a charm. The white rectangle is where the, so called ‘candybar’ will come. After that I have to fill up the sidebar properly and give the icons more space.
I’ve had some problems with my internet connection lately. And, when it worked… I was playing Starcraft II a bit. Really liking that game.
On D2TM news, I have moved around some code. Next thing to do is to fix all screens to fit 800×600 resolution. I will probably redesign the Skirmish menu. Perhaps you have a good idea on how it should look like? If so , place a comment.
After all that stuff, I will work on the unit code. That would really improve the game quite a bit. Once the unit code is refactored, there is so much more to do… let me elaborate: an options menu, rewrite the skirmish AI, score system/statistics, bigger maps (128×128 or even 256×256 max). Refactor some in-game effects… Multiplayer.. Probably some other neat ideas you come up with … Oh so much to do and so little time 🙂
Do you already follow the dune2themaker twitter? It will tell you immediately when certain new features are being ‘delivered’ in the coming version. This is thanks to Pivotal Tracker that pushes updates to the twitter account. Neat!