Welcome to Lakehome Games

Featured

Lakehome Games is a tiny, but growing, game development studio working on our first commercial release.  We’re slowly becoming more active and recognized in the indie game development community.  We currently have 1 artist, 1 programmer, and 1 manager of mayhem; and we’re looking for people to join us and help us prepare for our first Kickstarter.  But I’ll be honest – sometimes there are sea shanties.

If you’d like the learn more about Lakehome Games, drop us a line:
darrelcusey@gmail.com

Lakehome Games Open Letter

I can’t thank you enough for your interest in Lakehome Games. We’re a small, but growing game development studio that is working on its first commercial release.

Darrel Cusey is the founder and chief-programmer-guy of Lakehome Games and has over 20 years of professional programming experience. Plus, he’s an all-around nice guy, enjoys doing all the marketing and legal work, and just so happens to have the uncanny ability to provide awesome art direction and support. Darrel participates in many Indie Community events like Ludum Dare, the IGDA, and the GDC. Darrel enjoys teaching others his craft, having written and presented over 40 tutorials on topics ranging from multiplayer networking and login security to finite-state-machine management and procedural content generation.

Sean Danielson is an illustrator, writer, and game designer. His interests include graphic novels such as Battle Angel Alita: Last Order, well-developed shows such as Last Exile, and is the creator of the Fantasia Arks IP. He’s also a bit of a quiet sort of person at times – get him talking about anything he has an interest in, though, and you’ll likely not hear the end of it for a while.

We’re a tiny studio that’s just starting out, but we know that may REALLY appeal to some people. It’s a much more relaxed atmosphere to work in. You can work 100% remotely. And, you’ll have more control over your artistic vision. That’s a pretty good deal for the right person. Creative arrangements that will give you a leg up in the industry are also available.

We’re currently looking for artists that are interested in helping us with our first commercial release.  Here’s a sample of the kinds of things we’re looking for:

  • 3D Character Modeler, Texturing, Rigger (~5,000 polygon range)
  • 3D prop modeler (swords, environment assets such as pots of boiling oil, etc)
  • 3D environment artist
  • 3D Character Animator

Hash Functions vs. Perlin Noise

I had a few people at the IGDATC ask me why I didn’t just use Perlin Noise, so I wanted to post this to point out the differences in order to help people gain a better understanding of procedural content generation.

Don’t get me wrong — I use Perlin Noise functions (actually Simplex Noise these days) for some things as well, it’s just a matter of selecting the right tool for the right job :)

Here are some points to keep in mind when considering if you should use Hash Functions or Perlin Noise (or other similar) functions — including some formulas you can use to see which one is right for you:

  1. Pre-Generation.  Most Perlin Noise functions require pre-generation of an entire map just to return a single pixel.  Let’s say that your Perlin Noise function is very fast, and can generate an entire map with 4 octaves in 0.1 seconds.  That seems very good, remember that this will give you only 4 octaves.  Some of the work I’m doing using 64 octaves (for a 64-bit system) x 8 directions of shift from center for a total of 512 octaves.Generating the same amount of data using even a very fast Perlin Noise function would require 51.2 seconds –which is probably going to be too slow for real-time procedural content generation.  But maybe it’s going to take your player 60 seconds to move across that map — in which case you may be just fine.  But, also keep in mind that’s just for 1 set of maps, if you are using a 3×3 grid of map tiles, then you’ll need to generate 3 complete sets of maps every time a player crosses onto a new grid square — so this pushes up the time to 153.6 seconds.

    As you can see, there’s a relationship here between the speed at which a player can consume your content (even if just running past it) which we’ll call speedConsume in meters/second; the maximum time that can be allowed for your function to generate all the needed content in order to prevent “popping” which we’ll call maxSpeedGenerate in seconds; and the size of the content generated at a time which we’ll call contentSize in meters:

    maxSpeedGenerate = (contentSize / speedConsume) / 3

    for example:

    x = (512 meters / (14 meters/second)) / 3
    x = ~12 seconds

    This means you have about 12 seconds available per map tile (assuming you are using a 3×3 grid and need to generate 3 tiles every time a player crosses onto a new tile).  To figure out how much time you can spend on each map, simply take this number and divide it by the number of maps you need.

    for example (if you need 64 different maps to get all the attributes you need):

    z = 12 seconds / 64 maps
    z = 0.1875 seconds / map

    This means that each map can only take 0.18 seconds to generate.  For 512 maps (for 512 attributes), then the maximum time that can be allowed per map is  0.0234375 seconds.

    If your function can generate the number of maps you need within the time allowed, then the function you’ve chosen should work fine.

  2. Sparseness and Efficiency.  Another thing to consider about Perlin Noise functions is that because they are generating an entire map, they are always generating 100% of the data for an entire map tile.  However, you may only need a tiny fraction of these data points, depending on how dense your content is.  In other words, the data generation efficiency is represented by the total number of samples needed which we’ll call samplesNeeded (in pixels) divided by the map size squared which we’ll call mapSize (in pixels):efficiency = samplesNeeded/(mapSize x mapsSize)

    for example (if you need 60 sample and your mapsize is 512×512):

    x = 60 / (512 x 512)
    x = ~0.00023

    Ideally, x would be 1.0 — which represents 100% efficiency (you only generate the data you need).  If you are only ever sampling 60 data point from a 512×512 map, then you are running at 0.023% efficiency.

    If, however, you are using a Perlin Noise function for generating a terrain heightmap, then you are automatically using all the data points, so you are automatically at 100% efficiency in that scenario.

    Calculating efficiency for Hash Functions is a little different.  Because a Hash function always generates its data points in real-time on-demand, it would seem that they are 100% efficient.  However, this is not exactly the case.  Remember that any given Hash Function will generate a byte array as the return value.  You may not need the entire set of bytes, though, for any given point.  Because of this, the efficiency of Has Function is expressed as bytesUsed / byteArrayLength:

    hashEfficiency = bytesUsed / byteArrayLength

    for example (let’s say you are  using 18 bytes, and the function returns byte arrays that are 32 bytes in size):

    x = 18/32
    x =  0.5625

    In this scenario, using a Hash Function would give you ~56% efficiency.

  3. Smoothness.  Depending on how comfortable you are with coding, you may need to use an “off the shelf” Perlin Noise function.  Ken’s reference implementation in java is not commented well, and even his papers that try to explain exactly how the function works can be daunting for even the most studious mathematicians.  Simplex Noise is faster, and easier to understand, but it is still not exactly a “walk in the park.”    If you find yourself in the situation where you are unable to modify these functions to meet your needs, then you may be stuck with using the “off the shelf” versions.  Which will mean that you will get very smooth gradients between any two points — that is, after all, what they were designed to do and they do it extremely well.  There are cases though, where you occasionally may need sudden drastic changes between the values between any two points.Hash Functions, on the other hand, will always give you noise with no smoothing – so you can easily smooth it yourself (or not) using additional octaves and weighting.  In fact, you can make it more or less smooth by modifying the weights applied to different octaves — or in the case where you want truly jagged noise, use a single octave with no weighting at all.

