• entries
    732
  • comments
    1562
  • views
    492419

Faff. Faff! Faaafff. Flail.

Sign in to follow this  
Ravuya

127 views

Hopefully everyone's enjoyed Glow 1.3 at least once. I think it brings the game much closer to my intended experience, although it does make survival mode awfully easy.

I've been flailing around for a bit. Waiting back on some more intensive playtest experiences with Novarunner to see if the whole experience is salvagable. I still can't derive much fun from the game, and most of the features which took me a long time to implement (such as commodities) are no fun to use and nobody wants to use them.

But enough being depressed about Novarunner; let's talk about the bright future that Afterglow is providing.

I finally decided that I was going to do something about my horrific serializer stuff; even though Novarunner has a really great save/load system rigged up without the ugliness Glow had, it's not perfect and is pretty prone to errors and inconsistency. So I decided I'd design a code generator to build the serialization functions for your class, and you'd just slap this into your build process. Makes sense, presumably, but I haven't sat down and worked out the vagaries.

So here's the use case:
<Class name="Actor" Output="../src/Game/Actor.Serialization.cpp">
"health"/>
"inventory" type="Inventory"/>
Class>

It would then produce something like this:
SerializedNode Actor::Serialize() const {
SerializedNode thisNode("Actor");
thisNode.SetAttribute(this->health);
thisNode.AddChild(this->inventory->Serialize());
return thisNode;
}
void Actor::Deserialize(SerializedNode root) const {
assert(root.GetType() == "Actor");
this->health = root.GetAttribute(this->health);
this->inventory = new Inventory();
this->inventory->Deserialize(root.GetChild("inventory"));
}
Haven't worked out how this will deal with inheritance, or messy reference patterns (references instead of pointers, smart pointers, null references, shared references, statics, etc). It might be more work than it's worth, but it's certainly less ugly than writing macro tables like we did in SS3.

When will you see screenshots of Afterglow in action? Well, I should be getting the basic shell application up and running this week, so you might see the map getting rendered. That would be impressive, no? Especially since I'll do it right this time instead of a huge pile of monolithic hacks. [rolleyes]

One thing I want to talk about later is how I'm taking the "messages" system from Novarunner -- except this time I won't be running four or five different kinds of message systems. I plan to share a single message system, and that will be the core component of my "scripting" replacement, and hopefully even make it easier to visually debug.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now