Okay, I've been back for a while now, and no interesting posts to speak of. So, I figure I have to start somewhere, and this might as well be the time.
So, let's talk about stuff that's been going on, sticking to the more interesting topics, okay?
First of all, I want to talk about a game I discovered that I absolutely love. And yes, I'm a gamer. Most game programmers are. It kind of completes the geek stereotype, you know? It's almost a requirement.
The game is called Crysis. It was released in November of 2007, so it's relatively recent. It's also a computer-killer - eats up memory and processor power alike. But for good reason.
Welcome to Crytek's Sandbox 2 Editor. Take a look at those graphics. Awesome, right? That's max graphics, by the way. All the way up. Frame rate? About three frames per second. I usually keep it at medium - great effects for higher frame rate. Up to 15 fps (not First Person Shooter, Frames Per Second) at times.
Sorry I blanked out the map name - it's private, you understand. But it doesn't matter anyway. For the moment, let's refer to it as "Map X".
Map X was begun primarily as an experiment into what the editor was capable of. I'm a programmer; of course the editor for a game is going to be more fun than the game itself! But it is - I've spent hours and hours on it over the past couple months. Map X has taken maybe... a hundred hours or so of my time? But wow, is it worth it.
Map X began with humble beginnings as nothing but grassy terrain. The editor, while not as user-friendly as it could be, is fairly straightforward. Once you know basically how it works, you find everything with ease. And it gives you access to everything the actual game has. Nothing left out. And best of all - it's free! Comes with the game. But I digress.
Okay, "Map X" is a little weird, don't you think? Let's give it a real name. Maybe... "Islandia". It's an island. Of course it's going to have an island-like name. Yes, that was a sorry attempt at a joke. Okay... Moving on.
I'm no good with names...
Okay. After you create the terrain (hills, valleys, plains, mountains, lakes, etc. (which takes all of five minutes - kudos to the programmers who wrote this)), you get to put the textures on it. For example: cliffs, grass, sand, rock, etc. And that takes a bit longer. But after you have it set up, it's fast. The editor allows you to paint terrain on areas of your choice, using slopes and altitude.
For example. Say you want to put down some beaches. The water height is at ten. Well, let's make some adjustments. Set the min altitude for about 10, the max height for, I don't know, let's say 20. And the min slope and max slope values we'll set at 0 and 15 degrees, respectively. Now we click "paint terrain" and maximize the brush size. A quick sweep over your map, and you'll have painted all areas that are both close to the water and not steep with sand. Instant beaches. Cliffs and everything else works the same way. However, I have found that it looks best if you go back over it later and customize.
Step number 3: Vegetation. No, this does not mean you're going to be putting down those nasty edibles you wouldn't eat as a child. It means all plants in general. This one is a little time-consuming. Okay, really time-consuming. Crytek ought to work on this a bit, in my opinion.
First, you pick which plants you want, choosing your trees, grasses, bushes, undergrowth, ferns, etc. Then an interesting part. You set the density, and a number of other values. And then you have a choice. You can:
A) Choose what terrain types each plant is placed on, and let the editor place them for you
B) Set the density, and min/max slope/altitude for the selected plants, and paint them on like you did the terrain
C) Manually place each plant
Each has it's ups and downs. The first option is by far the fastest, and you'll have your plants down within an hour. This also appears to take up less memory. Unfortunately, if you get too far away from these plants, they disappear. Completely. The game stops rendering them. Also, the AI can't appear to detect these plants. This is a good idea to use with grasses and small bushes and ferns.
The second option is my favorite for trees. It's fast, and allows you to customize each plant.
The third is for perfectionists, and for those that have a lot of time on their hands.
Now, if you choose the second option, you're going to have to go back through and thin out the plants so that they aren't too closely clumped. Trees can overlap, and this totally screws up the AI. And on a regular sized map, which is over a mile (yes, literally a mile) wide, you're going to be thinning out thousands of trees. Which I was. I clumped them too close together in a lot of places. Islandia was looking more like an overgrown rainforest than an island paradise.
Now, I'm lazy sometimes. Plus - I was having fun. I didn't want to go through every forest I'd placed and thin them out that way. Actually, I was more interested in the AI than the vegetation, anyway. Yes, that's typical of me. I love working with AI.
I placed twenty or so cars on the map, and then some soldiers. I programmed the soldiers to get in the cars, and drive the cars to different points on the island, in a sort of race.
Now, when you do it right, the car AI is INCREDIBLE. Your car will not drive off cliffs, nor into water. It will choose the fastest route to its destination. It will dodge trees, make three point turns, and keep from flipping over. "It sounds so perfect," you say. "Surely there's a catch." Well, yes, as with all things, there is a catch.
You have to manually surround every steep slope with "forbidden areas" - shapes on the ground that AI sees and thinks "this area is off-limits". They're easily placed, but you have to do it manually. And that takes time and patience. After you're done, you'll find your cars aren't smart enough to keep from flooding their engines in deep water. You're going to have to put an "AI boundary" (like a forbidden area, but inside-out) around the edges of the island, next to the water. This one really takes patience, because it's so large. But, once you're done, the AI is smart. Incredibly so.
Now, once I'd done that, and fiddled around with the AI a bit more (I love fiddling with AI), I decided, "Hey - it looks like Islandia could use some trees now." So, I placed the plants, and regenerated the AI triangulation.
All the cars started crashing into trees.
It would seem that if you put trees too close together, the car doesn't see them as one solid object, but rather as two separate ones, or perhaps overlooks one of them. Anyway, what happens is it screws up the AI. You have to go over the map and look for all the places where trees are too close together.
It took absolutely forever, but eventually, I did have it so that the cars could drive through the forests unscathed. And then I decided I wanted a tunnel. Not for cars, but for water - an underground river. And yes, rivers are rivers. They have currents, and can actually pull you along.
Now, Crysis employs the use of "voxels". They're cubes where the terrain can be carefully shaped in three dimensions, instead of one solid surface like in most games. It allows for intricate cave systems, overhangs, rock bridges, etc. And they match perfectly with the terrain, too.
Once that was done, I decided the island was too much paradise. Yes, I know I'm picky. But what fun is an island paradise if you can't blow somebody up on it?
The Koreans (sorry, they're the only human enemies Crysis has) began to set up a base on one of the mountains. First, the buildings. One by one. Watchtowers, houses, barracks, etc. They were taking over an island village. What they did with the islanders, I have no idea.
I'm pretty good at playing Crysis. I can hold my own, and look good doing it, too. So... The Korean camp has around 100 soldiers in it. What can I say? I love challenges. What's the frame rate? 8 per second, even with that many enemies. Talk about streamlined.
It takes hours, but you can make the AI smart enough (by placing navigation modifiers, hide points, and forbidden areas) to hide behind buildings when they reload, jump over low walls, walk around inside buildings, avoid explosive barrels (those I love), and a lot of other cool things. They can get to be almost as difficult as if you were fighting another player.
But... AI reigns supreme. I made a few allies, this time with nanosuits (one of the coolest things about Crysis), and set them to work on the AI. And that's pretty much where I am now.
With one exception.
Welcome to... Islandia. A peaceful (sort of) island paradise. Sunny beaches, cliffs, rivers, and awesome sunsets. And a cool bridge, too. For scale, look at the helicopter on the base over on the left side of the screen. Yes, the map really is that large. Awesome, isn't it? I find it amazing.
But then...
I kind of... Froze it. Heh heh. Yes, I know - I'm pure evil. But I was wanting to see what it would look like frozen. And it was quick, too - took me less than two hours. All I had to do was change the lighting, add fog, change the trees (did you know frozen leaves are brittle and splinter when you touch them?), remove the water (to replace it with ice), and change the terrain. Nice, huh?
Anyway, here's a close-up of the village.
And now, what it looks like in a battle.
The time, by the way, is 8 in the morning. And yes, that's a fallen palm tree atop that smashed house over there. Nice, huh? I love it. Total destruction - sweet.
Well, that's all for now. Maybe somebody out there will find this interesting. But hey - mission accomplished - I got out a post!





Hmm... I think I was supposed to talk about more than one thing... Oops. :P
ReplyDelete