Sunday, June 13, 2010

Blog<Game>

Programming

I'm a pretty left-brained kind of guy. I enjoy math, logic, and things with structure. I enjoy thinking about implementation more than abstraction. When I'm describing what type of thinker I am I use words like "implementation" and "abstraction." I'm pretty good at following directions to get something to work. I would say that close to 90% of my life involves this kind of thinking

At the same time, I enjoy creating things. I used to want to be an artist, or a writer, or a musician. I like to think about questions that don't have answers, or about how a song or piece of artwork makes me feel. The best part of my job is coming up with a solution to a problem. Hell, my creative side is one of the reasons I'm writing this blog.

I continued to program after my first programming class in high school for one simple reason. It's a combination of the logical and the creative. It's analyzing a problem, figuring out a solution, and then making the solution work. But there are areas of programming where there's a bigger creative outlet than my normal job provides, which is why I started developing a game a few months ago.

The Game

The game's tentative title is Reborn. The overall vision for the game is to create a giant world that the player can manipulate however they want. The biggest feature is that you can change the terrain of the world by farming, mining, tunneling, creating burial mounds, or whatever else you can come up with.

Well, as of right now, it's just a collection of tools to eventually allow that kind of interaction. If the past 6 or 7 years have taught me anything, it's that creating a game takes a long time and requires a ton of motivation and patience. I plan in posting more about it in the future. Things like design docs, pictures, videos, downloads (at some point), and general info on its progress.

Some very general info:
Language: Scala
3D framework: OpenGL (JOGL)
Platform: Windows, Mac, Linux

For now, I have created a few videos of some of the tools that will be used in the game. This technology will eventually allow for a giant deformable world. Sorry for the poor quality. The screen-cast software I used to record the videos didn't handle the recording process very well, especially while the CPU was trying to make the tools run smoothly.

Rendering geometry using Vertex Buffer Objects. VBOs let you render a large amount of geometry very quickly. The geometry is stored locally in the video card's memory, so it avoids costly memory transfer operations. It also allows for quick updates to the geometry as you can see in the video.


Creating surface normals. Surface normals are required for lighting. This video is rendered using OpenGL's per-vertex lighting model, but eventually the game will use a fragment shader for per-pixel, bump-mapped lighting.


Partitioning a mesh along a plane. The game will require splitting up the world into smaller pieces so that it can be rendered/updated efficiently. This video shows a mesh being split about 30 times/second along a rotating plane.


Reducing a mesh. This video shows 2 meshes. The first is the original mesh, and the second is the same, but with about 100 fewer triangles. The goal is to use as few polygons as possible, but retain the interesting features of the original. The tool itself still has some issues that I'm working out, but the video is a pretty good indication of the final product.



There's still a lot to be done. Once I work out the final kinks with the mesh reduction tool, I can start creating the world proper. This will include things like texture mapping, nailing down a lighting model, organizing the world into a fast data structure, and adding non-terrain geometry like trees, people, animals, buildings, etc...

Also, at some point I need to add sound, input, and possibly physics.

I'll hopefully be updating my progress regularly.

3 comments:

  1. Kyle,
    I love the fact that you are creating a game! I remember when you would sit for hours figuring out complex math in order to program the next phase of your creation. Although the technical aspect of this is foreign to me, it is your creative expression, both in your writing and in your work that is exciting!

    I can't wait to see what you write next!

    ReplyDelete
  2. Well, count me as one person who has no idea how you did all this, but it looks and sounds complicated, and it's cool to get a glimpse at what you've been working on. :) One of my creative writing profs told me that creative writing is just another form of problem-solving, so maybe creativity isn't all that different from the analytical side of things. Either way, you definitely excel at both.

    ReplyDelete
  3. Thank you both for the kind words. I know that a lot of this stuff is pretty technical (boring), but I like having the outlet to show things as I'm doing them. That's why I posted the videos instead of just writing 1000 words about programming syntax and design. That's also why I'm writing a game, and not a word processor.

    Anyway, I promise they won't all be about programming. Feel free to skip anything that you don't find interesting, and I welcome any suggestions for what to write about.

    ReplyDelete