Thursday, 2 February 2017

Game Update : the Accomplishments of 2016

I did it!  After 3 years of hard work (during my spare time, of course), I managed to build within the Unity engine a game system that supports:
- Procedurally generated environments featuring custom made occlusion culling and LOD.
- Day/Night cycle that can trigger specific lighting schemes based on event/location.
- Pseudo-physic projectiles (such as arrows, thrown rocks) that can be picked up.
- Loot table logic.
- A (crude) dialogue interface.

The biggest achievement yet is to get all of that working with four players in LAN (haven't tried over the internet yet); squashing all of the bugs that were found.

Whew!

1) The part where we procedurally generate the environment took a lot of time to develop; mainly because pre-packaged game engines don't really support that kind of thing.  There was a logic issue, there was a memory issue and there was a graphic issue.  All of which are pretty much resolved so my friends know how to build the art and we can implement new stuff without adding too much code.

There's still a lot of work to do, particularly when the game builds cities.  The game doesn't really know how to build houses yet, so a small portion of my time throughout 2017 will be spent on fleshing that out.
My only real concern with cities is hitting a limit on collision objects.  So it'll be a balance between [how many objects can I use to decorate the cities], [how many of those objects can I get away without having collision on] and [how large can I make each city with those decorations].

It shouldn't be that bad, but better safe than sorry.


2) There's still a few tweaks I need to do to make sure the clock remains in-sync between game clients but, overall, the system is practically complete.  I can start looking into creating new environment types to add more variety in the mood; gotta make good use of those old colour-theory classes.

This is the kind of thing you do when you only have a short amount of time available in a given day but you still want to spend that time to work on the project.  You know, mess around with colours after a hard day at the office.


3) Projectiles were fun to work on.  It's not like I'm putting combat mechanics earlier than planned, but I had to figure the server-to-client stuff out... which is why I only mention projectiles as opposed to sword play and what-not.  So I came up with 3 types of possible projectiles that a given player would be firing (arrows, thrown objects and fireballs) and made them work.  Latency issues with projectiles is inevitable but I'm keeping an eye out for any issues.  I haven't any problems yet but, then again, we're testing in a LAN.

Fireballs don't really have any physics to them but they do generate light so I wanted to make sure that casting spells wouldn't break the game's performance.  A neat little thing I added (one of the beauties of the iterative process) is that charging up a fireball (like one would to draw an arrow, by holding down the button) currently increases the size of the fireball... Dragon Ball Z style :P

... and it gives us something to do while we play-test.  I’m not sure we’ll end up keeping the fireball-gets-bigger-as-you-charge thing but we might as well play with it and see if it sticks.

I also took the time to work on stationary objects such as doors, chests and anything other item that one could pick up.

4) Chest objects introduced the concept of loot tables, which allows the game to generate new items to reward the player.  It was an interesting challenge considering, typically in roleplaying games, the results of loot tables are based on the player’s level.  You know, “if player is at level 5, then spawn more magical items”; that kind of thing.  But the game I’m working on has no “level” to speak of so I had to come up with an way to reward players with loot without relying on a linear table.

It functions and what I came up with seems interesting enough on paper; only time will tell if it’ll actually be fun to loot things.

This is what happens when you forget to put a limit
on how many items may spawn on a single chest.

5) The dialogue system was one of the most challenging things I had to come up with; primarily the UI.  How do you build a system that's intuitive, doesn't pause the game during a conversation and allows the player to say pretty much anything he might want to say?  … and possibly allow multiple players to participate in the conversation?

I practically had to delay work on it for a full year (I was supposed to dedicate 2016 to the system) because I wasn't sure how the player would interact with the NPCs.  It's one thing to generate dialogue for the NPCs (not an easy task on its own, but I think I got it figured out) but I wanted to figure out how the player would communicate to the NPCs first.

Not that I'm complaining too much because it did allow me to fix a lot of other stuff in the meantime, but it does sadden me a bit that I've taken yet another delay.  On the bright side, everything's ready to go for 2017 and work on that dialogue.

It's like I can finally build the game, now.


Friday, 22 July 2016

Game Update : Optimization

Optimization.

This will most likely not be the last time I'll be talking about optimization.  Primarily because many avoid the subject... I mean, it IS a difficult subject to talk about; there's no many factors that it's almost an abstract concept.  I enjoy talking about it and it's seriously a high priority when you think about how one should build a video game.

I enjoy talking about it because I somewhat see it as an art form in itself.  I geek out whenever I see low poly challenges where artists try to do incredible art with very little.

