Showing posts with label video games. Show all posts
Showing posts with label video games. Show all posts

Tuesday, December 25, 2012

Musing on Procedural Generation


Wow - this blog is still here. 

It's been a while since the last post, and it's going to be of an entirely different character. I'm writing this blog mainly as an exercise to flesh out some thoughts I've had tonight about coding. Suffice it to say that in the time between Cairo and now, I've founded an indie game studio (Send More People) and started to get into the language C#.

The Gist of It

Space sometimes poses a challenge for game designers. Space is big - our own galaxy has something close to 100 billion stars in it, and many of these stars have orbiting planets. Generating billions of systems can be tricky for reasons of scale - storing the data, and, from a design standpoint, ensuring that each system is built properly.

Spore supplied players with a vast procedurally generated Galaxy
Minor segue: games like Escape Velocity had a few hundred star systems and hand-crafted each one. Usually there were only a handful of planets in each given scene, and their qualities were pre-determined. Compare that to a games like Sins of a Solar Empire - where each game is set in a procedurally generated star system - and the scripted feel is exchanged for variable gameplay. And it occurs to me now, Spore did a great job at generating a galaxy... although it didn't give you much to do in it.

Anyway, I'm thinking that it would be fun to procedurally generate a universe for a player to explore. Here's how I might organize the variables in a such a system, and the variables they might produce. Each of these variables should be derived with the others in mind; for example, planets closer to the star  would likely be warmer than those further, etc. The relationships would be complex, though - surface temperature would also be influenced by, axis rotation, atmospheric content, day length, etc.
  • Stars
    • Number of (Integer, likely 1-2)
    • Type (name)
      • Brightness (Float, Scale 1-10)
      • Size (Float, Diameter km)
      • Mass (Float, Whatever the Unit of measurement is for stars...)
  • Planetary Bodies
    • Number of (Integer, Probably between 0-15?)
    • Size (Float, km)
    • Atmospheric content (Array, Chemicals and % of Atmosphere)
    • Mass (Float, kg?)
      • Gravity (Float, Unit is "G" for earth gravity.)
    • Surface Composition 
      • Chemical (Array, Elements and %)
      • Liquid on the surface (Boolean)
        • Size of Bodies of water (Integer, percentage of surface area)
    • Life 
      • Exists? (Boolean)
      • How Many forms (Integer)
      • Intelligent (Boolean)
        • Hostile (Yes/No/Neutral)
        • Technological Development (Array, Stone-age to space god)
      • (Many, Many other variables possible)
    • Moons Orbiting
      • Same variables for planets
    • Orbit period
    • Revolution period
    • Axis Rotation
  • Asteroid Belts
    • Number of asteroids (Integer)
    • Size of asteroids
    • Speed 
    • Composition

Look at your watch, dude.

Its nearing 1am and it's Christmas day, so I'm calling it a night. But in closing, it occurs to me that there are multiple levels of complexity that are possible for procedurally generating a star system, and each level of complexity seems to exponentially increase the difficulty in creating system. Likely I'll want to hit some middle ground between just randomly generating a number of planets and moons, and meticulously generating individual characteristics of said bodies.

Something to consider. Over and out.

Tuesday, March 17, 2009

Technology Curve

Full Size Image Here.

I haven't updated Repiphany! in such a long time! Here is strip #16 - This Will Be Us Someday. I have to credit Jason Potteiger for the inspiration - it comes from deep discussion he and I fell into the other day as to how our generation is adhering to the technology curve. Or rather, from his point of view, how it isn't.

It's an interesting perspective. Most of us young 20-somethings use Facebook on a daily basis, but sometimes it seems as though we're starting to drop off using the new websites as they arrive. Twitter, LinkedIn... I know I don't use them, or really even know what they do. I imagine that as I grow older I'll slide even further into my groove of comfortable products, adopting new technologies every now and then but in no way keeping with the exponential growth of the new market. Flash forward forty years - I see myself trying to bond with my son through a friendly videogame. I gesture at the now-archaic Xbox 360 and he responds with a giggle. I decide to play his games and eventually end up baffled by an immersive reality simulator. Eventually I sigh and exit the world as my laughing son redesigns the laws of physics.

Ah well. I've made plenty of fun of my father for not using Firefox plugins. Getting ridiculed by my future cyborg child sounds like my just reward!

In other news, I mentioned a few posts ago that I've been working on a game idea. I've dubbed the game Project Ascent until I can come up with an appropriate title. As a teaser, here is the sketch that lead to the game idea (click on the image for fullsize). More to follow in the coming weeks as I finish up the story board for Stage One.