Code [][] - Page 1

Sun, 01 Apr 2012 17:05:36 GMT
Tags:dcsb screenshots
I realized I haven't put up ... well, anything lately so here's a small dev update and a couple of screens.

First, my ghetto starting screen. It works - and yes, the player class loads from XML with its own stats and graphic - but that's about all I can say for it. :)

Second, range-finding. The goblin started out far to the left, and the bat started out below. The goblin searches for things nearby to hurl things at, and then doesn't because there are walls in the way. :)

I also revamped skills to allow them to be more atomic. A skill can now modify the amount of times skills are processed without breaking itself, for example. This is useful for creatures with special abilities such as double move, double throw, double spell, or potions of speed that allow any move or skill to be performed an additional time. So yes, stacking items of speed is now effectively in the game ... for NPCs at least. Player skills are another story.
Mon, 19 Mar 2012 21:47:46 GMT
NTSo that whole worldbuilding thing ...
Tags:dcsb worldbuilding

Kinda fell by the wayside. I'll attempt to remedy the remaining 23 days (HAHA) into some sort of cohesive entry here. Of most interest to me are Trades (Day 11), for the simplified dungeonkeepering that you'll eventually do, Weapons (14) because well, you know, Politics/Officials (16) to shed a bit of light on why you'll find certain features in the world, Legends (26) for some sort of persistence layer, and that's probably it. I am torn between wanting to spend more time on the creative aspect of the thing and time constraints that say I better focus on the immediately game-affecting components first.


This world is relatively high in magic and low in mechanical invention. As such, you are far more likely to encounter alchemists' workshops and supplies, rune tables and crystal cutters, imbued scrolls and dimensional portals than hacksaws, chisels and anvils. It is rumoured some far off cultures have mastered metals to rival the best enchanted steel, but since the latter is far easier to get a hold of, these weapons are mostly curios. You will find basic weapons and armor - hardly more than slabs of raw metal or strips of leather - easy to come by; from there, you'll apply magical and alchemical processes to them to make them into something more to your liking. Everyone (dungeon inhabitants and questers alike) picks up a bit of this, and you'll be able to improve your skills along the way.


Because of this magic-inclined world, weapons don't really tend to have a lot of variety. Everyone starts off with a set of simple items and then uses this common, easily findable (well, relatively speaking) magic to make something they like. The downside is that you won't be able to use too many more fancy items that you'll find, as they will be tailored to the user and thus unsuitable for you. Again, there will be exceptions to this rule but they will be more curious and oddities - you'll also find lots more raw blanks/crude forms in various shapes and sizes early on that you'll be able to use and commit to for evolution throughout the game.


I wrote a bit about this in the overview, but the world's high magic field means that exerting control over any larger area is nearly impossible. Large amounts of warlords of various alignments and agendas eke out carefully balanced existences in areas close to their powerbases; the wilderness teems with powerful monsters of all sorts that only grudgingly give way to mighty heroes; the balance of power is maintained by the need to defend from all sides and threats. This is also why your adventure changes halfway through, as nature abhors a vacuum and once you get rid of your boss you need to assume new management immediately or face your own crushing. :) Organized warfare as such is nonexistent, as every warlord spends a significant portion of their day just dealing with whatever crisis is on their doorstep and has barely enough left for their own agenda.


Some heroes or warlords (or their minions, natch) grow in stature with time. Their deeds are recorded where they fell (tombstones), where they rose to power (items in their keeps/lairs), or verbally (still working on this one. Random barks here and there? I'm not sure yet). I will definitely try to incorporate larger victories or simply longer-than-standard lives of players into the game in some way. I should create a legends.xml right away, now that I think about it. TODO!
Thu, 16 Feb 2012 17:31:51 GMT
NTSkill refactor!
Tags:dweller makingOf skills
Had a brainstorm on the bike ride home yesterday about the actual implementation of skills. When the pool of skills is small I was thinking small, and each skill was a one-off, called during update as needed.

Thing is, that's not very manageable, not very intuitive. I'd end up with a bunch of these individual calls (one per skill) scattered all over the place, with implementations who knows where. There are already quite a few things going on in a creature's (or player's) turn, and every new added skill would just compound the problem.

So instead I made everything a skill (well, except movement although now that I think about it ... why not?); they're more like "actions" at this point, except some are passive, some active, and some reactive - this part will still take some thought. A creature (and the player) will get those skills loaded up through their XML (now in easy-to-parse, easy-to-tweak comma separated format) on creature generation, and then simply iterate through all of their skills, whatever they may be.

Currently, everyone has the ability 'regen' which is a passive and always happens (unless suppressed somehow), a few creatures have the ability 'throwWeapon', and some have 'summonSelf' which summons another creature of the same type to help. Some of these actions take a turn, some don't, so some will be "blockers" for other actions. What I'm still working on is a sort of weight as to which action a creature should take, for which I think the creature STATUS and STATS will be responsible for.

