Mage Tower Alpha 0.1.1 released!

Not a ton of new features in this release, but more bug and UI fixes than what could fit into a bag of holding. Some of the highlights include:

0.1.1 Changes


  • Bugfix: Can now build on upper levels
  • Bugfix: Mages can't get stuck in walls (or at least, one major case was fixed)
  • Bugfix: When mages run into walls, they realize the error of their ways and figure out where to go
  • Bugfix: Mages will now find the shortest route
  • Bugfix: Mages don't try to build something unless it has supporting structure
  • Bugfixes: A bunch of other tiny things along the way
  • UI: When using the menus or pressing [Escape], the current tool resets
  • UI: Added buttons for movement and rotation (zoom controls...just ignore those)
  • UI: When no tool is selected, the world can be dragged around
  • UI: You can now build on top of blocks that don't yet exist, queueing your building plans.
  • Backend: Added rigorous automatic testing to better handle bugs


We have quite a list of future fixes in the current version, but we think it's stable enough now that we can add another feature or two to add more gameplay. Go download or play the demo, and make sure to give us feedback!


Announcing: Mage Tower!

After months of development on the prototype, we're excited to reveal what Codename: Jenga really is!

Take the depth of Dwarf Fortress, add a bunch of lazy mages, and update the interface to modern standards? That's Mage Tower in a nutshell. We're starting small and building it bigger and bigger, and you'll be able to play it the entire time!

Many companies nowadays allow users to buy early versions of a game during alpha or beta. Soon, Mage Tower will be following that path, allowing you to pre-purchase the game and play it immediately, rather than wait until it's complete. For now, a demo is available.

There's a LOT we want to add to the game, but we're a small team, so it will take a while to get through the list. For now, here's what you can look forward to:


  • Mages with character! Their own interests, knowledge, and traits
  • Villages, dungeons, dragons, and mines!
  • Magic! Enchantments, golems, mind tricks, and explosions
  • Collossal towers floating in the sky
  • Powerful magic that carries risk as well as reward...


We're building something really ambitious - a world that you can build to your own whim, while carefully balancing resources, knowledge, and external threats.


Red Button Bulletin 6 - THE WHITE BOARD ROOM.

It's been a couple weeks since our last bulletin. So to make up for that, we'll have pictures for the first time!

Recently the "company office" underwent a major revision, making it much more enjoyable to work in and usable.  Unfortunately, we really only have "after" pictures, but there's still plenty to see.  Here's a breakdown of what we did:


  • We replaced the old wall-attached desk with a new T-shaped desk.  It lets 2 people work at once, but the new desk at least doubled usable desktop space.
  • By removing the old desk, we moved the file cabinet from underneath to be able to put two full desktop towers underneath.
  • We ran a network cable to a switch underneath the desk, rather than using the previous wireless bridge.
  • And, arguably the most interesting, we covered every vertical surface possible in white board paint.


 Now, we have a great place to collaborate, visualize our ideas, and well...doodle!


This is a view of the desk, set up with two workstations, the main one on the left with 3 monitors.  Any vertical white surface you see is now white board - most of which have something written on them already.



The wall facing our backs has the biggest usable space, and that's where a lot fo the brainstorming tends to happen.  You can see some state diagrams, UI prototyping, and a few other random doodles.

Doodles can come from anything - even some brilliant WIP terms like "super stone."


We also put a cat door between the office and utility room - to keep the noise and smell out of the main room.

Here are the two desktops and a switch, out of the way and safely under the desk.

And of course, there are doodles all over from visiting friends. 


This is an awesome Christmas gift from a friend of the company.  Seems awful familiar...


One thing that you'll have to understand is that I'm a bit obsessed with BrodyQuest.  I'm fully aware of how ridiculous it is, but IT'S SO AWESOME.  It's also the first thing I soundcheck with whenever I set up audio equipment.  My wonderful fiance decided to surprise me by creating the full progress of BrodyQuest on the overhang in the office, complete with cutouts for Brody, his guitar, and the friends he picks up along the way.



Above is almost the entire drawing of OfficeQuest.


