Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Travel Routes and Danger Zones Sim/RTS Games


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 AltarofScience   Members   -  Reputation: 934

Like
0Likes
Like

Posted 22 July 2012 - 01:08 PM

As I have been working on my game I have had to deal with technical aspects taking precedence over my preferred area of game logic. I have always been more of a fan of design that implementation. Sadly like anyone who really just wants to express themselves I am forced to deal with these technical issues like path finding no matter how much I despise them.

However in some cases working on these areas gets my mind in a different zone where it will throw out an idea I hadn't considered that would, in my humble opinion, improve and differentiate the game play. This its not all a big waste of time and pit of frustration.

In this case I was talking to some devs of GAE and 0 A.D. about path finding and I had been reading some 0 A.D. design threads about resource management which involved a system similar to mine. These ideas coalesced into a new idea about how to manage to anti-micro goal of my combat system and to introduce some fun Sim elements. My mind actually grabbed onto the flag system in Majesty, especially the fear flags in Majesty 2 as I was most of the way through formulating the mechanic and that helped me sort out my thoughts a bit.

Anyways onto the topic instead of my excessive ramblings:

Basically the idea involves a sort of weight to the micro AI support for the player. Units as individuals have access to some basic commands a player can give. These commands can be simple such as move or attack or stop, or they can be complex and contain several sort of sub directives. Most of the complex commands can only be initiated by a leader unit. Regular units can be assigned to a leader unit and then follow the directives of that unit when the player commands it.

Individual commands are things like:
Attack, Move, Stop, Load, Unload, Transport

Advanced Leader commands are things like:

Garrison - This is basically an order to use a specific building as a central point. Units will stay in the garrison most of the time while also performing automatic functions like going to the nearest granary if they are out of food, or going to various buildings that produce items, like newer better weapons. Basically the same as what units in Majesty do, but no exploring or going beyond a given radius of the garrison.

Caravan - This command is an advanced version of transport. In normal transport you specify a storage facility and a production facility and the units transits between them loading and unloading resources. Transport is generally better suited to actions within base areas, although if you lack the caravan ability you may be forced to use it for intra city transport as well.

Caravan is more complex. Caravan will do a few things related to pathfinding and pathfinding-ish data. Caravan will attempt to use player built roads if at all possible. Caravan will respond to threat flags. Threat flags give information that regular pathfinding cannot store effectively, primarily because not all move commands should respond to flags. You can place a fear/warning flag and a caravan will alter its route to avoid that area. This is important because it allows you to have some control over where a unit goes, without having to mirco its movements every time. You might place a threat flag in case a certain route had been getting your caravans raided by enemy units, or if they had a settlement nearby.

You can also use a sort of way point system. In this case you can specify a route for a caravan to follow between two areas. This will allow you to construct defenses along a route, of various kinds, and have the caravan follow that route for improved survival. Roads function as a sort of default way point. Roads have to actually be constructed, which takes time and makes them hard to alter, but they provide a pretty serious speed bonus, especially in terrain that would normally have negative bonuses.

When you create a transport or caravan unit, you need to specify the stops on its route. Transport commands only have 2 routes. Caravans can have multiple stops. They can also have roads selected intentionally. Roads take multiple clicks. You will select the buildings you want as stops and then use the road command. The unit will go to the first building and load whatever resources are needed by the production buildings you listed, if it can. It will then head straight to the road you clicked on and follow it towards the next destination, get off at the end point located nearest, do its business and then do the same to the next destination, then head back to the start of the loop.

Roads had a pathfinding value, so units not on a caravan order or on one but with no road command will use them any time it makes quicker travel automatically.

I am not sure how to apply the road rules to flags. I might set it up so that if you put a threat flag, the unit will treat the flag's radius as impassible and skirt along the edge to meet back up with the road.

I am also not sure how to deal with multiple roads. Suppose two roads are unconnected but taking the second road would speed up the mission.

I suppose I could implement non building way points. For instance, instead of clicking the road just once, you would specify it like a structure. Go to storage. Go to road square. Follow road from square to next waypoint road square or to next building. Repeat until you get back to first building. Then start road again. Don't stop unless given stop command.

I was also thinking of separating route path from unit. This would allow you to make one route and then just add new units to it. So you would set a series of way points including structures. You would then get a little transparent rod in the ground for each way point and a green or blue path between them. You could click on any rod using the set route command and the selected unit would then follow that path.

I dunno, its a lot to think about.

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS