Posts Tagged ‘Time-keeping systems in games’

Last summer I screwed around a bit with game maker, and made a pretty crappy game, but I did learn a bit about how to use game maker so it wasn’t a complete waste. This summer I shall try to top my previous efforts. I am attempting, so far with a bit of success to make a jrpg. However it has a bit of a twist to it. I got the idea from reading this blog post about crafting a forum RPG ruleset.

The basic twist on this that I got from his post was to have the battle take place along a one-dimensional line, so in addition to normal commands like attack, magic and item, this game will also give you the ability to move left or right. Now how will this affect combat? Well depending on what weapon you have equipped this will determine how many spaces left and right you can attack, magic spells will also have a range.

So far this doesn’t seem too complicated, just put ranged people behind melee people and gradually fight your way across the battlefield. This is where various movement abilities come in. Teleportation spells will allow you to teleport behind the enemy and sneak up on their weaklings in the back, and they can do the same to you; certain abilities will allow you to knock back enemies or pull them closer; flanking will require you to fight enemies from both directions at once; some people will have abilities that are effective at different ranges forcing a choice on whether to put them in front or back. Even if movement is only along one dimension, there are many possibilities for interesting movement abilities which in addition to the normal complexities of a jrpg, will lead to a very interesting experience.

So how far am I? Not very. The first thing I did was to make a turn scheduler, because this is a turn based game after all. Basically everyone has a variable called readiness, which starts at zero. Every time the game steps through its main loop, it goes up by another variable called agility. When readiness reaches 100 they get a turn. Once their turn is over their readiness goes down, and the loop starts again until the next person getsĀ  turn. Characters with higher agility get turns more ofter. Simple enough.

Next I made some rows, and gave the player and enemies the ability to move left and right along these. The rules are pretty simple, players and enemies can’t occupy the same row. And only a maximum of 3 characters can occupy the same row at the same time. After making the move command I quickly decided to make a wait command, so that if the enemies got boxed in and had no where to move it wouldn’t crash the game!!! The turn will only end if they do something, so wait is the fallback if no other actin can be taken, then it will do nothing and still end the turn.

After that I gave everybody an HP variable and gave everyone the ability to attack which will take down the HP, and when it reaches 0, the player or enemy will die. I even gave all the characters a range variable which will determine how far they can attack. And that’s basically it, attack, move and wait are the only 3 commands implemented so far. I am working on magic, but its not done yet.

So after I get a variety of magic, as well as implement an item command, that’s pretty much the core of the combat mechanics. I mean I might need tweaks here or there, as well as expanding the list of magic and items, but that’s the pretty much the main aspects of the combat right there. After I get that done I guess I can work on making a few more types of enemies and build the first dungeon of the game, then decide what to do next after all that is done.

I guess in the long term I will need some sort of leveling system for characters to grow more powerful, and shops to buy items and equipment, also I guess I’ll need to implement equipment. I’ll worry about those things a little later.

Edit: Now that I think about it that paragraph on attack doesn’t really do it justice. Suffice it say there are variables such as strength and defense which will determine how much damage an attack will do. You don’t really need the specific details.

Advertisements

You can find plenty of FPS, RTS, action-RPG, racing, and platforming games, but trying to find a good turn based strategy, or turn based RPG is like finding a needle in a hay stack. Most developers will not touch turn based combat with a ten foot pole. Many people have suggested that turn based combat is obsolete, and only ever existed because of hardware limitations. I don’t buy that excuse, but if its true, I should be very grateful to hardware limitations, for making some of my favorite games possible.

Turn based games and real time games both have a number of pros and cons, but there’s no reason to dismiss turn based games as obsolete when they offer something that real time games do very poorly, planning ahead. Putting aside RTS for a moment, its pretty clear to see that games like FPSs and fighting games for instance, may have some tactical considerations, but there’s no room for any long term strategy. If you tried to plan out a long term strategy in those games, you’d probably get killed, for not acting quick enough.

No RTSs have a bit more strategy to them, as the name would suggest, but where exactly does this come from. There’s a related genre of games called real time tactics, and what separates real time strategy from real time tactics. From wikipedia “Typical real-time strategy titles encourage the player to focus on logistics and production as much as or more than combat, whereas real-time tactics games commonly do not feature resource-gathering, production, base-building or economic management”

That’s it! What separates RTS from RTT? Gathering resources, constructing a base, building units. Gathering resources takes time, building a base takes time, building units takes time. Any thing that slows down the game, and delays a confrontation makes the game more strategic, gives you more time to plan. Its what separates RTS from RTT. Without those delaying mechanics, people playing RTT games don’t have the luxury of taking their time to plan out a long term strategy, and will mostly think in the short term.

Turn based games, are by their very nature the slowest games possible, and give you all the time you need to plan your next move, adding depth to the planning and strategy. RTS games, through various delaying mechanics give you a bit of strategy, but fall short of turn based games. There is another group of games that comes to mind, that uses delaying mechanics, to try and add a bit of strategy, and still have the urgency of real time games.

If you know me you can expect me to bring up Final Fantasy. Several games in the series used an Active Time Battle system, where you must wait for a gauge to fill up before you can attack, and the enemies also have these, and if you wait too long to attack, your enemies will keep attacking you. I can see the appeal of trying to capture the urgency of real time games, but putting in delaying mechanics to give you a chance to come up with a strategy, sounds good in theory, but in practice it failed. It was just too urgent to really think about your moves, and might of well have been real time.

So whats the point I’m trying to make. Games that mix strategy and urgency can be really fun, but no matter how many delaying mechanics you put in a game, it will never have the same long term strategy and planning as a real time game. That’s why turn based games will never be obsolete.