And there you have it!  A ton of pictures of where we work, with some details about Codename: Jenga snuck in there.

Thanks for reading!  If you have any comments or questions, or have suggestions for topics for future Red Button Bulletins, contact us either on FacebookTwitter, or email (info [at] redbuttongames [dot] com). Follow us on Twitter and Facebook as well!


Red Button Bulletin 5 - Life-work balance

This week's topic isn't technical at all.  It also won't be nearly as in-depth, but it's personal - it's just a few thoughts around the idea of life-work balance, a.k.a. making sure you don't become a workaholic.  It's a term I've heard thrown around in IT and software development a lot, but in game development it's usually called quality of life.  Because both of these worlds approach the problem in different ways, I'll approach what the term means in both of these fields, my struggle with it, and what I'm trying to do to fix it.

Life-work balance in IT

The typical job in IT / application development expects 40 hours week, with some overtime.  Depending on what role you serve in the company, this could mean pushing operating system updates, deploying a new version of an application, or crunching to meet a deadline.  Even though there is some "crunch time" in the way game developers use the term, the typical issue IT/developers tend to run into is constant availability.  A given work week might only consist of 40-50 hours of work, but some of those hours tend to be during inconvient times.

Quality of life in game development

The typical job in game development has a similar baseline for hours (40 hours / week), but it tends to ramp up much more during crunch time - typically running 60+ hours / week for weeks to months at a time.  Although there isn't as much "emergency time" needed as a job in typical IT, the sheer commitment of time is much higher.

My story

I've been lucky enough that neither of these issues really define my balance in my career.  It's rare when I work more than 40 hours a week at my main job, and when I do it's only to make up for hours lost the week before.  As far as work goes, it's been balanced pretty well.  However, I tend to take on commitments to fill up whatever time I have left.  Only a couple months ago, in addition to working full-time as a Business Intelligence Consultant, I was doing contract programming work, starting Red Button Games as an official business, and doing a ton of programming and planning work for a charity gaming group I help run and participate in (72 hours remain).  My biggest long-standing issue in life-work balance is over-commitment and spreading myself too thin.

The Future

All these points in mind, I realized that since I was starting a company, I can make whatever goals I want.  It's really tempting to put all my time towards the game (since I'm so passionate about it), but I realized I really need to focus on avoiding the three major pitfalls: costant availability, commitment of time, and over-commitment.  I hate the American system of only having 2 standard vacation weeks, so why not have 4?  I love the idea of taking an afternoon to just play something, so why not?  And most importantly, by going full-time working on the game (instead of working on it part-time AFTER a full-time job) I free up a lot of the stress and over-commitment I've dealt with my whole life.  I'm getting married, have a house to maintain, and have a beautiful summer to enjoy - not sitting in a codecave my whole life.

~Daniel Frandsen, President of Red Button Games

PS: Make sure follow us either on FacebookTwitter.  You can also contact us via email: (info [at] redbuttongames [dot] com).


Red Button Bulletin 4 - Architecture Algorithm

Another technical article this week - this time digging into one of our active pieces of development.  Most likely, the algorithm will change sometime after this post, but it's what we've been doing the most heavy development on lately.  It will be one of the key systems that will provide the "fun" in the first Milestone for Codename: Jenga, but for now the actual algorithm is a little dry.


In Codename: Jenga, players will be building a structure, a "tower" of sorts.  We wanted the tower to have realistic physics, but we also wanted to allow some fantastical structures.  The universe in which the game is built needs that hybrid, straddling reality and fantasy.  So we needed a way to calculate how much "realistic stress" is being put on the building as a whole.  The "world" is a 3D grid - so each block has 4 neighbors adjacent to it, plus a block above and below.  The algorithm discussed below accomplishes that.


A couple terms for those learning or need a quick reminder:

Set - A collection of objects.  The only use this collection has is to determine whether an object exists in the set.  There is no way to get a list of objects in the set, to iterate through the object, or to order it - but it's VERY quick to determine if an object exists.

Queue - A FIFO (First-in, First-out) collection of objects.  When getting the next object from the queue, it gets the object that was there the longest.  Think of it as a line at the coffee shop - the first person in the line is the first to get their order.

