Jan 18 2010

Latest stuff

Tag: VectorStormtrevor @ 10:50 pm

Lots of behind-the-scenes work.  I’ve got terrain properly generating and regenerating as you move around the world, now.  I’ve also switched back from the “painting the terrain” system seen in videos before, to a system based upon placements.. with the placements then automatically performing the same terrain painting from those videos.  This approach fits in better with the game economy, makes save game file sizes manageable again, and helps push the game’s emphasis away from crafting terrain, and back toward the areas where I really want the player to be focusing his time.

In the screenshot here, I have a “terrain spire” selected (though it’s still rendering just a block).  The rough circles surrounding it are showing its area of influence;  this terrain object is making mountains;  you get full-strength mountains within the inner circle, and the effect fades off toward the outer circle.  (If you were to look from above, both circles would be perfectly circular;  following the terrain surface makes the inner circle quite wobbly!)

Continue reading “Latest stuff”


Jan 13 2010

The most boring screenshot ever

Tag: Full Games,MMORPG Tycoontrevor @ 11:20 pm

I’m amazingly thrilled to have gotten this working, but unfortunately it’s a very boring screenshot.  If you consult the past few screenshots and videos, you may notice some very visible seams between squares of terrain (though I mostly tried to avoid showing them, when I could).  These were caused by mismatched vertex normals between the patches of terrain.

In computer graphics, a vertex normal basically tells the renderer which direction a point on a surface faces;  it’s used in lighting calculations to figure out how much light falls onto that position.  Worse, since I’m also generating the terrain colour in part based upon the slope of the ground, the normal can also change the brightness, hue, or saturation of the terrain, making the seams even more visible.

Continue reading “The most boring screenshot ever”


Jan 12 2010

VVVVVV

Tag: Game Design,Shameless Indie Plugstrevor @ 9:47 pm

I’m a day late in posting this, as the weather here was shocking enough yesterday that I didn’t even turn my computer on.  But it’s really worth mentioning that Terry Cavanagh has just released his epic platformer VVVVVV.  There are already a good number of lavish reviews on the net, so I’ll just give the very basics here, before diving into a discussion of interesting points in the game’s design and implementation.

Continue reading “VVVVVV”


Jan 09 2010

Re-generating terrain

Tag: Full Games,MMORPG Tycoontrevor @ 3:37 pm

Because I know you’re all curious, here’s what happens if you build a couple hills, place buildings on them, connect them with roads, and then fly far enough away that the terrain gets regenerated upon your return.

Floating buildings and roads!

Am currently working to fix this, and get the modified terrain back when it’s re-generated.  :)


Jan 06 2010

Today

Tag: Full Games,MMORPG Tycoontrevor @ 11:02 pm

Small bugfixes today, mostly.  Biggest one was finally fixing a bug which was resulting in monsters, devs, and characters seemingly randomly not being drawn, depending on which direction the camera was facing.

Turns out that I’d inserted them into the octree incorrectly, and it was treating all of them as though they were sitting at the center of the world.  If you happened to be looking roughly in that direction, then the game would draw them, regardless of where in the world they actually were.  If you were looking away from the middle of the world, it wouldn’t draw them no matter where they actually were.  This was often leading to situations where these objects would seemingly randomly pop in and out of existence, as you slowly turned the camera.

(quick tech explanation:  An “octree” is a method of dividing up space, commonly used in some types of 3D video games.  The basic idea is to think of your 3D world as a big cube, with stuff inside it.  Now, mentally divide up your cube into eight smaller cubes; one in each corner of that larger cube, and all touching at the very middle.  Now mentally divide up each of those cubes into eight more cubes.  Repeat until you’re dizzy.

When you move an object around in the world, you check those cubes to find the smallest one which completely surrounds the object, and store the object inside that cube.  The benefit of doing this is that if you have (for example) 10,000 objects moving around in your world, each stored inside the smallest cube which surrounds it, you don’t actually need to draw all 10,000 objects (very expensive for the graphics card!), and you don’t have to check whether  each of the 10,000 objects can be seen by the camera and thus needs to be drawn (very expensive for the CPU!);  instead, you can just check whether the camera could see the individual cubes.  If a cube is within the camera’s field of view, then you draw all of the objects inside it.  If a cube is outside the camera’s field of view, then you know that all the objects (and other cubes!) inside that cube are also outside the camera’s field of view, and so don’t need to be drawn.

2D games will sometimes use a “quadtree” approach, which is very much like this, except using squares which are each made up of four smaller squares, instead of cubes which are each made up of eight smaller cubes.)


« Previous PageNext Page »