Monday, November 23, 2009 11:41am
So finally, Saturday night I crossed "New Terrain" off my to-do list. I spent yesterday using, testing, and squashing any remaining bugs, so as far as I know it is feature-complete and bug-free.
Today I'm taking a much-needed break from the code, and creating and splicing a video together is a bit beyond my at the moment, so the video will have to wait until another time.
So why all the fuss over terrain? Wasn't there already terrain in the image posted 2 weeks ago? Yes, there was. That terrain was modeled in Toi's original terrain engine, which had one problem - it has a fixed, relatively small terrain size. Yes, I know there appeared
to be distant mountains in the background, but that was little more than a nearby hill with a bit of misty fog applied to it, so it looks far away. Truth is, even at walking speed you could walk from where the shot was taken to the top of that mountain in about 6 minutes. Not very much room. In fact, here is that same terrain from overhead:
Old Terrain from overhead
The camera was near the center (the slightly darker green area near the center is the forest), and the mountain you saw is on the top-right.
The problem with this terrain is that a significant amount of the already limited-size is spent creating a facade around the edges so the player can't easily tell that the world ends a mere 10-minute walk away. And then to make the world larger, you have to make hundreds of these and zone the player from one to the next.
So, I created a new engine - one that not only pages in/out like a lot of engines do, but it lets you see ridiculously far into the distance as well.
How far? I'm glad you asked. It just so happens I have a little map of Antilia to illustrate:
Old View Distance (red) Compared to New (yellow)
So, in this image, the red circle is how far you could see in the old system. That red circle is just big enough to contain most of the major villages, currently located over Lantros. Pretty weak compared to the yellow
circle, which is how far you can see now (with the distance set to max, slower systems can reduce that if needed). With the new system, you can see the Fayn Sires Mountains from nearly all of Antilia. And standing on the peak of one of those mountains, you can see clear out to the ocean on at least 3 sides.
So let's see it in action.
Bear in mind I've only had this system up and running for a day now, so I don't have Antilia or anything all that interesting built in the editor yet. This is for illustrative purposes only, and really has nothing to do with the style of Antilia. Also bear with me, ocean rendering was in a state of dis-repair when I took up Toi again, so I don't have water rendering yet. It's obviously on my to-do list.
New Terrain - Standing on an Island
Here is a quick little island I threw together in about an hour, and then through on a few trees for good measure. The entire island is about the size as entire terrain you see in the old screenshots, although not as detailed.
New Terrain - Pulling Away
So here we've disembarked from the island, and are sailing away (again, please ignore the lack of an ocean). Already, we are outside the boundaries of the old terrain.
New Terrain - Quite a distance away
By this image, we are far enough away that we would likely be docking on another island, unless we were crossing the oceans.
New Terrain - On the Horizon
And finally, from across an ocean, we can see a faint blip of a distant landmass on the horizon. (Look closely, it's way out there).
Now, finally, for a comparison, from the same distance, I'm going to switch back to the old terrain, and you can get a feel for just how big this terrain is compared to the old.
Old Terrain - From the Same Distance
One last thing I should mention about this terrain that is really cool, is what I call it's "endless" feature. When you create a terrain with this system, you do not provide any sort of max size. The world is not 6x6 pages, or 10x10, or even 100x100. As you edit the terrain, it creates files where terrain exists, and wherever there is no terrain, it renders a 'generic ocean'.
This sort of system is ideal for Antilia, because it means I can literally expand the game forever in any direction I want. I simply enter the editor, move the camera over where I want to create terrain, and start painting it on. If I want to make another landmass somewhere else, I simply fly the camera over there, and start working there.
So that is the news for the past two weeks. In the next few weeks, there are still more things to do - the aforementioned ocean rendering needs to be restored, the scenery system will need to be updated to page trees and buildings in and out the way terrain pages in and out, and I need to write an exporter for Animation Master so I can finally start building some new media to place in these shots.
After that, it may be time to settle in and start turning that map above into actual terrain.
Just one more image.. because I have it and it's colorful - here is a shot where I started creating a mountain in the terrain engine with contours on. This mountain is bigger than that entire terrain from the old engine - big enough that it could easily take an hour or so to climb to the top.
New Terrain in the Editor