When I first started the video game project, I already had some sort of game plan on how things should be organized in order to ease the load off the CPU and GPU.  Artificial Intelligence is going to be an important aspect of the game so it's imperative that I free up as much CPU cycles as possible.

The key to this is to have a simple workflow and this particular case has been pretty straight forward:

  • You build something as fast as possible just to see it working in the game.
  • Make sure it doesn't break the game, test and debug it.
  • Optimize/re-write it.

If you want to build your own video game, that's the mindset I believe you should have.  The first point is particularly important; you shouldn't waste your time trying to get it working perfectly the first time... because you'll end up spending a lot of effort for very little "game" to show for.

Since my last "game update" blog post, I've been splitting my time between putting new things in and optimizing old things.  It keeps me from losing sight of the ultimate goal and spending too much time on a single thing.
For example, Last Year (in June) I've talked about saving the world data on disk (because everything was stored on RAM at that point) and I implemented that during the winter time.  Since the save file would grow as the player explored the world (as the content gets created), I didn't think too much of it when I put that functionality in...

... until I did the math.  With an (current) average of 2600 areas to explore (surface level, not actual dungeons), the save file was estimated to get up to 3 terabytes worth of information.  For roughly 1.5 to 4 megs a zone.  That's excessive!  So I spent a bit more time earlier this year to streamline the data and I got that shrunk down to 120kb or so.  Per zone.

While I was figuring that out, I also spent some time adding in features that would shape the game-play:  Creating a name generator for my environments, adding the ability for characters to generate sound and smell... so that running around makes you loud (so that others can detect you) and going into sewers makes you smelly the longer you stay in there (for detection and other sorts of interactions).

Adding new things, fixing old stuff.

What's been on my plate recently has been about continuing working on the foundation for the NPC AI; particularly the dialogue system.  This will be an on-going process that will be on my "add" list for quite some time.  After all, it's a prime element for the game.  As far as "fixing" things, I had my eyes on graphics.

Optimizing graphics is such an awkward thing to do.  I mean, building assets in an optimized way is simple enough but it's really about how the game engine is handling those assets in a live environment that can sometimes be a challenge to optimize.  What's typical for the industry, you play through a level, identify a drop in frame-rate, investigate where the player is looking at, and then make some changes.  Sometimes it's as easy as removing a couple of trees here and there because there was too much vegetation in one particular spot (which is taxing on the video card), and sometimes it's as difficult as re-aligning streets and buildings in a city so that buildings could obscure other objects that would otherwise drop your frame-rate.

But when you're dealing with randomness, it gets a bit tricky.  I mean, objects that are dynamically spawning due to the computer's whim are already a difficult to deal with (compared to assets that are locked down before compile), but now you also have to deal with the standard challenges... which typically boils down to density and line of sight.

I was more or less prepared for this.  Procedural generation helps a ton here by giving some guidelines to how the computer should build things.  So I can say things like "don't put too many trees in any given area" or "break off line of sight by placing a building here".  That, coupled with how I optimize the 3D assets, the only thing that I'm left with is dealing with the game engine's quirks.
Thankfully, Unity is actually pretty damn good as I didn't have to fiddle too much (although I did have to build my own system for hiding objects and reducing detail at a distance).  If there is a problem and you can't identify where it's coming from, the profiler is a good spot to check for clues.


It's just a little bit daunting to look at.  I've been using the profiler extensively for the past month or so I've been tweaking some things here and there.  Overall, though, everything's going according to plan and it seems like Unity won't have any major performance issues with what I've got planned.

AI is coming, and the CPU needs to have a light load.

Monday, 29 February 2016

Gamer Profile

A few weeks ago, someone asked me to take this test and share the results.  Here it is:

Fast-Paced, Analytical, Relaxed, and Story-Focused
"A percentile of 80% means you scored higher than 80% of gamers. Conversely, a percentile of 10% means 90% of gamers had a higher score than you. This means that a 50% is perfectly average."


The Action Components (51%)
Gamers with high Action scores are aggressive and like to jump in the fray and be surrounded by dramatic visuals and effects. Gamers with low Action scores prefer slower-paced games with calmer settings.

Destruction (34%): Gamers who score high on this component are agents of chaos and destruction. They love having many tools at their disposal to blow things up and cause relentless mayhem. They enjoy games with lots of guns and explosives. They gravitate towards titles like Call of Duty and Battlefield. And if they accidentally find themselves in games like The Sims, they are the ones who figure out innovative ways to get their Sims killed.
 
