Recently I’ve been doing some pretty hard coding. As you may have already seen in the previous post I’m currently the developer of social-networking site for relatively young company. This is my primary project currently, one that I do for living. I won’t speak of any details for now, but from the technical side it provided me with an opportunity to enhance my Python coding skills and I must admit, that I’m much better at it then I ever was before in any other language. I’ve learned much about web application frameworks and technologies for Python. Despite it being a business project, I’ve really got into the guts of Python. However one has to make some breaks from continuous work on one programming project and sometimes you have to take a break. But what better way to spend some time than spending it over just-for-fun programming projects?
Some of you maybe lost hope regarding my old Master Of Orion 2 Graphics Viewer/Editor and my 4X game Galaxy Lords. Well. If you were patient enough and you’re still looking at this blog sometimes I may have some nice news for your eyes. Last month I had some time and will to work on both of them. I’ve decided to try and finish as much as I can in the little spare time I have left. But let’s get to the point.
We’ll start with my game project – Galaxy Lords. I’ve done some startup work at planning and writing basics of what is going to be, a full-blown game engine. First I started with creating a directory layout. The engine core consists of few basic elements:
- Audio
- Game
- Graphics
- Input
- Math
- Misc
- Network
- Physics
- Scene
- System
Those elements should be self-explanatory. They are basic subsystems of the game engine. Each subsystem consists of further classes, objects and functions related to it. But it doesn’t end only at directory and engine layout creation. What I did are also prototypes of functions and classes within those subsystems. Some things like various managers are already implemented. There is very core of the engine finished (like State, Progress, Event managers) and some mathematical functions like Vector operations. The library used for displaying graphics for this engine is choosen. It will be the excellent Rabbyt library created by Matthew Marshall. Networking support will be done probably with Twisted networking library and both audio and physics subsystems are yet to be determined. I have some ideas for this engine, but my knowledge regarding game engines is still somewhat vague, so I won’t get into details. If I manage to bring this engine to state of usability sometime I’ll certainly publish it for free. But in my opinion it’s still some months off.
The second thing is my Master Of Orion 2 Graphics Viewer/Editor. Because my Python knowledge significantly improved over last few months, and after Siron published my descriptions of MOO2 gfx formats, I decided that I have to provide at least usable tool for modding graphics in MOO2. I’ve taken a look at previous code and decided that I should start from scratch. Tonight I’ve written from scratch almost seventy percent of previous viewer code. This time I had few things in mind when coding. First was to create clearly structured and easy to read code with multitude of comments for anyone who would like to learn how to read and write graphics in MOO2. Second was to write universal, reusable classes so they could be incorporated in another people’s projects. They should have obvious interfaces, be well commented and easy to use. Another thing was: “no more dirty hacks”. This time classes and functions are written until they are finished and polished, as well as retaining a wealth of functionality. This also allowed me to optimize the speed of those routines. Performance improvements are quite drastic, however they are nowhere perfect (especially considering pure C/C++ functions that could be reimplemented to do the same). However their speed is very good for activities like loading/saving, extracting and also for simple manipulations.
State of this project as of now is that I have a working Color, Palette (with fancy operations like mixing and blending) classes, there is fully functioning LBX archive extractor, compressor (though compressing LBX needs two more functions to work) and there is a Graphics class that has fully functional loading of graphics and animations and also have some functions for saving graphics (however there’s still some more work to do on saving). Classes and functions are very well commented, well structured and should be fairly usable for other programmers. They also have extensive error handling and checking. I tried to optimize them for speed whenever I could at the expense of some memory requirements. However overall reimplementation should result in more consistent package that can be reused.
Things that are still left are some functions to enable saving graphics and Converter to editable graphic formats like GIMP palettes and GIF/PNG files for graphics. There are some functions left that would also allow dumping graphics data in various raw formats like CSV, arrays, text files and other things that may be useful for future programmers. Graphical User Interface is also lacking because I have set my goal for providing useful base classes library and well tested command-line tool that works first, before I’m going to do anything with user interface and further improving usability for normal user. Hopefully I can finish this tool soon, demonstrate it’s ability in modding MOO2, write some tutorials and documentation so users and programmers alike could start messing with this tool, providing enough feedback for stable base. If that would be the case I’ll consider writing more user-friendly tool directed at general modding community.
I don’t have anything to show you currently, but I must admit that I’m quite proud of myself for reimplementing this project in such a short time and breathing new life to it. Perhaps if it was not for Siron’s post that somehow put pressure on me, this project would be still dead. However I expect to devote some time to it as my free time allows, so expect some more news on the topic in the near future.
DUUUUDE!! i have been looking for the MOO2 ship sprites for FOREVER. please can i use your image extractor? or perhaps you already have all the image files? please email me dougfunny@gmail.com
may i have it also?
kitsune909@gmail.com
Hiya, I am trying to find out how to import my own grafics (ie. leader portraits) to moo2. I am using moo2-workshop, wich includes an lbx editor. I am able to view and to export the graphics, but I dont know how to change the exported graphic and how to import them again, so that they will work ingame. I hope you can help me out 🙂
Markus
Regarding MOO2 Workshop I think it doesn’t allow importing graphics yet. You should ask Griz De Grig, author of this program. My program does that, but it’s outdated and very complicated, so unless you are programmer there is no way to import graphics to LBX files as of now. I’m currently occupied with my day to day work, so development of graphics import tool is postponed until I find some time and will to resume working on it.
Just a quick question. As you seem to be interested in 4X games, are you familiar with FreeOrion, a non commercial community game project currently being developed?
http://www.freeorion.org/index.php/Main_Page
Sorry for late reply. Yes, I am familiar with this project. However it’s principles doesn’t suit me, it’s way too much resembling GalCiv II than MOO2 – which is still the most balanced 4X space game to date.
I have downloaded moo2gfxview-0.0.8.tar but failed to run it. What qt library does it require and is it still available?
Or is moo2gfxview-0.0.8.tar no longer up to date?
Cheers!
Wolf