I feel like I’ve been spinning my wheels on Fallen Elements 2 lately. So, I’m going to try to write a list of what I’ve actually gotten done in the past few months, to see if this is actually the case. Let’s see:
- Original Object Return (a la wxPython) for scripting. This allows the same Python object to stay attached to any given C++ object over its lifetime, and for C++ objects that do not have a Python shadow class instance yet, a shadow class instance of the correct type is created. This is actually some fairly neat code, I might post it online here in a while.
- New event system. This makes subscribing to events on a certain object a lot more flexible (no Java-style GroupOfEventListener classes.) It also works from Python in a nice, clean way too. There’s also the concept of EventChannels that makes listening to several objects at once very very simple. There are some issues with it that still bother me, though:
- Defining event ID’s is a little annoying
- Binding/unbinding has ugly syntax (might need a macro)
- It always holds a strong reference to the listeners on the emitter class
- The old event system (which was much worse) is still in use in certain places.
- UI system begun. It happens to have a fairly clean design and although there aren’t many widgets set up yet, it’s fairly easy to use from Python. There are some things I still need to fix with the way keyboard input gets fed to it, but it’s basically in pretty good shape.
- A lot of the physics code was cleaned up and refined. It’s all in a nice pretty phys:: namespace right now, and the Visualizer class that displays meshes of physics objects works using only the event system; it’s very very clean.
- The ‘fe2′ Python module generated by SWIG is now actually a package; SWIG actually generates a module called fe2.fe2core, which fe2/__init__.py imports symbols from. This means Python-side utilities can show up under the fe2 package without having to hack them into SWIG definition files.
- The SWIG definition files were reorganized to use proper %includes for the classes they need to build on, instead of having to rely on being ordered correctly by me (which is a pain to keep up with.)
- The ConfigSystem that was originally implemented in Python (don’t ask) is in C++ now, as it should be
- Removed binary font formats, we just read AngelCode .fnt files directly now
- Renamed all the instances of ’4E4′ to ‘fe2′ that I can find, including in repository paths.
- Have a basic console system coded up; however, it’s not integrated into the game yet
- More efficient profiling system. It was originally intended to use RDTSC, but it turns out that’s not usable for profiling on my Athlon 64 X2 processor because it’s not synchronized on both cores, so it uses QueryPerformanceCounter.
- Some of the code is verified to work in gcc again; I haven’t tried to do a compile under Linux since January or so. Now that VMWare Server is free I think it’ll be much easier to do test compiles.
- Added lots of unit tests to the support code, using CxxTest
- Clockwork persistence system overhauled to use a much cleverer “flat” persistence scheme, which should make saving/reloading and eventually networking and demorecording much easier on my brain
- Started maintaining an SCons build script for some of the modules; this isn’t properly set up to compile all the way yet, because I don’t have all the dependencies on my laptop, but it’s not difficult to finish
- Finally got a nice high-level architectural view of the engine in my head in such a way that I don’t expect it to shift all over the place by next month
- Preliminary designs for how to efficiently render San Diego while allowing decently fluid motion across a several mile wide area
- Preliminary designs for a package system that should make working with assets a lot simpler overall
- Lots and lots of source code cleanup
Okay, well, that makes me feel like at least I’ve gotten something done since my last post. A lot of that stuff is inane obsessive-compulsive type fixes, and it’s largely undirected work even though I theoretically have a milestone I’m supposedly working towards. I haven’t been working on it too intensely in the past month or so, but I intend to get back on it soon.