Excitement (70%): Gamers who score high on this component enjoy games that are fast-paced, intense, and provide a constant adrenaline rush. They want to be surprised. They want gameplay that is full of action and thrills, and rewards them for rapid reaction times. While this style of gameplay can be found in first-person shooters like Halo, it can also be found in games like Street Fighter and Injustice, as well as energetic platformers like BIT.TRIP RUNNER.

POPULAR GAMES
Excitement: Super Smash Bros. Melee, Battlefield Series/3/4, Counter Strike, Call of Duty, God of War, Destiny, Kingdom Hearts 2, Resident Evil, League of Legends
Destruction: GTA Series/V, Battlefield Series/3/4, Destiny, Call of Duty, Gears of War, Halo, Borderlands Series/2, Doom, God of War, Counter Strike

///////////////
The Mastery Components (52%)
Gamers with high Mastery scores like challenging gaming experiences with strategic depth and complexity. Gamers with low Mastery scores enjoy being spontaneous in games and prefer games that are accessible and forgiving when mistakes are made.

Challenge (29%): Gamers who score high on Challenge enjoy playing games that rely heavily on skill and ability. They are persistent and take the time to practice and hone their gameplay so they can take on the most difficult missions and bosses that the game can offer. These gamers play at the highest difficulty settings and don’t mind failing missions repeatedly in games like Dark Souls because they know it’s the only way they’ll master the game. They want gameplay that constantly challenges them.

Strategy (75%): Gamers who score high on this component enjoy games that require careful decision-making and planning. They like to think through their options and likely outcomes. These may be decisions related to balancing resources and competing goals, managing foreign diplomacy, or finding optimal long-term strategies. They tend to enjoy both the tactical combat in games like XCOM or Fire Emblem, as well as seeing their carefully-devised plans come to fruition in games like Civilization, Cities: Skylines, or Europa Universalis.

POPULAR GAMES
Challenge: Super Smash Bros. Melee, Devil May Cry 3, World of Warcraft, Dark Souls, Counter Strike, Street Fighter, Monster Hunter, DoTA Series/2, Starcraft 2, Warcraft 3
Strategy: Europa Universalis 4, Crusader Kings 2, Civilization Series/5, EVE Online, XCOM, Starcaft Series/2, Fire Emblem, Age of Empires, Warcraft 3, Kerbal Space Program

///////////////
The Achievement Components (2%)
Gamers with high Achievement scores are driven to accrue power, rare items, and collectibles, even if this means grinding for a while. Gamers with low Achievement scores have a relaxed attitude towards in-game achievements and don’t worry too much about their scores or progress in the game.

Completion (17%): Gamers with high Completion scores want to finish everything the game has to offer. They try to complete every mission, find every collectible, and discover every hidden location. For some players, this may mean completing every listed achievement or unlocking every possible character/move in a game. For gamers who score high on Design, this may mean collecting costumes and mounts in games like World of Warcraft.

Power (1%): Gamers who score high on this component strive for power in the context of the game world. They want to become as powerful as possible, seeking out the tools and equipment needed to make this happen. In RPGs and action games, this may mean maxing stats or acquiring the most powerful weapons or artifacts. Power and Completion often go hand in hand, but some players enjoy collecting cosmetic items without caring about power, and some players prefer attaining power through strategic optimization rather than grinding.
 
POPULAR GAMES 
Completion: Final Fantasy Series/IX, Assassin’s Creed Series, Legend of Zelda Series, God of War, Animal Crossing, Elder Scrolls Series, Destiny, Pokemon, Guild Wars 2, Fire Emblem
Power: World of Warcraft, Diablo 2/3, DoTA Series/2, Runescape, Destiny, Call of Duty, League of Legends, Counter Strike, God of War, Resident Evil

///////////////
The Social Components (57%)
Gamers with high Social scores enjoy interacting with other players, often regardless of whether they are collaborating or competing with them. Gamers with low Social scores prefer solo gaming experiences where they can be independent.

Competition (48%): Gamers who score high on this component enjoy competing with other players, often in duels, matches, or team-vs-team scenarios. Competitive gameplay can be found in titles like Starcraft, League of Legends, or the PvP Battlegrounds in World of Warcraft. But competition isn’t always overtly combative; competitive players may care about being acknowledged as the best healer in a guild, or having a high ranking/level on a Facebook farming game relative to their friends.
 
Community (64%): Gamers who score high on Community enjoy socializing and collaborating with other people while gaming. They like chatting and grouping up with other players. This might be playing Portal 2 with a friend, playing Mario Kart at a party, or being part of a large guild/clan in an online game. They enjoy being part of a team working towards a common goal. For them, games are an integral part of maintaining their social network.
 