IGDATC ProcGen Slides and more

Thank you everyone who came out to see me for my IGDATC presentation ”procedural content generation in Unity”.  And a big Thank You to The Nerdery for your generous hosting of the these events.  The Nerdery is All Win !

Here are the slides for the presentation.

Here is the transcript for the presentation.

And finally, here’s the Unity Package for the demo that was used in the presentation.  I had to remove the female elf model to keep this an open package… but nothing else has been changed.  Make sure to add a “Primitive” tag and open the Demo Scene before running.  The “Primitive” tag can be added by selecting Edit –> Project Settings –> Tags.  Thanks Ryan for pointing that out.

I have to admit, that was the best presentation I ever gave without speaking a word :D

If you still have questions, or are interested in Lakehome Games and the kinds of things we’re doing, feel free to drop me a line at darrelcusey@lakehomegames.com

Procedural Content Generation in Unity3D

Darrel Cusey (@Tulrath)
Lakehome Games, LLC

http://www.lakhomegames.com

Procedural Content Generation in Unity3D
May 9, 2012 for the IGDATC
Deterministic Procedural Content Generation (PCG) in video games has been with us for some time now. Very early games like Elite and Rogue used these techniques almost exclusively for content generation. More recent examples like Diablo, Elder Scrolls Daggerfall, Borderlands, and Minecraft have refined these techniques to the point of a science. Unfortunately, many game developers don’t use these techniques generally because they are considered “too noisy,” “too slow,” or “too unpredictable.” This presentation will provide:

* a brief description of what PCG is (and what it is not)
* examine some current methodologies
* describe the current state of the art
* and demonstrate some new technique of my own design that are not yet in general use.

All of these methods will use algorithms that are fast enough to generate content real-time and use simple binary math that can be implemented in any programming language. As we go through this presentation, we’re going to “build-up” our algorithms from the ground up using a simple game developed in Unity 3D. Even though we will be implementing some higher-level math techniques, the presentation is designed to be accessible for your entire team — every member of your game development team will get something out of this presentation.

There will time for Q & A, so be prepared for lots of discussion. Darrel Cusey is a self-taught computer programmer and game designer recruit who has over 25 years of professional programming experience. Darrel is the founder of Lakehome Games, a three-person video game development studio that is combining rich characters and stories with novel gameplay mechanics to create games for the Web and Mobile platforms that are both highly engaging but also immediately accessible for busy people. Over the last 5 years, Darrel has been an active member in the Indie game development community, providing tutorials and instruction on topics like in-game terrain generation for the Toque Game Engine on the Garage Games forums, multiplayer game development and advanced network security implementations for the DarkGDK for The Game Creators forums (forum name “Omen”).

Tiny Gods was my entry for the Ludum Dare 48-Hour Game Making Competition.  I was able to finish the game in the 48 hour deadline, with just 19 hours total spent on the actual production of the game.  Read the Entry or Read the Post-Mortem.

Tiny Gods is a 2D “Bullet Hell” game in the style of 1995-1998 SNES games. In Tiny Gods, you are a new demi-god, but your powers are not yet stable and are easily influenced by your followers on all the worlds you find throughout the universe. As a demi-god you can absorb worlds to give you ammunition to defeat your foes, or you can stay close to worlds that give you power. You must constantly balance staying in the proximity of worlds (to absorb their influence) and consuming worlds (to give you ammunition).

Stranded Screenshots

Stranded was my 48-hour game-making competition entry for Ludum Dare 21.  Standed is an arcade-style puzzle-solving game for the Web and PC.  The theme was “Escape” and my highest score was #105 out of 650+ for the “Humor” category :) .  I made this game in Unity3D.  This was my first Ludum Dare game, and the first game I completed in 48 hours.