MyI@FarNiche

Building an XNA Game Studio XBox360 Indie Game.

[page 0037] ~ The Perceived Direction:

Versioning.

And the direction is seen through versioning.  Dragons Hoard, was an epic adventure of an avatar seeking to consolidate the Hamlets of the land and return them back to the kingdom.  This next game is to take that previous game template and put on it an overlay,(possibly an underlay).  That then will be the next version and will be seen as the game going by the title “Wanderer”.  The theme for this month on One Game A Month is “Spring”, and so, for this games sake it will mean Artesian aquifer.  The last version of this game was built with one bold jump into creation, as a Seven Day Rogue Like challenge entry, with little to no forethought in how it would be of use as a template.  But Dragons Hoard has become the template to base my concept of versioning on and Wanderer is the next step in its progression.

Stepping back.

With this new concept for the April game I will have the hero wandering through the land looking for water.  The “Springs” this avatar will find are where the residents of the kingdom consolidate, and so, will be where the hamlets set their roots.  This little adventure game will be previous in time to Dragons Hoard and is what will set the stage for the already built game Dragons Hoard.  In Wanderer the Hero sets out into the wilderness and must find suitable locations for the Hamlets to be founded within the Kingdom, i.e. the “Springs of Life”.

And so it begins.

To champion this cause the avatar begins charting the Realm in search of the “Springs of Life”.  These springs are where the good guys and the bad guys want to be.  Both need the water and both are in it for keeps.

The over/underlay code restructuring.

Change the for loop to start with the springs placed where the randomly selected hamlets are assigned.  Then once the spring has been won, the hamlet will spring up from the well and onto the map.  OK, that’s special, now I need to go back and get rid of the initial randomization when testing the layout visualization in the Terrains’ select case function.  That was it, the Victory conditions were set, strangely, because of the randomly generated amount of hamlets for each game which made for some messy logic and a lot of time consuming “if(&& || &&)” sifters for HamletVisited booleans. Cleared those up and out.  All right, that is kinda silly.  When I was building the draw routines for the map legend, (i.e. the mountains, trees, prairies, swamps and waters), I used the grid and not a general position in the Cartesian coordinate plane, (Quad I,II,III,IV), as I did for the Castle and Hamlets.  Yeah, consistency would make sense.  What do you want for 168 hours of break neck speed programming?

Construction next fifteen miles, merge right, fines double in orange barrel work zones, detour ahead.

#1459 switch/case show-hide spring or hamlet.

#532 set the “spring” in lieu of the “hamlet”.  And yet it tends to disagree with my arguments (i.e. function parameters).  Keeping a consistent coordinate plotting system is the matter at hand.

JavaScript is not like the precompiled languages that I’ve become accustomed to as far as I can see.  Things are a little too spread out and the consolidated train of thought has too much intangibility.  Having everything on one code page doesn’t help either.  I really don’t feel like melting the program down and starting over, but I just might do exactly that for the May version submission.  And with that thought, it’s time for . . .

Slash and Burn.

What don’t I need from the game Dragons Hoard is to become my first “Block Comment” excursion.  There is no castle and so the dragon will have no interest in this land.  No Castle, no Dragon, done, commented out.  Hamlets will be cropping up where the springs are set so I’ll keep those draw functions.  The placement of the hamlets though will align with the springs and therefore will follow the placement algorithm used for the terrain icons given on the grid map.  That should tidy things up a bit.  But there will only be a limited set of springs and not a “fill the map with assorted terrain features” amount.  I also don’t think there will be any PermaDeath or MagicMana in this game either.

Really, is that how it works.

Aah, I get it.  Along with the disjunction between how the terrain icons are placed and how the hamlets and now defunct castles are placed, there is also the mini-map that also uses an offset different of that used in either of the previous draw routines.  That’s what you get for building on a tear, yippy zippy, crash boom bam and it’s done, hmmm.  Well, I think I can follow the somewhat scant train of thought through this and with a little more slash and burn I should be able to translate the remaining code into a new project.  That new project being the game “Wanderer”,(my avatar should have a magic wand but that will have to wait).

More ideas.

PermaDeath could be changed to food and MagicMana to water (in the next game).  Done, it’s in this game. Now for some rules.  This hero wanders about the yet to be kingdom looking for springs so hamlets can sprout.  But the hero and the hamlets will need food and water but this is the story of an avatar hero seeking to build a kingdom.  And so, only the hero needs to stay alive, with a personal stash of food and water, while searching this new found realm.  These are the rules . . .

Movement is essential and this is how fast about the grid with its differing types of terrain the avatar can cross it, along with the cost of staying alive.

Type      Move    Food  &    Water

Water            : = 9      0      0

Prairie          : = 7      2      2

Forest           : = 5      1      1

Swamp         : = 3      3      3

Desert           : = 2      4      4

Mountain    : = 1      5      5

This is the general metrics of movement vs. sustenance.  And with that information I could probably build a legend for the map.  And now that that legend is done, I can see the biomes set on the map with each biome having a movement rating which also has a Food and Water cost coefficient for the movement through that terrain.

The Clicks.

Now all I need to do is figure out what happens when I click on a vector set button.  Supposedly, with each click, as the hero moves, the effort needed to pass over that terrain has a cost.  The difficulty rating is measured by the capacity of that terrain to supply the necessary food and water to the avatar so the supplies carried by that avatar are not so quickly diminished while passing over that terrain.  The other half of the difficulty rating is how easily the avatar will find the terrain to be traversed.  To keep the game simple, basic integer types will be used.

Alright, I have found the draw function for the hamlet and must now rearrange it so it conforms to the other game draw functions.  More hmmm, but, “Notepad++ is awesome!” and with that I find ‘time’ is what makes things stupid.  And so it is time to get out the ol’ trusty melon ball scooper and switch out the innards of that pesky Hamlet draw function.

Line Numbers: #503, #1127, #257, #955, #506, #484.

That should just about do it for getting the springs and the hamlets on the map.  Now to finish it off with a little collision testing where when the avatar is in the space of a “Spring” that will be seen as a Hamlet on the grid/map.  A counter also needs to tick off one more conversion so when all ten hamlets are built the game is won.  Yes, those are the only Victory conditions.

Whew, boolean traps, if verification, nested for loops and counters all for the sake of having a “Spring of Life” turn into a Hamlet.  And they do, finally.  Next is to clean up the victory conditions. Done.  When all the hamlets have been built a Castle, (yes, it made a reappearance) appears above the mini-map, and the ta-daa “VICTORY” is shown across the grid map.  Oops, I lied, the castles are in the victory conditions “You Won” splash ending screen.

This last bit was a little tricky, but it did turn out well enough.  Getting the avatars movement coordinated with the icon legend.  Just to add some understanding to what is going on as the player clicks on the vector set to move the Hero, I placed an underline in the legend to show which terrain feature is currently deterring the Heros’ movement.

And that just about wraps it up.  All that is left to do is get it into a web page.  Then a couple of test runs just to make sure that it is working properly, and last is to get this into my WordPress Blog.  And so, Happy Spring.  And . . .

Play Wanderer Here.

G’day.

Advertisements

April 30, 2013 - Posted by | 2013 [0019] to [00??], The Process

No comments yet.

Leave a Reply

Please log in using one of these methods to post your comment:

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