For example, let's say a creature has 'teleportSelf' and 'castFireball'. If I just give it a percentage chance to occur, the creature will always end up doing one more often than other. However, whether I want the critter to do one or the other depends on what state it's in! If it's wounded, it should probably teleport away; if it's close by it might want to attack in melee instead; and when it's far away, it should throw that fireball. I already have some rudimentary statuses in like ENGAGED, SEEKING_TARGET, SEEKING_ITEM but I suspect these will have to become more verbose. Still, by solidifying the skills into an actual system all of this will be much easier to do.

Oh yes, if anyone else searches for "using a string as function call in as3", this is the way to do it:

var myFunction:String = "castFireball";

I had no idea that was possible. It's tremendously useful for things like this, when you need to call functions that you don't necessarily know the names of.
Tue, 14 Feb 2012 06:00:49 GMT
NTDang. Long break.
Tags:dcsb bugfix
Fixed lack of movement after level 1. Fixed wrong-way throwing. Fixed inability to select 1st class on start screen.

Hopefully the next update will not be so long in coming. Also, I do plan to finish the worldbuilding, but probably in one long entry. I think I have the basics, and the rest is frankly a bit beyond my creative abilities at the moment. Maybe once I have the rest of the basic mechanics in place I can start thinking about what it is evil orcs actually DO eat. :)

Next up, wrapping up ranged combat.
Mon, 09 Jan 2012 19:42:54 GMT
NTWorld Building Day 7: Races and Culture
Tags:dcsb worldbuilding
Well, er.

That's kind of the big one, isn't it. Without some serious imagination engine to engage, I'm afraid I'm stuck with the oldies but goodies. In short, I don't think I can pull off originality well enough and in a captivating enough manner (diggles?) to even attempt it - so the fallback is to maximize player recognition and familiarity with the setting.

Fortunately however, I'm approaching this from the other side of the alignment scale, so there is SOME room for creativity - but it won't be because of the world's inhabitants, just the side that you're on. So:

Militarized, tribal orcs and goblins. Chaotic demons and abyssals. Pack-oriented werewolves and other weres. Mindless skeletons and other mostly subservient undead. Close-knit and xenophobic deep dwarves. On the other side the ever favorite versatile humans, lofty elves, nosy and surefooted halflings and hulking, half-magic eloi. Finally, elusive dragons still haunt some deep places.

A player's corner of the world will be populated by whatever type of overlord settles there. Not only their chosen profession (archmage, warlord, dragon or alchemist) will determine the populace, but also their race.

As to invaders, they will be totally random. There is no restriction on where a quester may hail from in their attempt to overthrow your boss, as mentioned before - despite travel being limited and settlements isolated, questers do get some serious help from Above, so distance is not a problem for them.
Mon, 09 Jan 2012 18:01:07 GMT
NTWorld building day 6: Fauna
Tags:dcsb worldbuilding
IN A WORLD ... where magic runs rampant but people still need to eat, expect the mundane and the fantastic. As mentioned in the previous post, the more wizardly of overlords will probably experiment with plant/animal hybrids, and some experiments will go awry. The more military focused overlords ... well, I hear mutton travels well: expect sheep.

Other than that, you'll see typical forest biodome animals such as wolves, deer, foxes, squirrels and rabbits. Some of these may be NPCs, some of them will just scamper across the floor and vanish into the undergrowth, and some of them you might be able to catch for food. Others will be trying to catch you for food, instead. Closer in to the overlord's lair most of these will probably vanish and kept/cultivated animals will appear more and more.

The dungeons will be home to spiders (of course!), rats (natch) and other assorted creepie crawlies. However, most of the caves within a warlord's domain will be taken over, militarized and defended, so stray fauna will be kept to a minimum. Expect to find your food (if you are a carnivore anyway) some other way - by raiding storage rooms, kitchens and mess halls, which will in turn be much more numerous than in the early parts of the world that you explore.
Thu, 05 Jan 2012 18:30:37 GMT
NTWorld building day 5: Flora
Tags:dcsb worldbuilding
Tying in to the concept of relatively small zones and warlord types from the previous types, you will find fairly typical flora for any given regions. Forests will yield mushrooms and nuts, camps and towns will be growing efficient crops such as corn, wheat or barley and maintain fruit orchards such as apples, pears and plums. Handily, you can make booze out of most of those, so that will tie in as well.

Magical/alchemist lairs will have less in the way of crops but ample fruit, and there may be some magically enhanced orchards where you will find exotic plants, spell ingredients, and even common use items. There might even be trees growing simple weapons and potions.

In the future when I introduce different zones such as mountains, deserts and swamps I will need to add appropriate crops for those as well. I suppose that means another set of XML files and more art (hello palette swap), which in turn means that the temperate foresty zone will be the only zone for quite some time.

I think I'd rather focus on a single kickass zone than attempt to make palette swaps and spread myself thin. Well, this has been a useful worldbuilding day, apparently! I just eliminated a ton of work for myself! :)

