A little Dweller prep-work
After looking at several roguelikes out there (Stone Soup, and now
Dredmor), we decided almost unilaterally that 20x20 was essentially a
stupid tile size and an increase was in order. At the same time - and
after playing quite a bit of Stone Soup and exploring large levels - I
decided that the game needs to have a scrolling camera to accomodate
arbitrarily-sized levels. The scrolling camera was borrowed from
Doglion's tutorial
(http://thedoglion.wordpress.com/2010/08/10/flashpunk-tutorial-03-camera-movem...,
so I won't go into it here. It was astonishingly easy to port.
bunch of general game settings, you also need a lot of thresholds
(min/maxes, bounds, edges, etc.), variances (how much you want your
thresholds or averages to vary). Then you have all of your arrays -
stats arrays, weapon arrays, layer arrays, direction arrays - and rather
than hardcoding them with text values which may or may not change on a
whim, and may not be consistent, it's best to use easily readable
constants as indices. I stole this from Dolgion most likely, but it's
something you should probably start doing right away, before you get
lost juggling arrays and indexes. So, my original rendering code actually predates that particular
discovery, so resizing the tiles was a two-fold task. First, I had to
find all instances of "20" and change them to GC.GRIDSIZE, and then
change the GRIDSIZE to 32. This basically meant grepping for "20" and
then slogging through the code to make sure the 20s I was changing were
the right ones. If I had done this GC file from the start, all it
would've taken is a single line change in GC ... Moral: if you find yourself using the same numeric or text value more
than 3 times, throw it into a constants file. If you don't have a
constants file, MAKE ONE NOW.