Block - A grid element in Codename: Jenga.  Not every object is literally a "block", but logically that's what they're called.

Leaf - An object in a tree or graph with no children.  In this case, it means that it's a block that we'll start calculating from.



The first step of the algorithm was to develop a method to "calculate everything" and would deterministically come up with the same output.  The general design of the algorithm was to start at the ground floor and iterate generation by generation until no more connecting blocks could be found.  As each block was added, if it caused additional stress it would add the stress to the total.  The first iteration of the design used the following steps:


  • Add all ground level blocks to [SearchSet] and [SearchQueue]
  • {A} Get next block [CurBlock] from [SearchQueue]
  • Check neighbors of [CurBlock]
    • If neighbor is a generation earlier than [CurBlock], it can supply support to [CurBlock]
    • If neighbor isn't in [SearchSet], then add it to [SearchQueue] and [SearchSet]
  • Add up the support of all neighbors, record the end stress and generation of [CurBlock]
  • If blocks still remain in [SearchQueue], loop back to {A}


This is a simplified breakdown - but you get the idea.  It iterates over the 3D grid of blocks, sets the stress level and generation, and moves to the next block.


Each block contains pieces of metadata - the weight generation, weight value, weight support, and external support.

Weight Generation - A number that represents how far away the block is from the "root," or in this case, the ground floor.  This is helpful in determining which blocks support other blocks.

Weight Value - The amount of weight stress the block puts on the structure as a whole.  A floor for example, has a value of 0.1, while a solid block has a value of 1.

Weight Support - The amount of support the block provides to blocks above it.  A floor's support value is 0, while a solid block has a value of 1.

External Support - The support that a block receives from the blocks below and around it.  The more external support a block has, the less stress it puts on the structure.

The final stress value for a block is calculated once external support is calculated:  [External Stress] = [Weight Value] * (1 - [External Support]).  External support is additive - so if a block is supported by multiple sources, the block is very stable.


But wait a minute...the algorithm above recalculates everything from scratch.  We don't want to recalculate the entire tower if we only added or removed one block, that'd be really expensive!  So we needed to refine the algorithm for how it's going to be used 90% of the time - recalculating local changes and figuring out how it affects the whole.  This ends up being really complicated, since there a lot of things to consider, but the key to local calculations was the Weight Generation data.  Using the data stored in each block, it's very easy to start at one block and find the set of affected blocks.  The general rule is: if this changed block has a generation smaller than its neighbor, add the neighbor to the recalculation set.  This rule is iterated until no more blocks are found that match the rule, and a variation of the above algorithm is applied to that set of blocks.

Once the set of recalculation blocks has been created, you find the leaf blocks with the smallest generation, and start the calculation there.  There is some additional filtering to prevent the recalculation from going outside the set, but the logic is essentially the same - recalculate support, determine possible support based on Weight Generation.


Just when I thought everything was resolved, I started trying to remove blocks.  This got tricky because much of the algorithm depended on the "starting block," which was usually the block that changed.  However, when removing a block, there's no longer a seed to start the process!  This involved even more sets to track various coordinates - the removed block set, the recalculation set, and the leaf set.  We're still debugging this algorithm, and the logic is a bit too complicated for me to wrap my head around without examples or visual aids.  Trust me though - things get tricky.


But What About the Fun? 

This algorithm alone doesn't do much, but it does give us a lot of data we can use for cool effects.  In Codename: Jenga, you'll have a power source to support the structure.  If your power source is a higher value than the stress on the structure, then your structure is fine.  But if the stress ever surpasses the power source...well, things are going to fall apart.  And that's the biggest hook we'll have in our first alpha/pre-beta release - the structure creation and destruction.  We think it's a really cool concept that hasn't been done very well (if at all?) before, and it's part of the foundation for the world we're building.


Thanks for reading!  If you have any comments or questions, or have suggestions for topics for future Red Button Bulletins, contact us either on FacebookTwitter, or email (info [at] redbuttongames [dot] com).  Follow us on Twitter and Facebook as well!