So: DCSB takes place in a temperate zone and a moderately forested area with a possible single mountain (or ubercave) for the head villain's lair. You heard it here first (well yes, where else?).
Wed, 04 Jan 2012 18:21:51 GMT
NTWorld building day 4: Resources
Tags:worldbuilding dcsb
I have not given this one much thought at all! Really glad to be doing this so I can make a more coherent set of maps (eventually).

Saruman had his Isengard (at least until he tore it down to switch to raid/war footing) to provide him with vittles; Sauron was always raiding or cannibalising (seriously, would anything grow in Mordor? I think not), but it seems like typically your warlords rely on oppressing any local villages for resources; wizards set up on powernodes and just have cadres of peons working on earthly things such as food, drink and sanitation, and mad scientists probably grow their own powershrooms and such. Oh yes, there should be an undead lich type with a mostly undead army that doesn't need any of that at all. And a dragon, while I'm at it; a cross between a wizard (magic users) and warlord (villages to maintain the meat stock).

So! This means that we will need at least one resource use type per archlord type, which actually sounds rather entertaining. You're such a low ranking guy that you don't even know who the head guy is, but it will be revealed in no time by the type of terrain you traverse - I think that sounds rather neat. In practice, this will translate to more villages/outposts for the warlord, more aggressive flora and fauna for the mad alchemist, and more lowbie magic users for the wizard type (they also flock to the node of power). The lich will mostly be dead things (both mobile and not) with some magic users (also undead), and the dragon is part wizardly and part warlord with outposts and such to keep a stock of fat juicy cows. And peasants. Yum.

5 overall archetypes is a good start, and plenty ambitious already (none of this exists, of course!) :)
Tue, 03 Jan 2012 21:24:22 GMT
NTWorld building catch-up day 3: Landmarks
Tags:worldbuilding dcsb
I realized I covered most of this in the previous entry, but for the sense of continuity I'll rephrase; it might even fit better here. I guess I don't really plan on "Geography" as the game occurs within a relatively small radius of a Place of Power - so local landmarks are more important than exactly "where" things occur. The world isn't even connected yet, as the gods (oddly like me!) aren't very interested in watching politics - they just want to play a rousing game of Quester's Quest.

Anyway. Within the PoP will be various defensive structures as well as natural features. In the forests expect giant tree stumps, clearings, witches' circles, streams, ravines or cliffs and brooks from the natural side, as well as various ruins, obelisks, camps, fortifications, walls and outposts on the man(monster)made side. Some levels will have exits leading to the next open patch of forest, and some will have cave openings or structure doors, and the adventure will transition appropriately that way. I also hope to have some premade layouts such as mazes, towns, prisons and combat arenas, eventually.

However, in DCSB this is all visual fluff and will not impact the game in a hugely significant mannter - as such, it is a priority for considerably farther down the line.
Tue, 03 Jan 2012 20:52:52 GMT
NTWorld building catch-up day 2: Geography
Tags:dcsb worldbuilding
Dungeon Contractor Strikes Back does not really take place in the world at-large. For now at least I have no intention of tying any two lair takeover attempts together, nor importing events from one game into another. You might find headstones of previous players but that is it - none of their loot nor their ghost will stick around, Nethack style - and I only decided that right now, so it is of course subject to change to even less (not even headstones). I am 100% certain I do not want to do any more than that though - it is simply not in scope of a single DCSB adventure.

That said, the world is large and warlords/archmages/mad scientists don't really have many prerequisites to building their Lair of Doom except that it be isolated. They don't really like visitors a whole lot and have quite a bit prepared to deter casual interest - primarily distance. So the final lair which may be a tower, cave, fort, temple or castle will be surrounded by significant tracts of land. You, the cheap hired help, will start out at the outer perimeter and slowly work your way in. As can be expected, the distance between you and the center will be filled with other patrolling creatures, fortifications, camps, work sites and other defensive features such as mazes or Black Gates.

Other than manmade (or monstermade) features, you will encounter what you'd expect to encounter in nature in a given region. If the fortress is in a forest, there will be clearings and thickets, gullies and streams. If it's in the desert ... well. Oases, I suppose? If it's in the mountains, expect ravines and rockslides debris. Mind you each "screen" you visit will be a snapshot of the terrain in question and it MUST be passable, so there will not be anything that forces you to backtrack - ultimately you are going to the center to deal justice, and as such become a Quester; the gods themselves (or well, the randomization engine) will find you a way. :)

In the short run, I expect that you will start in a forest and end up in a stone structure - because those are the tiles I have. In the long run, the sky's the limit and I hope to include caves, camps and a smattering of semi-unique features and layouts for starters. In the even longer run, other biodomes will find their way in; the good thing is that since I'm using tiles already, all it takes is a new tileset that conforms to the current engine rules (must have corners, backdrop and doors) to create a new simple biodome.