Category: Planitia

Planitia Update 5

Flee! The barbarian hordes approach!

Run for your lives!

Still no band-selection yet, but otherwise the interface should feel quite familiar to anyone who has ever played a 3D RTS.

To be honest, I kind of psyched myself out with my last post about Planitia’s design, and I did it with two words: world simulation. Planitia will require at least a basic world simulation, but I’ll be darned if I know how to do one, and unfortunately my perusal of the Game Programming Gems books and AI Game Programming Wisdom books have been disappointing When all of these books discuss AI they discuss pathfinding, line-of-sight, group movement – unit-based AI. When they do talk about RTS AI, it’s about creating an AI opponent for the player to fight against (which, granted, may come in handy).

Of course, while I consider what I’m looking for to be “AI”, other game developers may not. What am I looking for?

A world simulation consists of a system composed of interacting subsystems with emergent properties. Oblivion’s world was made of a system like this. So was Ultima VII’s. So was Powermonger’s. Thus you can see that such a system doesn’t require heavy CPU horsepower. It does require one to know where to start coding such a system.

Once again, my friend Tom Mauer comes to my rescue. In college he heard about discrete event simulation, a form of computerized system simulation that is really big in manufacturing and scientific industries but hasn’t really been used for gaming. The basic concept seems simple enough; I’m going to try it out on Planitia. If I get it working I’ll probably write up an article on it.


Planitia Design Pass Strikes Back!

Okay, the design for Planitia is firming up in my head.

Planitia is going to consist of a series of levels, each one of which is self-contained.

On each level there will be a village of people running as part of a world simulation. But they have a problem, and because of this problem, the population of the village is trending downward – they will soon cease to exist. They do not have the power to save themselves, and thus they have begun to pray for a supernatural entity to aid them. This summons you. Your job is to help them overcome their problems and begin growing instead of dying. Therefore, the way you win a Planitia level is to get your followers to the point where they no longer need you. Then the current level will end and another group of desperate people will call for your aid which will start the next level.

Your one resource is mana. How fast it generates depends on how many believers you have and how fervently they believe in you. If you have no followers your mana will slowly start to drain. If you ever get to the point where you have no mana and no followers (and thus no mana generation) then you cease to exist and have lost the level.

The problems will be different on each level. It could be as simple as “we can’t grow enough crops to feed ourselves any more” to “another group of more advanced villagers has sworn themselves to our destruction”. In any event, it will be up to you to use your tools to aid your people. Yes, there will be combat, but it won’t be on every level.

The things you can do with your mana:

Direct Intervention: Flames, lighting, rain, terrain movement, etc. These will cost a lot of mana, but they will also generate a lot of belief; nothing like seeing a bolt of lightning coming out of the sky to strike down the enemy general to make you believe in your deity.

Civilization upgrades: You can spend mana to divinely inspire one of your villagers. They will then be able to do certain things more effectively. This requires far less mana than direct intervention, but the change will take a while to propagate through the village. The change will be permanent, however.

Direct villager control: You can actually tell your little guys what to do, but it will cost you mana to do so. (Yes, I know this sounds tetchy, but bear with me – as a god, you cannot do anything in the game world without spending mana.) Basically what this means is that all units under your direct control become a mana drain rather than a mana source. Thus, you want to make sure you’ve got at least one unit back home generating mana for every unit in your army that you are directly controlling. I don’t want to make this too punishing; it’s basically going to be there to prevent people from turtling and creating humongous armies. I mean, yeah, you can create that humongous army, but you can’t tell it to go anywhere. I may also make it so that if you are fighting another god, it costs a lot more mana to send units into land that he controls than normal…but that might make the game too defensive. The whole point of this mechanic will be to cause players to strike a balance between offense and defense.

I may make it so that you gain new abilities as you clear lands…but then that has the whole “why not just give me all the toys up front” problem.

So it’s firming up. It’s not too firm yet. It’s cheesecake, not concrete.

Mmmm…cheesecake…


Planitia Update 4

Woo freakin’ hoo!

This opens up a whole bunch of options for me. Yes, Planitia is now a serious go, but I could also use the same system to re-create my combat prototype in 3D now. Or make a Final Fantasy Tactics-sytle 3D turn-based combat strategy game. Or make my 3D RPG.

