Monday 1 June 2015

Game Update : World building.

I unexpectedly found myself in a situation where I'm without internet access for roughly a month...  By that, I mean I don't have an I.S.P. with enough bandwidth and speed to upload videos or play games online or live-stream.  The reason for that is that my roommate was handling the internet in our apartment and he moved out.  I'm moving out to a new place in another month so I figured I'd wait.

So that's a bummer.  At least I can use my phone and tether my data-plan to my computer so my daily routine isn't disrupted TOO much.  That basically leaves me with more time to work on my project and play Pillars of Eternity.

The sad part of this is I was just made aware of "Freedom Planet" and I want to play this SO badly right now.  Freedom Planet is a Sega-Genesis-style 2D platformer so it takes a lot from Sonic the Hedgehog and Rocket Knight... therefore it is immediately amazing.

I guess I'll have to wait... oh well.

With that said, I've been working on world building for my game.  If you read my previous post(s), I mention that I had an average of 550 areas generated on the overworld map.  I took that up a notch by a couple of thousands (with an estimated average of 2200 areas); here are the results:






I'm still not sure if I want to incorporate an in-game map but it's definitely needed for testing purposes; right now I'm building it as an official feature.  The purple dots are large cities.

In theory, a player could travel the entire world but, as of this writing, everything generated is stored in RAM.  Something tells me I'll need to save the world on disc fairly soon.  None of us has dared travel to all of the areas of a given world yet.  Just one area takes a while on foot.

Saturday 28 March 2015

Game Update : The terror of testing.

Today was a great day for my video game project.

After numerous and exhausting weeks of testing, debugging, more testing and even more debugging, the three of us in the dev team launched a three-player game session.  It's a pretty big deal because we normally test multi-player in a two-player environment and, most of the time, we just run the game in single-player just to test out basic functions.  The last time we had three players, it was back in January when we were testing out latency and the chat...  that's all we could do because that's all there was.

This time, it was different.  Since my last blog entry, I've been working on implementing the dungeon generator into my multi-player build (which, before then, those two aspects have been isolated from one another).  So the game was able to construct a simple world, send it to other clients and now I was putting it to the task of generating elaborate dungeon(s) and hope that all clients wouldn't simply blow up from the load.  Sure, the program's been through testing...  but I didn't plan this three-player session and that terrified me.  I wasn't ready emotionally to see my baby potentially fail.


Player characters currently have crude (almost minecraft-looking) placeholder bodies.  Those bodies couldn't have looked more real for that particular moment when I saw two "beings" spawn in front of me, with their sphere-like heads spinning; looking about their new environment.  That moment was promptly followed by us moving around, jumping, chatting...  you know, to make sure that everything checked out okay.  We even went as far as trying to push each other, see if we'd get stuck in geometry, fall through the world, etc.

That is, until we found an entrance to a random cave.  We almost froze at the sight because we knew that, if one of us went through that entrance, it would procedurally generate a completely new and unexplored area... or crash miserably... or nothing at all!  It's one thing to spawn into someone else's procedurally generated environment, but it's an entirely different thing to move and load into a completely different area.  There were hundreds of ways that it could've gone wrong.  You start to doubt yourself and think about things like:
- What happens if the host doesn't go through the entrance but, instead, another player goes in first?  Does it load properly?
- What happens if two players decide to go through the entrance at the same time?  Do we get two radically different copies of the "same" cave?

Well I've been coding in such as way that take these questions into consideration but you don't really know until you try them out and see for yourself.  I mean,
- What happens if all three players go through the entrance, one client is generating the dungeon (while the others are waiting to receive the info) but crashes midway.  Are all players stuck in limbo?
- What happens if one client fails to properly load the dungeon?

That's some scary stuff!
So one guy charges through the entrance, we held our breath and the rest of us followed.  Here we were, three guys finding ourselves inside this cave.

- "This rock!"  I cried while jumping/pointing at the ground "Does everybody see this rock?  Please tell me you see this rock!"

For the next couple of minutes, we were comparing notes to see if we were indeed seeing the same thing.  We were and eventually we ended up wondering around aimlessly in our separate ways.  One guy found another entrance to go deeper into the cave, the other started climbing the walls to see how far up he could go.  It was at around that time that all terror evaporated from me and the funny thing is that I realized that finding each other in these labyrinths would be pretty hard.  We had no map, no way of knowing where each of us were and there's practically no limit to how deep into a dungeon you can go.

Remember my previous blog about generating the world?
That's the overworld, we were inside one of those squares; three or four levels deep inside a cave... and we were lost.

For the sake of testing out physics and combat damage (you know, for what would eventually be bows/arrows and spells), I had implemented a very crude way for each player to shoot projectiles. So, obviously, our next step was to engage each other in some form of first-person-shooter style free-for-all hunt.  It took a while to find each other but the mayhem that followed once we did was hilarious. One funny moment that I can recall was that I pulled a "Fargoth" without really being conscious about it.  Caves were dark and I wanted to know where I was going so I pulled out my torch and it didn't occur to me that I was making myself an easier target.

There were tons of bugs, some projectiles were stuck in midair, other projectiles were cancelling each other and players were re-spawning in really odd places.  Some players found out he lost the ability to climb walls.  Overall, though, the infrastructure of being inside the game world was working beautifully.

We had a blast; it was a magical moment for us and the game and, in the end, a successful test.

Thursday 5 February 2015

Game Update : World Building

When I started this blog, I wanted to share with you my thoughts on certain game-related subject matter or giving you updates on my LetPlay video series (whenever or not there are technical issues or what-not).

I don't necessarily want to turn this blog into a game dev blog but, considering that my project has taken a lot of my attention, I feel like there isn't much else to talk about.  So here we go:

Back in January 2014, I wrote a blog entry here vaguely talking about the four major milestones that I had planned during the production of my game:
  • - World building
  • - NPC/Monster AI
  • - Combat
  • - Story
It's been a year since then and I'm very happy to say that we're in the [world building] stage of development.  I guess you could say that we've officially started production.
You've most likely seen images of my visual dungeon generator prototype by now (in earlier blog entries) and that's one of the biggest aspects of the world building stage.  I had planned to showcase a video tour/demo of this prototype on Youtube (a year ago) but it was delayed because we kept adding more and more cool stuff to it.  Now-a-days, the prototype is considered complete as far as the coding is concerned, but we're delaying the showcase some more in order to add more art pieces and make it all pretty.

While my buddy is busy doing more artwork for the prototype, I'm redirecting my attention elsewhere: the world.

...

The world map, that is:




What you see here are rough grayscale representations of the terrain; in the sense that whiter squares are higher terrain (ex: mountains).  So, basically, my world generator is procedurally generating an entire globe where each square roughly represents and area that's 20 minutes worth of gameplay (give or take).

As of this writing, the parameters of the world are such that I can make the world as big as I want (currently set at an average of 550 playable overworld areas) and the landscape will be automatically distributed to a random set of nations, laying down cities, etc.



The idea is that these nations will eventually govern NPC behaviors so that their personalities won't be randomly out of control.  Military, Religous, Racist, Peaceful, Festive, Social, Savage, Honor, Poor,  are but a few keywords I have in mind to mix-match in order to create interesting and different nations for my NPCs to live in.

Is the nation primarily set in the moutains?  What are the odds of them being good blacksmiths and/or followers of a fire-related cult?  That kind of thing.

Right now it's pretty crude and simple, but I'll be elaborating it over time.  It kind of looks like a game of Risk :P