Gaming Your Way

May contain nuts.

DN8 DAY1

Going to be a quick post as there's not a great deal to say. I started the new game yesterday, DN8. The name is a play on DNA, as the game will be about the player evolving ( DNA just felt too lazy and obvious as a name, plus I'm sure there are other games with that name already, an old Amiga one springs to mind, 8 just felt right, no deep meaning to it ).

Yesterday was the getting the background colour and fonts in place day. I tart around far too much. But as of now we've got the title screen taking shape.

dn8_grab1.png


I reused the pause effect from cronusX for the molecules in the background, and bizarrely it worked first time ( Code wise that is, still some messing around to get it looking as subtle as I wanted ).
It's not the exact same effect, the original used the old infinite bob trick, whereas with this we're just running 255 vector bobs.

Its all getting a bit closer to the vision I've had in my head the past couple of weeks, which is good 'cause I was getting frustrated yesterday about not being able to realise my thoughts.

Now I'm not sure if we're going to do a daily diary for this one, like we did with X. I'm tempted, but it's a bit of unknown quantity, it could well turn out to be shit half way through and never see the light of day. Maybe I will if I can face it, but there won't be daily builds like with X.

Oh, curious why I'm working on the title screen rather than the game ?

Squize.

Dungeons: Explained better

A bit of a repeat post. Nothing from us for ages, and then when it arrives it's just a rehash. Ages back I did try and explain how we make the dungeons in Knight'sQuest ( FB link ), but using test data images along with poor writing didn't explain it too well I don't think.

Ok, so we have at the basis Olli's dungeon generator code. This creates an array of objects describing a room / corridor. Each room is made up of blocks and blocks are made up of 4x4 tiles. The rooms are made up of a variable number of blocks, so we can have small tight rooms or bigger expansive areas.

When plotting a dungeon ( A generic term, it covers the caves and the new forest ) we look through each room which starts its life as just a collection of 4 digit numbers which are stored in a clock wise fashion ( North, East, South and West ) and each tell us if there's a wall / door / nothing.
For example, if we get the code 0111 that means there are walls to the north, and nothing in any of the other directions ( Little weird 1 meaning an empty space, to be honest I couldn't face refactoring Olli's code ).

Due to the large number of combinations, using a switch / if statement was a non starter, I'd still be typing it now, so we used this cheeky bit of code,

            var directionsAsString:String;             if(location=="caves"){                 directionsAsString="caves_"+northWallValue+eastWallValue+
southWallValue+westWallValue;             } else {                 if(location=="dungeon"){                     directionsAsString="dung_"+northWallValue+eastWallValue+
southWallValue+westWallValue;                 } else {                     if(location=="forest"){                         directionsAsString="forest_"+northWallValue+eastWallValue
+southWallValue+westWallValue;                     }                 }                     }                          try {                 var functionCall:Function=this[directionsAsString];                 functionCall();             }             catch (e:Error){ Debug.trace(directionsAsString,2);                 if(location=="caves"){                     caves_1111();                 } else {                     if(location=="dungeon"){                         dung_1111();                     } else {                         if(location=="forest"){                             forest_1111();                         }                     }                 }             }

Basically we just turn the value into a function call. The try / catch is there in case I've missed one of the possible combinations ( And the trace is so I can find out which and fix it ). Using our current example value from above, and we're in the forest this time, we'd call the function