I’m so happy!


Planitia Update 3

Unit Drop.

I’m using a better grass texture (although it still looks weird since that’s the only texture) and I’m now using a plasma I generated for my heightfield data. And I finally have units.

The unit is a simple billboarded quad. He moves autonomously across the terrain and his height is being constantly adjusted to match that of the terrain below him. I can’t pick him yet, but I can drop as many of them on the heightfield as I want…and now that I think about it, a horde of them would have made a much better-looking screenshot. Ah, well.

Next up, unit and terrain picking. Oooh, that’s going to be a pain. You may say, “Just grab some existing code!” and yeah, that would work, but the whole point of this is to understand all this stuff.

Once I get picking, I will probably go ahead and implement a very simple, fairly standard RTS using the classic three types (barbarian, warrior and archer) just so I can get the interface right.

Or I might just put in a god power or two. Picking a unit would make it possible to zap said unit with the lightning of Zeus! Which would be fun.


There’s a Hole in my Soul…

I guess it’s time for me to stop messing around and admit to myself what I really want.

So what is it I really want? Well, let’s see. Exactly what projects have I undertaken since I started this blog back up two years ago?

I wrote an rpg.

I wrote an rpg team-based combat prototype.

I wrote a little arcade game.

I tried to write an RPG in one page. (That’s on permanent hiatus by the way; RPGs are just too information-dense to do in one page of source. I might try to write one in two pages later, we’ll see.)

And now I’m writing a 3D engine with a fixed 3/4 perspective.

Let’s face it; I want to write a 3D RPG.

Specifically, I want to write this 3D RPG:

The Real Ultima IX.

There’s a hole in my soul, and it’s Ultima IX-shaped. This Wikipedia article goes over the basic facts that lead up to the train wreck that Ultima IX became.

The version of Ultima IX I am referring to is the second design mentioned in the Wikipedia article, the one Mike McShaffry was working on. The one before the entire team got pulled off to finish Ultima Online and before that team subsequently quit and before EA execs started saying things like “It will be our Tomb Raider 2” and before the game was redesigned five times by people who knew nothing about Ultima.

(calmblueoceanscalmblueoceanscalmblueoceans)

But back when I was still working at Origin and the game was still in development, the mantras going around were “The plot is going to be a remake of Ultima IV” and “The engine is going to be Ultima VII in 3D”. The early screenshots certainly seemed to bear that out, and my anticipation was palpable. It led me to my doom at Origin, when I decided I wanted to test Ultima IX instead of Ultima Online.

There were four aspects of the original design of Ultima IX that I felt were vital to the game’s appeal.

* The game was fully 3D.

* The game utilized a fixed isometric perspective.

* The game had a streaming world.

* The game was party-based rather than a single-character game.

I don’t think I’ve ever seen another game with all four features. The closest I’ve ever seen was Dungeon Siege, which was much closer to Diablo than Ultima.

So I guess if I want to play such a game, I’ll have to make it myself. The problem, of course, is that such a game is way to big for me to make myself. And yet, looking back over the work I’ve actually done over the last year, it’s obvious that I’ve been subconsciously making sure that everything I did somehow contributed to the overall goal of making a 3D RPG. So I may as well just come out and admit it.

Now, this does not mean that I won’t finish Planitia. Quite the opposite; I intend to make all my newbie 3D mistakes on Planitia instead of on my 3D RPG. But after that…well, there’s no sense putting it off any more. It may not be a big 3D RPG; it may not be a very full-featured 3D RPG; but for cryin’ out loud, I need to write this 3D RPG if only to get it out of my system.


Planitia Update 2

Looking better?

Planitia

I figured that I needed some real map data to work with instead of just a jiggled heightfield so I could make sure everything was rendering properly. I wanted to use some data from Dungeon Keeper or Dungeon Keeper 2, but their file formats were fairly impenetrable and I didn’t want to spend too much time getting the data since it was just for test.

Fortunately, I then searched for Syndicate Wars map data and was rewarded with:

The Unofficial Syndicate Site

