A network of sites, tools, and technology to bring ideas into reality.

The Digital Tumbleweed

Thoughts and ramblings of an enthusiast

Engine Updates

Haven’t been able to post in a while so I figured a minor update would be good.

Maps

We all know that maps are kindof, somewhat important in games. Something about levels…I don’t know…
Anyway, So I’ve been trying to figure the best way of doing these heightmaps. Do I keep them as a single object that just contains the info read out of image files, or do I create a model out of them and render them that way? I have been leaning towards the model version, but I’m still not convinced it’s the best method.

Because I already had the first version working, I went with that for now at least. Therefore, I’ve got multitextured heightmaps working with detailing based on distances. This has some obvious importance to gamers, but for those that aren’t. The level of detail based on “closeness” is important because it puts less strain on the GPU, but also because the textures show variations with this. We don’t want the same texture to continually show on the map, but we want continuity between the differences.

MultiTextured Heightmap MultiTextured Heightmap MultiTextured Heightmap - Detail Blending

So. What this means is that we’ve got a pretty handy terrain system right now. From this, I was curious about how it would scale with something that was real. So I checked out some GIS tools and found one from the USGS which provided a very large image which I then grey-scaled and imported. The results were pretty nice. Gave me a good idea of how robust the terrain system really is. And, you’ll have to take my word for it that there are hills in here too. :)
MultiTextured Heightmap - Livemap

If you are interested in getting real maps from a GIS tool check out Google Earth. A good tutorial is available at ET: QW-Maps. I recommend taking a look.

Cameras 

So, in addition to the terrain, the camera is extremely important. This provides your view into the world. Now, since you can see screenshots, I’ve obviously had a camera in there and working for some time. So why the post? Well, in the spirit of being robust I’ve been working to try and accommodate both and FPS style camera (matrix based) and a 3rd person camera (Quaternion based) system. This is more difficult than I originally anticipated it being, but it’s coming along.
Models and Animation 

The desire to have models on the screen was great. Then that passed as I got them on. They are really pretty useless and annoying now that they only sit in the middle of the screen, and that when they move they don’t “move”. So, this is one of the next pieces to go into the engine. We will have model animation. However, the real question is, do we let the game developer handle model animations? This is something I’ve been struggling with as a decision.

The reasons are this, not all models are the same. I’m supposed to provide a system for putting models on the screen. But, models are animated in different ways, and at different times. Should the model class be responsible for animating the parts of the model? I don’t believe so. Therefore I think I’m going to have to put those animations into my demo rather than having them in the engine.

Distractions

I know it’s been a while since I posted, but the reasons are this. I’ve been watching more movies, learning to play my new guitar, and reading up on AI techniques. I’ve always loved movies, wanted to learn to play the guitar, and have been interested in AI. At least 1 may lead to something nice for the engine… :)

Pfft…do we really need terrain?

For some reason, I’ve been completely motivated to hack on this 3D Engine. It’s been a great change of pace from the norm: come home, eat, sit at pc, play wow, goto sleep, wake up, repeat (with the occasional tv/movie in between). Last night and today I was able to add a couple of pieces to the engine. As I mentioned before, I got Octree’s working. Well I took some screenies for you all to get a glimpse at the first engine demos.

The red lines represent the Octree boundaries. The awesome thing here is that I was also having an issue with the skymap before I took these screenshots and realized it had to do with the VertexBuffers. Fixed it up and was able to capture these screenshots. I’m working on getting a SS util inside the engine too since that is a generally useful tool to have.
The blob you see in the above SS is made with an open source 3D modeler called Wings3D. It seems to be generally useful so far. Unfortunely, my artistic ability is about that of a 2 year old so you’re stuck with random nothings that I deem blobs.
So, moving on. I couldn’t decide today whether to terrain system or a particle system. I also wanted to get model animation working. In an attempt to get stuff done I broke it down and focused solely on terrains. Here’s what I’ve got so far. Nothing too spectacular, but I’m happy. :)

Enjoy.

12 hours is costly…but sleep, so refreshing.

So, just before I went to sleep Sunday night I had managed to get a number of things working. This was great news. I had content loading to the screen: textures, models, and custom shaders. I had managed to set up a few functional pieces as well: skymap, lighting (through shaders), and a camera system. All of this was done with the XNA 2.0 framework.

However, _just_ before I went to sleep I managed to break something such that the engine would crash at runtime…debugging this seemed to be of no help, and since this was after about 12 hours of coding, I decided the best thing would be sleep.

Last night I returned to battle this phantom crash. Turns out, which I found in a matter of minutes, when you have a class, static, named “Content” that you are using to set the root of the content repository, you shouldn’t name a variable - “Content”. Yes, yes…now is the time to /slap and /punch me. It was at the end of 12 hour coding stint…thats all I got.

Well, to bounce back from my folly and I was able to implement a pretty basic Octree system with correct culling and so forth. I may try to grab some screenshots tonight for you as this is a bit more impressive than “WOOT! I HAVE A SQUARE!”. However, I may just continue to press forward with the engine development and see if implementing an RTree is worthwhile. Thoughts?
That is all you get for now. :)

Back to Dev.

So, I’ve started getting back into development, outside of work. It’s great. I was having issues with my desk that caused me to not want to code with it…then it broke and made things all better! :)
The biggest thing I’ve been doing lately is actually working on my 3D engine. However, rather than rewriting the JoGL code that I once had, I thought I’d give the XNA2.0 framework a try. One word, “wow”. It’s pretty sweet. I’ve been able to push beyond what my older engine could do and now I’m able to load models and even use shaders.

I’m extremely impressed with how they’ve got it setup. I’ll be posting demo screen shots later this week that will include lighting details and other specs.