C++ Parser for SOML

10 01 2013

I’ve recently finished writing a parser for my XML-alternative, SOML, in C++.  It’s been uploaded along-side the C# and Python parsers on the Google code page.  Links, and more information can be found on my portfolio.

Final Changes

15 08 2012

I’ve finally wrapped up most of the changes I’d intended to complete before the first release.  I just need to clean some things up and package it up all nice, and I’m set.  In the mean time, here’s the change log for the latest revision:

  • Reorganized classes and namespaces for greater structure as the project expands
    • All the *Type classes (ItemType etc) have been moved into a Templates folder/namespace
    • All the classes representing in-game objects (tiles, items, etc) have been moved into a GameObjects folder/namespace
    • Scripts have been moved (prior revision) into their own subfolders within the resources folder
  • Tags have been given a  fairly hefty overhaul
    • Tags now track their parent as well as their children.
    • Tags now allow searching by datum, meaning that you can search for the strength value of all mobs with “[mob type/stat:strength]”
    • The item, mob and tile datafiles now support a template system, detailed in a previous post
  • Fixed entity movement (to/from tiles and entities)
  • Items have  been mostly completed
    • Item types are loaded from data-files like tiles and mobs
    • Items have stats
    • Items have equip slots (incl. values for which slots are used at a given time)
  • Mobs now have equip slots/equipment
  • Mobs can now pick up, equip and drop items
  • The inventory screen has been worked in, and allows for examining, equipping and dropping items, as well as viewing current equipment and stats.

More Features and Further Delay

9 08 2012

I probably could have gotten a release ready today, all I need to do at this point is add the ability to equip items (equip slots and such is already written), but as I’ve worked, I’ve come up with one small idea after another, and so today’s progress, while it does involve a fair amount of code, didn’t really put me much closer to a release.  I have, however, added quite a bit.  Namely, stats, instead of being just a dictionary of decimal values, are now their own class, containing not only the name and value, but also viewing permissions (can it be viewed on the player’s stat screen?  what about when examining a monster?).  This required a rather heavy rewrite of the stats framework, though it was greatly simplified via some LINQ.  I’ve also replaced the previous “default” tag structure in the mob and tile files with something a bit more flexible: templates.

A template is defined with a [template:template name] tag, and then added into a mob or item by placing that same tag into it’s definition.  Moreover, a template can contain other templates, allowing you to have, say, a humanoid template defining body parts, and an orc template which defines some base stats.  At the moment, all the templates can handle are stats and equip slots (both of which can be not only added by a template or mob/item, but removed), but I may add support for other things later as well.  A list of all implemented templates is stored within each mob/tile, and is used not only for future reference (is this an orc?) but also to avoid endlessly recursive situations, in which a template calls itself, or a template that calls it, or so on.

In addition to all these changes (and the various fixes and rewrites required to make them function) items are now loaded from a data file as well.  All that’s left now before a release is applying equipment, and possibly a new inventory/stat viewing screen.

Time Management

6 08 2012

Tower of Azari now has a time management/turn system which is almost entirely handled in scripts (with one exception which I’ll get to in a moment).  Each mob has an AP stat and a speed stat (as defined in the data files) – actions subtract AP (though you can take an action for which you don’t have the AP – an excellent example of a “feature” which could be changed with just a couple lines in a script).  The mob with the highest AP is always the one to act, and once all mobs run out of AP they all have their speed stat added to it (note, *added*, so if an action put a mob into the negative, they’ll not have a full set the following round).

I’ve also added the ability to pick up items, and examine them through a very, very simply inventory screen. They can’t be dropped, and it’s all hard-coded, so no script access yet.  I plan, for a future release, to add support for “Abilities”, which can either be tied to a letter-key or chosen from a list (if no key is assigned).  Once these roll around, there will also be a way to flag certain abilities as starting abilities, so the player can always do things like pick up items, but spells might have to be unlocked, for example.

However, for the next release my goals aren’t quite so ambitious.  I just plan to get dropping items in (again, hard-coded and hacked together for now), and equipment, which will involve the addition of slots, item types, etc to mobs and items.  Once that’s done, I’ll bundle it all up in a clean release, and stick it up somewhere for the public.

Goodbye Lua, Hello C# Scripting

5 08 2012

One of the key aspects to my rogue-like project, Tower of Azari, is modability.  Not just in the form of Dwarf-Fortress style RAW files, but also through extensive scripting support for everything from map generation to basic movement and combat.  Previously, I had built in support for Lua scripts, which were interpreted at run-time every time something happened.  Unfortunately, this created a problem of efficiency.  I had to be careful to keep the Lua code simple, and due to my unfamiliarity with the language, had a hard time keeping it fast.  Yesterday I tried implementing IronPython as an alternative, in the hopes of getting something a bit faster and more familiar, but it ended up being even slower, by a long shot.

As such, I’ve opted to shift the scripting over to C#.  There are several reasons for this, really.  The first of which being – I’m already quite familiar with C#, and it saves me having to learn another language, as well as removing the need for any binding.  The other being speed – the C# code is compiled into an assembly at run-time, and stored in memory, meaning it runs just as fast as the rest of the game.  There still a good bit to do before I’ll feel comfortable doing a release, I need to get map generation in (and be handling via scripting), then I want to get items/equipments working.  Once the game can generate at least a single floor, and equipment is in, I’ll see about getting something out for the public.

SOML Update

31 07 2012

I’ve updated the C-Sharp parser to a similar, one-file-one-class version, more like the Python one.  The API has changed, and the new version requires .NET 4 (uses the Tuple class), so I’m leaving the old version up on the Google Code page as a depreciated file.  I’ve also added some simple API documentation for both versions.  The work here is mostly due to an increased interest in my Tower of Azari project, which I’m hoping to release a new version of soon.

Portfolio Website Completed

11 04 2012

The portfolio website is completely built now, and can be found at tsassone.com  It has all the projects I used to host here as well as at least one I didn’t: the Shadowrun dice roller mentioned in the previous post. Read the rest of this entry »


Get every new post delivered to your Inbox.