private function forest_0111():void{

Which is a million times easier than any sort of conditional.

Right we now know what block we need to plot ( Take it as read we know the x/y position of it, this isn't the most fun post in the world as it is without me going into that depth ), how do we store the blocks themselves ?

KQ_darkForest.jpg


In the IDE we have block movieclips, like you can see above. Inside those blocks we have a floorMC and then the tiles. For the floor we just use bitmap draw() to grab it and turn it into a bitmap, and then burn that into the master ground bitmap ( All the floors in the game are just one huge bitmap, so no depth sorting or messing around, it's just a flat bitmap we scroll ).
The beauty of this approach is that the floors are in effect art style, we can drop any image on any pixel position, use blendmodes / alpha / scaling / anything really and because we're just burning it into the ground bitmap all this extra stuff is basically free.

That's the floor covered, next the tiles. Each tile in a block is just a movieclip, with an instance name. See that campfire on the top left block ? That's got the instance name "forest_088", and we just store that in an array with a reference to the bitmap of that image ( We're using the blitter for everything, which means bitmaps ). When plotting a block we loop through all the tile mc's in the block, find out the reference to it's bitmap and create a Bob ( Blitter OBject, ie a sprite ) for it.
In terms of layout, we don't have to be really anal, none of these tiles are pixel perfect aligned, that would be soul destroying, so the plotter rounds things down and most of the time gets it right.
One other slight bit of weirdness before we move on, each instance of a certain tile has to have the same name. Going back to the top left block, notice all the trees are the same ? They are all called "forest_008". Normally we'd never use the same instance name, as that's mental and wrong, but all we're doing is looping through each mc in the block, getting it's x,y position relative to the blocks origin, and then it's .name so we can look up the bitmap reference.

Not easy going I know, sorry. We're nearly there.

Notice we've got 4 blocks all with a north facing wall. To try and make the dungeons look as good as possible we make as many variations of each block as we can face. Before we actually plot them, we pick one at random ( Again, another array, just listing each possible block for each possible combination ).

If you've got this far then well done. Hopefully it explains things better than before.

Squize.

Knight's Quest, get your mana on.

Finally finally finally, we've soft launched KQ. With it being a soft launch it means we know there are things we need to tweak and change and there are more features planned over the next couple of weeks ( Today is a day of resting ).

Rather than me write reams of boring text, here are some pictures to give you a taste before clicking ( Or not ) the link.

KQ_village.jpg

KQ_fireballs.jpg

Now it's finally out for everyone to play I'll be able to do some more techy posts about how it does what it does, I was kind of loathe to do it sooner as explaining how the spiders AI works in a game you can't play is a bit abstract.

Please, any and all feedback in the comments is more than welcome. We can't make the game better if we don't know what's important to you guys.

Here's the link, ( Facebook only I'm afraid, it's the nature of the beast ) go and hurt some big spiders ( They so deserve it ).

Cheers,

Squize.

GPS? Not down here, but we've got magic!

Screenie post I fear ...

thp_chrome_screenie_path.jpg
Current Hellstrom built in Chrome with the debug pathfinder being a little show-off.

What's new? Just a lot of code atm. There's a second pathfinder in it now (after I discovered that the one I wrote for flash a good while (ok, years) ago didn't quite work as expected.

I really like the old one as it only needed a boolean map to work, though with the dynamic dungeons in hellstrom that proved to be a bit tricky anyway as I had to render my cell structure used for the maps into the boolean map:

+---+    #####
! ! # #
! D >> #
! ! # #
+---+ #####

While the cell stores just if there is a wall, say for north, the boolean map needed to have a wall made of "false". (see : here (scroll down a bit) for some more detailed explanation about the structure I use).

Anyway the new pathfinder (codename: Magellan :) ) uses linked nodes instead of a boolean map, this is not only incredibly usefull (as it can adapt any "scale"), it also works in 3d / multiple levels and can use "one way nodes". The code isn't as clean as I wanted it to be, but it's working and abstract enough to be easy to use...

_Magellan = myDungeonCreator.createMagellanMap(_Dungeon, new Magellan(), false, false); 
// dungeon, pathfinder ref, use locked doors, move diagonal


it uses 3d Points as internal ref system so to find a path you's simply:

string Result = _Magellan.FindPath(_Dungeon.Rooms[iStart].offset, _Dungeon.Rooms[iEnd].offset);

With Result being some handy string to be parsed, like "noLink", "pathFound". The found path is internally stored as array of index ponters to the nodes, so we need to "parse" it to be used:

PointInt3D[] path = _Magellan.path3D;

enough code now.
If I feel luck I'm going to post it, though first I need to get alive through the much dreaded holidays (way too much food and family - and way to much drinking in order to forget the two) ...

nGFX


Why...

...does it only occur to me today that doing some sort of Flash advent calendar for the blog would be a good idea ?

I'll try and plan ahead for next year.

Sorry we've been so quiet recently, so much stuff going on. Word is a big project is going live possibly tomorrow, so expect the usual pimping ( To make up for our silence maybe a mini making of may be interesting, well, more interesting than a "Play this game please, we made it" post ).

Here's a picture of some rain that was just added to Knights Quest today, we call it "Blog filler in the absence of a proper post". Enjoy.

KQ_rain.jpg

Squize.

It's all about chosing the right door.

Just another picture post...

hellstrom_temp_00.jpg

Screengrab of the current test version of The Hellstrom Project showing a few of the corridor tiles I've set up.
The mappings aren't final, nor the lights (will render the lightmaps later) - and it's only one of the visual styles that will be used in the game (and dungeon) - but that's another post (I don't want to give away the story yet).

Right now you can only run around the generated dungeon, though new things are added daily when updating placeholders with new models and refine/add methods.

nGFX

Say "Hi" everybody ...

Small picture post this time.

hellstrom_danielle_00.jpg
This is "Danielle" (or what she looks like atm) for the RPG'ish game I'm working on in Unity. The project isn't quite showable atm, but I promise to upload something when there is more to see (like having Danielle walking around).

She'll def get a visual overhaul for the game (and this model will be used as "Generic Femal Player") as the "real" Danielle will get a lot more "pirate" to her outfit. (The other two playable characters will be quite different, but more on that ... later)

She's modeled from a foto reference with a good set of idealizing the model and she'll need some optimizing as the whole model is using 3.6k triangles atm, though she can be reduced safely to about 2k polys.

So long and back to Unity, nGFX

Avatar torture porn

Anyone who knows me knows I'm scared of spiders. I know as a man I'm meant to put on this brave macho front at all times, but get a decent sized spider near me and I will openly scream like a girl no matter who is there to see. Fear beats shame every time.

If I know there is a spider loose around the house, or to use the technical term "Gone rogue", then I'm not too happy about walking around in bare feet. Not so much the thought of squishing it underfoot, but it being able to scurry out onto my bare feet and then run up my leg before laying a million eggs in my testicles. Ok, possibly the worst case scenario, but when it comes to phobias that's how they work. They stop you thinking like a normal person and they turn you into a quivering mess of irrational fears.

I think I've set the background there, you should kind of know where I'm coming from. If spiders aren't your thing just replace it with snakes or rats or clowns or whatever it is that you know shouldn't freak you out but does.

That's why I feel so badly for the avatar in our current build of Knight's Quest. It wasn't planned this way, it just kind of happened.

KQ_nasty.jpg

Naked in a field surrounded by giant nasty spiders. Some how I've coded my worst nightmare. Actually he's bald and has no genitals too, so combined with the herd of venom dripping spiders, that really is my worst nightmare.

I guess I should explain why we've got a naked guy in our game, and why I thought it would be a good idea to code the one animal that makes my blood run cold, but I think that would distract from a good story, so I'm not going to.

More ( Fully clothed ) Knight's Quest stories soon...

Squize.

Let's start all over again - or "how to handle all that weight"

Ok, the last bit of the headline was a cleverly placed quote from someone who took Mass Effect 2 way to serious, but hey it still fits.

Our little toy based Unity game has made some nice progress over the last few weeks (with just a few scattered coding session inbetween all the other  stuff that needed to be done). I'd go as far and say it is just a few 100 lines away from becoming gold (yep, in more than one way hopefully).

toygame_00.jpg

So the the release date is coming closer - at least that is what I thought till Friday...

And now the pretty headline kicks in. Why on earth do I want to start all over? The reason (and once I learned to handle all that weight) is quite simple:
It's a grown game, it started off easy, but then lingered it's way through some fails (talk Unity animation system and events) and a "second" floor and ended in the tab system that should showed informations as well as the ingame help.

There was quite a loud "damn fucking shit" from my side when it finally dawned on me that Unity's UI system (which, honestly is dog shit) does only handle click events and is missing the "over, out, down and up" states I've came to expect from flash. So my idea of using a rollover event on the tabs to focus the camera on an object failed badly. Before I even started to code it (the idea was to show each moving toy as a tab, then if you move the mouse over it's tab the camera would zoom in on the toy to show it in closeup - pointless but neat), plus from time to time help tabs should be added that can be ignored or read. Oh, and while I'm at it, hints to be shown on rollover for the built in level editor became quite impossible too.

Next point on the list of "things not easy to add" was "scaleability", read new decorational elements, backdrops and styles that could be bought by players so that we can earn a quid (to pay the servers for instance).

A few hours later, with a few sheets of paper used as external memory, I swallowed the bitter pill and decided to start all over again. Starting with a new map system, new "landscape" features, a more flexible decoration system, the level editor (and a way to save these levels on our severs), deciding an a service for micro transactions and, and, and ...
The tiny little game grew up, causing a lot more thought and work then I ... thought ...

Either I start again, or drop it, but I do believe that (oh did I mention I'm doing an overhaul of the visuals?) it might get some fans playing it on Facebook or through our website ...

And now: Day 1 of the development diary (oh come on, I doubt I'll ever be able to write about it every time I code on it. Just that much: next time I think I'll have a quick look at MT systems for Unity right now I'm looking into UnityTokens and Dimerocker (and if you know some else don't hesitate to post a comment).

nGFX