This site covers all three games in the series and even goes so far as to deconstruct the data files for each game, so I was able to get some heightfield data very quickly from it. I still don’t have any real lighting, but Ryan suggested that I alter the color of vertices based on their height to show elevations and that’s working nicely for now. The camera control works at least as well as Syndicate Wars’ did, though I’ll probably add some smoothing at some point. Proper textures would be nice but that would require figuring out a rather arcane texture coordinate system and it’s not necessary right now.

So I guess it’s time to stop messing around with this and start dropping units onto the heightfield! Hopefully that won’t take long.


Planitia Update 1

Welcome to Planitia.

Planitia

I know, it doesn’t look like much. That’s a heightfield with the height slightly jiggered so it’s not perfectly flat. It’s textured with the grass texture from Ultima VI. And there’s no lighting, which is the worst part. That’s why there’s no good definition on how the terrain actually changes.

But I wanted to post this anyway, because I met an important goal – I now have a 3D RTS-style camera control system working. You can move along the terrain using the arrow keys or WASD cluster, rotate the map about the viewpoint using Q and E, and zoom in and out using R and F.

The next step is to get units into the game, make them selectable by the player (which will require raypicking), make it so you can click on the terrain to give them movement orders (which will require an even more difficult version of raypicking) and have them move across the terrain in the proper manner.

No matter what kind of game Planitia ends up being it will needs these technologies, so I can go ahead and implement them while I’m still thinking about the design.


Sacrifice, Part 2

Okay, I spent most of the weekend playing Sacrifice. I used cheats to take the edge off. I really wanted to see if I could pinpoint where this game went wrong.

I’ve talked a bit about the design of the GUI and how it hampered Sacrifice (the fact that you are playing an RTS game with a third-person shooter interface). But I feel that there are a couple other aspects of Sacrifice that went at least partially wrong in the design of the game itself.

Sacrifice uses three major game design elements:

Rock, Paper, Scissors
Tug of War
Control Points

The Rock, Paper, Scissors element comes into play early on, and deals with your unit types (of course). The three basic unit types in Sacrifice are the Flyer, the Fighter and the Archer.

Flyers fly and have short range missile attacks. They can attack land or air. They tend to be fast, but quite weak. Therefore, flyers are perfect to kill fighters, because fighters cannot hit them back.

Fighters are land-based attackers. They have no range and can only attack enemies on the ground next to them. They tend to be slow, strong and hit hard. They are perfect for killing archers, because archers cannot do enough damage to them to kill them before the fighters can engage them, and the archers tend to go down quickly to the heavy damage of fighters.

Archers are land-based attackers with very long range missile attacks. They can attack land or air. They tend to be moderately fast and strong. Thus, they are perfect for killing flyers, because the typically weak flyers die long before they can get into range to use their own missile attacks.

The Tug of War element is also introduced right away, and deals with the major resource of Sacrifice – souls. Every creature in your army must be summoned, and you must have at least one soul in order to summon a creature (larger, more powerful creatures require more souls). You start each mission with a handful of creatures and a small number of souls. The only way to get more is to kill enemy creatures – when a creature is killed, its soul is released and floats above the body. If the creature was yours or allied to you, the soul will be blue and you can just pick it up. But if the creature was an enemy, the soul will be red and must be converted first, requiring you to cast a spell on it that causes a special unit – the “sac-doctor” – to appear. The sac-doctor drags the soul back to your altar and sacrifices it. Then you get the soul. Needless to say, this process can take a while.

Thus, it’s easy to see that there are only a finite number of souls on the map – the ones in the creatures you start out with, the ones in the creatures you will fight (or are owned by the enemy wizard), and the ones in any neutral entities on the map. The real goal of playing a Sacrifice mission is to play tug of war with the enemy wizard, stealing his souls and converting them while making sure he does not do the same to yours. I think this mechanic is the cause of a lot of the frustration I had with Sacrifice. A single bad battle can erase a lot of hard work on your part and even make a mission impossible to complete.

