Today's screenshot, while rather uneventful looking, actually represents a significant step forward for the engine.
It represents weeks of work...and the final promotion of the water mesh concept into the map tool (and subsequently rendered by the engine). In other words, I can now add water meshes/features to my tile maps, similar to how terrain features (mountains, hills, etc.) can be added to a tile map. Then, when the map is imported into the engine, it will be rendered as a water feature, just like other terrain features.
Additionally, I have also been testing the engine on a Vista machine, as well as a Windows 2000 machine. There are a few minor bugs on each system to work out, but they are not showstoppers. At this point, the engine is officially "feature complete" and I'll be enlisting some other users soon to get rid of as many bugs as possible before moving ahead with games building.
Next up: the game design phase. :-)
Monday, April 4, 2011
Tuesday, March 22, 2011
Testing News
No screenshots today...although I have some testing news. I began to test the engine on other systems, most notably a laptop with Windows Vista installed on it. The tests ran reasonably well, although there was a 10-15 fps performance drop on terrain rendering and UI rendering, but that was to be expected considering it is a Celeron/Windows Vista Basic laptop. I'm just happy at this point that it is working without a hitch for the most part. Hopefully at some point soon I'll be able to test it on a Windows 7 system, too.
Over the next couple of weeks I also plan on making some tool updates and will promote the water/mesh functionality I developed over the past month so that it is on par with the terrain map feature I have in the map tool today. I'm also continuing to improve the UI functionality I mentioned previously.
Over the next couple of weeks I also plan on making some tool updates and will promote the water/mesh functionality I developed over the past month so that it is on par with the terrain map feature I have in the map tool today. I'm also continuing to improve the UI functionality I mentioned previously.
Tuesday, March 15, 2011
More Waves and Dialog Boxes
After several weeks of testing several different algorithms, I think I've finally settled on one for rendering basic waves (without the help of shaders). It's been a long road, and oddly enough, I've pretty much come back to where I started, with some minor modifications to an original idea...combined with a minor discovery. First some wave screenshots:
The new algorithm essentially checks the nearby eight vertices (as opposed to the four I was originally working with) and averages them. Also, when a waveheight initially passes over a point, it essentially starts the point "spinning" around. That angle is translated via a sine function into a value which is added to the point's height. The key discovery I made was that through this combination, I could make each vertex of the mesh simluate a dying sine wave by continually decreasing the radius value in the following equation:
Basic trigonometry, yes, but in all my previous testing I ignored the r component for some unknown reason.
I've also been busy working on some 3-D dialog box improvements, seen here:
In this screenshot, I'm demostrating some basic checkboxes, a slider control, a textbox control, a button, and an image control. All on a fully rotatable, 3-D dialog box/window. The main use for this will be heads-up-displays, pop-up dialog boxes, etc. It is also fully alpha-blending enabled.
With these items nearing completion, I'm now turning the corner towards actual game design. There is one last stubborn textbox bug to squash, and after that I'll run some tests over on my Vista box. Then...it's design time!
The new algorithm essentially checks the nearby eight vertices (as opposed to the four I was originally working with) and averages them. Also, when a waveheight initially passes over a point, it essentially starts the point "spinning" around. That angle is translated via a sine function into a value which is added to the point's height. The key discovery I made was that through this combination, I could make each vertex of the mesh simluate a dying sine wave by continually decreasing the radius value in the following equation:
y = r * sin (angle)
Basic trigonometry, yes, but in all my previous testing I ignored the r component for some unknown reason.
I've also been busy working on some 3-D dialog box improvements, seen here:
In this screenshot, I'm demostrating some basic checkboxes, a slider control, a textbox control, a button, and an image control. All on a fully rotatable, 3-D dialog box/window. The main use for this will be heads-up-displays, pop-up dialog boxes, etc. It is also fully alpha-blending enabled.
With these items nearing completion, I'm now turning the corner towards actual game design. There is one last stubborn textbox bug to squash, and after that I'll run some tests over on my Vista box. Then...it's design time!
Thursday, February 24, 2011
Rendering Waves, Part I
For the past couple of weeks I've been testing several different algorithms for water rendering. I've limited myself in terms of technology a bit because of the age of my video card (7+ years old) and to keep the user base somewhat broad...therefore...no pixel shaders or any effects like that. Yes, I can go out and buy a shiny new high-end graphics card, but again, it would ultimately limit the user base down the road because of my tendency to want to push my graphics hardware as far as I can. :-)
I started out by building a basic mesh class (jMesh), and then running various functions across the mesh data. One of the most peculiar algorithms I came across "averages" the four surrounding points to calculate the current point's height on every pass:
y0 = (y1 + y2 + y3 + y4) / 4
I'm not sure who to credit for coming up with that, but I thought I'd give it a run and see what happened.
I was surprised to see that when I randomly dropped raindrops onto the mesh, little wavelets spread out from each drop and then faded out. Soon, though, I ran into some limitations of this concept because I wanted my waves to propagate out further and (hopefully) reflect off some walls I'd set up at the edge of the mesh.
Today, however, I spent some time paging through a 1960's physics book and came across a diagram of something called a "wave machine". That, along with the explanatory text beneath the photo, gave me some new ideas. The text described the wave machine and how it worked. As a result, I changed course on my own algorithm tests and added an "angle" value each point on the mesh. Also, I let the x coordinate and y coordinate of each mesh point be controlled by output of a sine and a cosine function.
The result?
What is difficult to see in this screenshot is that the entire mesh is in motion, and it looks pretty close to what a storm-tossed sea would look like. With a little bit of coloring, and some mountains thrown in, it looks like this:
Maybe I should post a movie at some point. Anyway, this new algorithm is a cross between the sine/cosine functions my own "averaging" type function that has damping and a whole bunch of other variables to play around with.
One key design point I want to make here is that because I've generalized all this into a generic "mesh" class, it opens up a lot of new possibilities such as basic cloth simulation, erosion-generated terrains, etc. I suppose you could also use some of it for creating landscapes altered by earthquakes. One other thing I plan on testing down the road is whether this could be morphed into a semi-realistic cloud mesh for cloud banks.
I started out by building a basic mesh class (jMesh), and then running various functions across the mesh data. One of the most peculiar algorithms I came across "averages" the four surrounding points to calculate the current point's height on every pass:
y0 = (y1 + y2 + y3 + y4) / 4
I'm not sure who to credit for coming up with that, but I thought I'd give it a run and see what happened.
I was surprised to see that when I randomly dropped raindrops onto the mesh, little wavelets spread out from each drop and then faded out. Soon, though, I ran into some limitations of this concept because I wanted my waves to propagate out further and (hopefully) reflect off some walls I'd set up at the edge of the mesh.
Today, however, I spent some time paging through a 1960's physics book and came across a diagram of something called a "wave machine". That, along with the explanatory text beneath the photo, gave me some new ideas. The text described the wave machine and how it worked. As a result, I changed course on my own algorithm tests and added an "angle" value each point on the mesh. Also, I let the x coordinate and y coordinate of each mesh point be controlled by output of a sine and a cosine function.
The result?
What is difficult to see in this screenshot is that the entire mesh is in motion, and it looks pretty close to what a storm-tossed sea would look like. With a little bit of coloring, and some mountains thrown in, it looks like this:
Maybe I should post a movie at some point. Anyway, this new algorithm is a cross between the sine/cosine functions my own "averaging" type function that has damping and a whole bunch of other variables to play around with.
One key design point I want to make here is that because I've generalized all this into a generic "mesh" class, it opens up a lot of new possibilities such as basic cloth simulation, erosion-generated terrains, etc. I suppose you could also use some of it for creating landscapes altered by earthquakes. One other thing I plan on testing down the road is whether this could be morphed into a semi-realistic cloud mesh for cloud banks.
Tuesday, February 15, 2011
3-D Dialog Boxes, Part II
Things are moving along pretty well with the game engine...and there have been some recent updates to the 3-D dialog/GUI functionality. So far, the dialog box library can render buttons, picture boxes, text, etc. I'll be adding textboxes soon, too. Again, every GUI that is created with this library is fully 3-D (capable of being rotated, scaled, etc.) and has alpha-blending capabilities.
As usual...here are some screenshots...
As usual...here are some screenshots...
Friday, February 4, 2011
Electric Maze
I threw this together in an about an hour or so. Just another test to see how fast I could create a playing field...in this case, a Tron-like 3-D maze.
Thursday, February 3, 2011
Mountains
Here are a couple of screenshots demonstrating a basic mountain range made with the contour map tool. This was a basic test not only for the map tool but for the engine itself.
Several engine features are at work here, including terrain rendering, tile map rendering (brown ground tiles) and the skydome (along with a sunset). It probably took me less than an hour to create the tile map, the mountain range (using contours), and the mountain/ground textures. This scene can be viewed from any angle or elevation, by the way.
Several engine features are at work here, including terrain rendering, tile map rendering (brown ground tiles) and the skydome (along with a sunset). It probably took me less than an hour to create the tile map, the mountain range (using contours), and the mountain/ground textures. This scene can be viewed from any angle or elevation, by the way.
I have yet to perfect the sunset/sky coloring yet (or clouds for that matter), although the algorithm I created for it is up and working properly. Now it is just a matter of adjusting some color tables I've created for the skydome to make it look a bit more realistic.
Subscribe to:
Posts (Atom)









