Hot answers tagged turn-based-strategy
18
It's worth pointing out that there are really two kinds of "turn-based" systems. There's the true turn-based system, and there's the immediate-mode hybrid.
In a true turn-based system, you come up with a set of orders, but nothing actually happens until you push the "end turn" button. There's no combat, there's no production, there's just you laying out ...
8
There is no "one-way-to-rule-them-all" to handle combat resolution and damage. The most important thing is that the resolution is understandable by the player.
In general you want to separate three elements.
Chance to Hit
Damage Applied
Attack Rate
This gives you the ability to make a wide range of weapons.
Chance to Hit - tends to be calculated ...
7
Breadth-first or depth-first search would do this job more efficiently than your answer suggesting that you will use A*. You can search each node with one run of the algorithm instead of one run for each node.
Pseudocode for a depth-first approach might look like this:
reachable_places_list = empty list (or set, or map, or something similar)
function ...
6
Since you want to give up a bit of player control for playability using an AI, you might want to consider also simplifying the effect of tacking on propellers and altering ship dimensions into less, more easily manageable parameters for a computer algorithm. The player is still allowed to add propellers on any given part of the ship, but once completed this ...
4
ICS could be a viable strategy, but the problem is that
It is usually much much much more powerful than non-ICS. This gives the player no choice as the challenges become larger.
It places an unusual strain on the player because he needs to manage 10-20 times as many cities as in a non-ICS scenario.
You can try and combat ICS the "civilization way", with ...
4
There's no easy answer, without your knowing what sort of strengths and weaknesses you actually want... And I'm guessing this is part of the problem.
You really don't need any fancy formulas (yet?). Start with simple arithmetic and take it from there. It's actually those very numbers that give your game a unique feel in terms of how it plays.
Before you go ...
3
First create any solution you want and profile. I won't be surprised if your 100k objects will work OK using any container (unless of course you're doing mobile development for windows phone).
If it wont work, I see 2 mayor sources of optimization:
Do you really need to loop through every object in every turn? Can you possibly limit your loop to the ...
3
Whilst I agree with DampeS8N's opening paragraph (i.e. game AI only needs to be smart enough to make the player think that it's smart), I feel that this question needs a little more elaboration. The data structures in use could be FSMs for all levels, but that doesn't really answer the question as to how the individual systems work.
Disclaimer: I have ...
3
In general AI in games shouldn't be thought of as 'complex' it is all about getting what you want with the least possible effort. The name of the game is Emergence.
In this case, your fundamental conceptualization is wrong. These 4 systems do not need to work together at all. They just need to look like they do. They can also be a lot more stripped down ...
3
Sorry haven't got a tried-and-tested solution, but can this not be solved mathmatically?
Given any propeller and its offset from the center of mass, you can compute what plane you can rotate in.
For any movement, you can use 1 or more propellers. Each propeller can be queried to see whether its plane can contribute to the target orientation, how much ...
3
You can add value to empty space. Perhaps give cities a bonus depending on how close they are to an unclaimed "countryside" space, to represent folks' desire for nature or their needs for agriculture. Or maybe allow population to be assigned to some sort of non-city entity that offers a bonus too good to be turned down.
2
I thought of the A*,dijkstra, bfs,dfs but I think they require knowing the nodes beforehand.
You can use those just fine. Your problem set is small enough I'm sure that you don't need to precompute anything. Just run A* every move and you'll have your paths computed given whatever the state of the board is.
2
I think you need to start with the questions, who am I making this game for? and what kind of experience do I want my players to have?
Is this an online game or not?
Are you trying to make a realistic simulation of mêlée combat or something that's unrealistic but fun?
Are you making a game for a broad or "casual" market, or for hard-core gamers?
Are you ...
2
It's not unrealistic to have lots of little cities, but civilization games are supposed to be about the major cities. So it seems the best way to combat ICS is to strongly encourage larger cities. Ways to do that might include
As mentioned above, make a single city with 4 population give significantly more resources than 4 cities with 1 population (Civ ...
2
Artificial Intelligence is, unfortunately, an entire subsection of Computer Science. It's truly huge - something you can take a couple of semesters of in college just to get you warmed up.
There are a lot of common options - Decision Trees, Rules Engines, Neural Networks - the latter of which most people tend to find extremely interesting when they first ...
2
It's not entirely clear, but I understand the unit will only be able to move in the direction it is facing. In that case you will need to factor that vector into the equation as well (next to the unit and mouse positions).
Have a look at the equations in Minimum Distance between a Point and a Line by Paul Bourke.
In this picture, your unit's position is ...
1
It's hard to answer because the questions are pretty vague, since all the problems are not clearly specified. Basically you use the word 'hard', but not all things should be easy right? If the battle system is complex, then it's expected that it can be hard to maintain. Also 'hard' sometimes meas it's not wrong, just hard. If you feel it's wrong you should ...
1
Possibly not the best solution, but decision trees, specifically a minimax tree may be a good approach to take. See http://en.wikipedia.org/wiki/Minimax
You would need to create a heuristic function which can determine how good/bad a world state is. But this can become a bit more complicated if you are working with a large number of possible world states.
1
You might find reading the book "Artificial Intelligence for Games" very helpful. It gives you insight in the AI implementation of various kinds of games. (e.g. troop placement/movement, path finding, decision trees, ..)
See http://www.amazon.com/Artificial-Intelligence-Games-Second-Millington/dp/0123747317
1
(Hm, I'll add this as an answer because I can't seem to comment for some reason :()
I think you need to use a database instead of keeping the games in RAM. With a database you don't need to think about memory because it is handled by the os and the db software.
I have worked on a real-time MMO and you are right that you have to worry about memory concerns ...
1
Real cities don't work a linear fashion, it's more gaussian. The number of civilians that a city can support should increase with advances in technology and medicine (and thus the amount of resources output). But cities also need some kind of minimal population, which also increases with technology. (you need XW to run the bio-chem plant, but only YW ...
1
The root of the problem is basically a positive feedback loop. Each city gives resources, more resources allow for more cities, that give yet more resources, ad nauseum.
To solve it, the feedback loop must be broken^ that is, cities should stop giving resources after a while. (Or not give them in the first place.. but that kinda defeats the purpose).
Civ ...
Only top voted, non community-wiki answers of a minimum length are eligible