POPULAR GAMES 
Competition: Counter Strike Series/GO, Super Smash Bros. Melee, DoTA Series/2, League of Legends, Street Fighter, Heroes of the Storm, Starcraft 2, Call of Duty, Battlefield Series/3/4, FIFA
Community: Final Fantasy XIV, Battlefield Series/4, Destiny, Guild Wars Series/2, EverQuest, League of Legends, Monster Hunter, World of Warcraft, Counter Strike, DoTA Series/2 
 

///////////////
The Social Components (57%)
Gamers with high Social scores enjoy interacting with other players, often regardless of whether they are
collaborating or competing with them. Gamers with low Social scores prefer solo gaming experiences where
they can be independent.
 
Competition (48%): Gamers who score high on this component enjoy competing with other players, often in
duels, matches, or team-vs-team scenarios. Competitive gameplay can be found in titles like Starcraft, League of Legends, or the PvP Battlegrounds in World of Warcraft. But competition isn’t always overtly combative; competitive players may care about being acknowledged as the best healer in a guild, or having a high ranking/level on a Facebook farming game relative to their friends.

Community (64%): Gamers who score high on Community enjoy socializing and collaborating with other
people while gaming. They like chatting and grouping up with other players. This might be playing Portal 2 with a friend, playing Mario Kart at a party, or being part of a large guild/clan in an online game. They enjoy being part of a team working towards a common goal. For them, games are an integral part of maintaining their social network.

 
POPULAR GAMES 
Competition: Counter Strike Series/GO, Super Smash Bros. Melee, DoTA Series/2, League of Legends, Street Fighter, Heroes of the Storm, Starcraft 2, Call of Duty, Battlefield Series/3/4, FIFA
Community: Final Fantasy XIV, Battlefield Series/4, Destiny, Guild Wars Series/2, EverQuest, League of Legends, Monster Hunter, World of Warcraft, Counter Strike, DoTA Series/2  

///////////////
The Immersion Components (45%)
Gamers with high Immersion scores want games with interesting narratives, characters, and settings so they
can be deeply immersed in the alternate worlds created by games. Gamers with low Immersion scores are
more grounded in the gameplay mechanics and care less about the narrative experiences that games offer.

Fantasy (21%): Gamers who score high on Fantasy want their gaming experiences to allow them to become
someone else, somewhere else. They enjoy the sense of being immersed in an alter ego in a believable
alternate world, and enjoy exploring a game world just for the sake of exploring it. These gamers enjoy games like Skyrim, Fallout, and Mass Effect for their fully imagined alternate settings.

Story (70%): Gamers who score high on Story want games with elaborate campaign storylines and a cast of
multidimensional characters with interesting back-stories and personalities. They take the time to delve into
the back-stories of characters in games like Dragon Age and Mass Effect, and enjoy the elaborate and
thoughtful narratives in games like The Last of Us and BioShock. Gamers who score low on Story tend to find dialogue and quest descriptions to be distracting and skip through them if possible.

 
POPULAR GAMES
Fantasy: Dragon Age Series/Inquisition/Origins, Elder Scrolls Series/Morrowind, Dishonored, Mass Effect Series/2/3, Skyrim, Fable, Fallout New Vegas, Knights of the Old Republic, Journey, Legend of Zelda
Story: Dragon Age Series/Origins, Mass Effect Series/2/3, Persona 3/4, Tales of Symphonia, Xenogeras, Final Fantasy VIII/IX/X, Knights of the Old Republic, Fire Emblem, Kingdom Hearts, Series/2, Planescape Torment 

///////////////
The Creativity Components (38%)
Gamers with high Creativity scores are constantly experimenting with their game worlds and tailoring them
with their own designs and customizations. Gamers with low Creativity scores are more practical in their
gaming style and accept their game worlds as they are.
 
