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.

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: