Project: Gauntlet - Current Iteration

Friday, November 27, 2009

The importance of variety in Procedural Generation of game content

Variety - the spice of life - the tumeric in the casserole of our days and ways.


Not entirely sure if this whole '3 blogs in one day' is productive or counter-productive.
One perspective would be that any work on a Saturday - of all days, is productive.
One would be incorrect.

Short and sweet - before I get to dinner and subsequently back to Unity.

What aspects of the game will be generated and altered procedurally?
And by procedurally, we'll mean what we'll call 'pointed randomisation'.

A quick bullet list. Please - comment and contribute.

  • Level generation. 
    • Where you can walk, which directions - which twists and gripping turns, you are taken on.
  • Obstacle placement.
    • The type of obstacles you encounter.
    • The amount of obstacles you encounter.
    • The positioning of said objects.
    • The scale of these objects.
  • Enemy placement
    • The type of enemy encountered
    • The power of the enemies encountered.
    • The appearance of the enemies encountered.
    • The location of enemies encountered.
    • The quantity of enemies encountered.
    • The behavior (speed, jump height, attack type) of enemies encountered.
  • Item placement (if items do exist. I assume they will)
    • As above.
All this is well and good, but it really only reflects a fairly generic randomisation of levels.

I think - sadly enough - that procedural generation is not the ends, but only a means to get partway to the ends.

I think the most important thing we can have, for this project, is:
  • A variety of enemies, obstacles and items
    • A rarity rating of each object - to assure that there is that feeling of "Ooooh... Pokemon Johto just started! Will he choose Chikorita? I hope not".
  • Varied color and superficial changes - enough to assure that each generated level does not contain every single asset of variation the game engine contains.
Following this structure, I believe we can make a nice-looking, nice-playing game, with a good degree of replay value.

Replay value... there's a subject for a blog - but another time!
Now is the time for work.
Talk is Cheap.

The To-Do list. THE To-Do list.

And on that subject, what DOES the To-Do list look like?

This!



That little corner of desk you see there is where I'm sitting as we speak - per'se.

Let's break it down... what's on there....

Executive summary:

Over the next few week's you'll be seeing some real traction on this - run around, fight, TRIUMPH, all in a procedurally-generated environment - so your gameplay experience is varied every single time you play the game.

Hmm... variety - we need a blog post on that subject. How do we vary this up to assure that the procedural generation of levels is actually dynamic and awesome, as opposed to just.... whatever...

Bottom-left corner - some scribblings about another project I'm working on. I'd remove them, but there's a diagram of a turtle that I'm kind of fond of.

Bottom-centrish - a kind of... sketch? of how this Project will appear to the user. Kind of....

The majority of the board? 4 columns: Level generation, Movement, Combat, Goal - I think I outlined them in the first post.

And the most contextually relevant part?


In the bottom-right corner, beneath a small sketch of a flower - denoting 'Graphical Assets' - which I have labelled as 'effeminite', we have:
  • Animations - swing, run, jump animations for the main character
  • Modelling - extension of the biped to a real character, pending concept
  • Scenery - flavour items - rocks, trees - for placement in the path.
Beneath a small sketch of a piece of paper - denoting 'Programming work' - which I have labelled as 'productive work', we have:

  • Scenery generation and placement - intelligent procedural palcement of scenery (above) in the path to provide obstacles that don't make the level impossible.
  • NPC placement - spawning of NPCs with varying degrees of strength pending position on the path
  • Health system - management of dead/alive and degrees of alive-ness, as it were.
  • Control system - movement and striking have been handled, but I am cooking up something particularly special for this innocent-looking 'Control system' concept. More as this develops - particularly excited about this one.

Progress: Day Four-Point-Five - Animation, Jumping and primitive Pathing in C# and Unity

Saturday morning - ahhhhhh the weekend, sitting in a room in 35 degrees celsius / 95 degrees farenheit heat, avoiding deliverables for the rent-paying passtime - and writing tiny To-Do lists on the remaining empty space on the whiteboard... Fantastic!

 So what have I done on this hot Saturday?

Along with the consumption of 2 cans of redbull and 2 cups of delicious black espresso, and 3 subsequent bottles of water to attempt to avert the pending kidney damage, today has been extremely productive.

Let us look, shall we.

Last Night - Day Three (unblogged)

  • Rigged up a primitive "run" animation on our beautiful biped model, to give the demos a little bit of life.
  • Videos to come.
Today - Day Four.Point.Five

  •   NPC movement - NPCs will now run toward the player unerringly, unwaveringly - with a TOTAL commitment not often found in your softer organisms.
    • The NPCs don't path - as we've got aspirations to put this bad boy on your portable devices, I didn't relish the idea of implementing A* or such over it, so they follow the following procedure:
      • Face the player.
      • RUN!!!!!!
      • If you find you can't move for a little bit - JUMP
      • If you are within a given distance of the player, stop, you have been successful.
    • If the NPCs are all near the player, they will rotate until they surround the player in a swarm-styled circle.
    • The JUMP mechanic fulfilled a few requirements:
      • NPCs can jump over obstacles, avoiding the need for pathing.
      • NPCs look hilarious and awesome when they are stacked behind each other - eagerly jumping to attempt to viciously violate you.
  • Attack mechanic
    • When struck, the NPCs can be knocked back - a given distance and a given height.
      • When knocked back, the NPCs cannot move for a defined time.
    • This mechanic will graphically manifest as:
      • Knock back enemy and daze for a period.
    • And it looks awesome too. Of course.
But less talk, let's SEE this business!

Pending.... I'm recording it right now. Hang tight.

Uploading..... 30 minutes remaining. I DID compress, but it looked like junk, so I figured I'd take the time, and see if Youtube would do a better job than my encoder. We'll see! So..... how are you?


13.56 remaining! You could die a hundred deaths in that time. Or cook some eggs or such.


Uploaded.... processing.... please wait.... I really should just leave this blog open in Edit instead of repeatedly having to navigate through Blogspot to edit it.

Done!

Project Gauntlet: Video One

Man, can I embed video here????

Jesus... maybe I can... let's take a look....

Hmm....




Let's see how THAT badboy goes....

Of course! The worst crime you can commit - is to doubt yourself.

At least, the worst crime I can commit is to doubt myself. Feel free to doubt yourself, I don't know you.

Please - take a look, view it in the context in which it was made, and - until we next meet:

Stay crunchy.

Thursday, November 26, 2009

Progress: Day Two - 3D Assets into Unity - Procedurally placing items within the world.

Progress, progress. 

To quantify it, I believe we have roughly 2 hours to spend on this project per weekday - once the trivialities of travel, sustenance and domestic duties have subsided.

This evening the challenge was set:

Model, rig/weight and unwrap a low low poly biped character suitable for this project - insert into Unity and test, in 2 hours.

The Model itself should be suitable for a fast-paced action game from above-and-behind; thus no requirement for great amounts of detail - just proportional limbs and such (e.g: no fingers or toes).

Tricky business - being a relatively new hand at 3D modelling and such.

But - the results are quite reasonable.

Introducing, in the Red corner - the 320 polygon nightmare, proud representative of the people of the Blocks - Johnny the Rock.

Naked - and splendid. 





Ready to take ALL comers (in 3dsMax - excuse the harsh lighting).




Here he is, perched magestically above the aforementioned maze.

 A few additions to note, most of no consequence:
  • skybox
  • altered parametric dimensions of path nodes
  • procedurally-placed items within each pathnode
  • procedurally generated planes beneath path - upgraded from simply terrain.
  • 3rd-person camera and controls.


Wednesday, November 25, 2009

Progress: Day One - Procedural linear level generation in Unity with C#

As we drop a big old Progress bomb on you - the Internet Civilian, bear in mind that we all work fulltime jobs here - in one capacity or another... we do what we can, when we have time... and when we don't have time, we take the Laws of Space and Time and we shake them like a crying baby.

Progress progress -

Wrote up the path-generation system in faithful C#.
The algorithm will take a predefined worldspace (as a grid width and height), a path length, and will hack a path within this world-space that follows these rules:
  • Right-angled turns only - no diagonals
  • No path node may be adjacent to any other path node, with the exception of it's single parent and single child.
You would really think that this would be a smashingly easy task - but in my sleep-deprived state, it proved to be quite a logical trick.

Strangely, it was more difficult to exclude diagonal turns than it was to include them.

In any case, with this algorithm completed and extensively debugged (as extensively debugged as a randomly-generated path can be) - the presentation layer was developed in Unity.

Effectively - the algorithm will provide Unity with:
  • All coordinates of the walkable path
  • All coordinates of nodes that border the path.
With this information, the presentation layer:
  • Builds walls around the path from Prefabs (cubes in this case).
  • Builds a ground for the path from Prefabs.
And here is the baby - screenshot from within Unity inset with debugging work in Excel (conditional formatting is a winner).

All in all, not a bad day of work.


Tuesday, November 24, 2009

The Game

But.... what is the game? What do you DO?

It all begins on the whiteboard.

The time? A conservative 11.35pm / 23.35 military.

Let's break it down - into four subsets - of varying complexity.

The Goal

Starting at Point A - reach Point B.


Movement

Run, Sprint, Jump.
View: Above-and-behind.

Combat

Melee - Strike.
A character can withstand a number of strikes before being knocked down.
A character can withstand a number of knockdowns before dying.

So far, so simple.


Level Generation

Procedural generation of levels. That magical 'P' word.

Each level consists of a Path - a set of adjacent areas, the first of which is Point A, the last of which is Point B.

Each Path is of an arbitrary length - the longer, the longer the game.
Each Path is plotted in an arbitrary area - the smaller, the more winding and convoluted the Path.

Each Path is lined by Walls (invisible) - effectively creating a Gauntlet for the player to run.

Each Path is populated with Enemies - the difficulty and quantity of which are correlated to the position in the Path they fill - the higher the position, the more numerous and difficult the Enemy.

Each Path is populated with Obstacles - to be Jumped or Avoided.

Each Path is decorated with context-specific textures, and randomly decorated with 'flavour' scenery.

Executive Summary:

Run along a path, avoid obstacles, escape or defeat harder and harder enemies, and TRIUMPH - my son... Triumph.

The very essence of conceptual simplicity.

Project: Gauntlet - The Independent Game Project using Unity

Project: Gauntlet - no relation to the arcade game of the same name.

The ultimate aim of Project: Gauntlet is to create - in a short period of time, a small, elegant independent video game - presented in full 3D, utilising the Unity game engine - for propagation to iPhone and Web Browser.

Simplicity and Elegance are the qualitative metrics against which we judge the design of Project: Gauntlet - following the philosophy that a Work is complete not when there is nothing left to add, but nothing left to take away.

This blog will serve to track the progress of our various team members - to capture the victories and the difficulties inherent in an independent development and to serve as a reference for others seeking to follow the same path.