Discovery (13%): Gamers who score high on Discovery are constantly asking “What if?” For them, game
worlds are fascinating contraptions to open up and tinker with. In an MMO, they might swim out to the edge of the ocean to see what happens. In MineCraft, they might experiment with whether crafting outcomes differ by the time of day or proximity to zombies. They “play” games in the broadest sense of the word, often in ways not intended or imagined by the game’s developers.

 
Design (65%): Gamers who score high on this component want to actively express their individuality in the
game worlds they find themselves in. In games like Mass Effect, they put a lot of time and effort in the
character creation process. In city-building games or space strategy games, they take the time to design and
customize exactly how their city or spaceships look. To this end, they prefer games that provide the tools and
assets necessary to make this possible and easy to do.

 
POPULAR GAMES 
Discovery: Elder Scrolls Series/Oblivion/ Morrowind/Skyrim, Fallout Series/3/New Vegas, Fable, Legend of Zelda Series/Ocarina of Time, GTA Series/V, Minecraft, Earthbound, Kerbal Space Program, Metal Gear Solid 3, Metroid Prime
Design: The Sims Series, City of Heroes, Animal Crossing, Guild Wars 2, Final Fantasy XIV, Dragon Age Series/Origins, Mass Effect Series, Monster Hunter, Pokemon, Elder Scrolls Series/Oblivion/Skyrim

Tuesday, 23 February 2016

Game Update: 2015's tough love.

I had hopes of writing blogs on a monthly basis but that certainly isn't working out.  2015 has been a rough year for my project.  "Tough love" is probably the best way to put it... I should probably write the blog about that.  Hang on, let me go back a few steps:

2013 is when I started working on a prototype which, after a few iterations, evolved into a multi-player build in 2014.  Throughout the year 2014, there were a few features that got implemented (although in primitive state) such as climbing, lighting torches, going underwater, traveling to different areas, character stats, "combat".

During the various iterations, I got into the habit of working on two simultaneous builds:
- Build-A kept the art up-to-date (so that we could troubleshoot and build assets).
- Build-B is basically a rewrite of the entire thing for a cleaner, more organized code and faster performance.

Once in a while (every 3 months or so), I'd replace the code of Build-A with Build-B's.  That way, Build-A would inherit new features and Build-B would be rewritten from scratch yet again. The process isn't really linear and how much time I dedicate on each build varies.

In December 2014, I got involved in the Beta of Unity 5 to get acquainted with it as early as possible.  So, Build-A was in Unity 4.x and Build-B was a rewrite in Unity 5b.  To give you guys an idea, I wrote a blog post about Build-A's "stress test" in March 2015 and I wrote a blog about Build-B's progress on world building in February 2015 (with an update in June).

In March 2015, problems started to arise.

Visually, the team and I started to notice oddities with how we handled natural rock formations on the walls when light would hit the surface from extreme angles.  Because of the random nature of the game, we couldn't completely avoid it without taxing the video cards too much by adding more polygons.  So we had to brainstorm alternatives.  The solution we found involved locking myself up in my appartment and write more complex code for days/months.

With Build-A's success, retooling how we'd handle the visuals wasn't such a big deal.  I mean, most of the core functions were already working (despite the bugs) so where's the harm?  Especially if the solution would help with other aspects.  Well, it turns out that Unity v5.2's patch made drastic changes to how the engine would handle multi-player; making most of the multi-player code I had written until this point "depricated" or obsolete.  I had to adapt when very little documentation could be found.

So I had to rebuild the visual component as well as restructure the multi-player...

... Shit.

This was a year ago.  Feature wise, nothing changed.  Which makes it look like we did absolutely nothing in 2015.  Under the hood, however, it's like we're building a completely different game.  Time well spent although it was at the cost of sweat, blood and tears.

So what are we working on now?

Art wise, we've come to the surface and started the ground-work on trees and (more recently) grass.  I think the artist went overboard with the grass, though:

If you look closely (because it's not obvious with all the grass), you'll notice that the trees in the foreground are merely stumps.  This is because this area is identified as a village... so, eventually, houses and a few shops would be filling up the scene.  Idealy, not all trees in the area should be razed but that's balance for another time.

As far as game systems and mechanics goes, AI is being worked on.  NPCs need to be able to participate in a conversation so I've been brain-storming ideas for the UI while scripting behaviors.  I'm expecting this to take a full year to implement.  Eventually, I'll make the AI move around.

We got the wind back in our sails.  Lets hope that 2016 is kind.

/////

So what have I been playing lately?  I got back to my "roots" and started playing more rogue-likes.  Dragon Fin Soup and Hieroglyphika are the new additions to my collection.

Fridays and Saturdays are my "game days" now and, when I'm not recording Elder Scrolls, I've been meaning to showcase more rogue-likes in my streams:
- Rogue (the original).
- Tales of Maj'Eyal.
- Brogue.
- Eldritch.
- Delver
- FTL: Faster than Light.
- Dungeon Crawl Stone Soup.
- Crypt of the Necrodancer.
- Caves of Qud.
- Darkest Dungeon.
- Dragon Fin Soup.
- Hieroglyphika.

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