The final element of Sacrifice’s design are the Control Points. These are mana founts, places where mana spouts out of the terrain. Your wizard needs mana to cast spells and his mana doesn’t simply regenerate – he must draw it from a mana fount. If a wizard stands near a mana fount his mana will regenerate slowly. You can make the mana regeneration more efficient by building a manalith on the mana fount. This also means that no other wizard can now recharge from that fount. The more manaliths you build, the faster your mana regenerates. Thus it’s vital that you first claim all the unclaimed mana founts and then destroy all the enemy’s manaliths, building your own in their place. This raises your mana regeneration rate and reduces his.

Manaliths are also vital because when you die, you must recharge your mana to come back to life. If all the mana founts in the level have enemy manaliths on them, you have no place to recharge except your altar itself which is very slow. And at this point your enemy is probably attacking your altar, meaning you’re probably about to lose the game.

The Tug of War element is the most controversial to me. Tug of War occurs when the resource on a map are indestructible and shared. My friend Dave Shramek has mentioned over and over that he hates base building and just wants an army to command. If I give the player such an army and he has trouble completing a mission with that army, what then? This mechanic does not allow the player to trade time for skill like “standard” RTS mechanics do.

But if the player constructs his own army from resources gathered, we’ve got the full RTS experience, which may not exactly be what I’m shooting for here. I suppose I could give the player a set number of “souls” at the beginning of the game that can be renewed but cannot be stolen…here, you have 25 souls and can summon these creatures. Accomplish this objective. If creatures die, their souls can be gathered and they can be resummoned; the souls cannot be lost. But if that’s the case, how do you lose the game?

More thought is required. To paraphrase Barbie, thinking is hard.


Sacrifice

I’ve been thinking about Planitia lately. And every time I do, the theme music to Sacrifice starts playing in my head.

Sacrifice was a game released by Shiny back in 2000. It was notable for several things.

First off, it was gorgeous. See?

Sacrifice.

When I first saw screenshots of World of Warcraft my first thought was, “Wow, that almost looks as good as Sacrifice.”

Second, it had fantastic voice acting. Shiny was a company that understood that good voice acting is cheap compared to how much better it makes your game.

And finally, it was notable for being completely unplayable, which is why it failed in the marketplace.

Okay, I’m being slightly unfair with that last one. But Sacrifice had a thoroughly odd design; it was effectively a real-time strategy game and a third-person shooter game at the same time, with an interface that wasn’t suited for either genre. Imagine playing Warcraft III while having to look over the shoulder of your hero at all times and you’ll get a feeling for what playing Sacrifice was like. The clumsy interface combined with a rather steep difficulty curve (the last level is famously difficult) and you get a game that entices players in, but can’t keep them. I came damn close to buying Sacrifice based on the demo but was saved when a friend of mine picked it up, got frustrated with it and then let me borrow it. Which prevented me from buying it.

But the ideas behind Sacrifice were fascinating, and I certainly have never forgotten the game. Those ideas include:

* A world made of islands floating in an etherial void

* A bickering, petty pantheon of gods

* Very obvious display of the power of the gods – there are no atheists in the world of Sacrifice

* A set of standard unit types – scout, brawler, archer, flyer, etc – of which each god has their own unique type

If I were going to try to “fix” Sacrifice, I’d probably pull it back into a more normal real-time strategy mode. I might still have hero characters, but I certainly would not force players to control the game through that one character. Not sure yet if I’d require buildings and resource management, or if I’d keep the game simpler and more free-form.

This will require more thought, but at least I’m back to thinking about it.


Quick Planitia Update

In the wake of my article on getting started in game programming, I have been taking my own advice and doing some learning. In particular I am getting more familiar with Direct3D. While I’ve known the basics for a while, I want to become a more advanced 3D programmer and I also need to learn vertex and pixel shaders. So I’m working my way through Frank Luna’s Introduction to 3D Game Programming with DirectX 9.0. I mentioned this book earlier but I really can’t say enough about it. As far as I’m concerned this is the book to get if you want to learn Direct3D.

Plus, with sections on terrain rendering, particle systems and picking, this book could have been subtitled “How to Program Planitia”.

So, no work will be done on Planitia for a bit while I work my way through this book. I’m currently on page 60 of 376. I am hoping to get through the book by the end of this week, though that will take some serious work.