Tag Info

Hot answers tagged

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 ...


11

Most simple (and probably most naive) approach I can think of right now: Start at your character and mark all surrounding fields as steps - 1. Iterate over all newly marked fields and once again mark their surrounding fields as steps - 1 where steps would be the current field's step number, unless the new field has an already higher number. Repeat the last ...


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

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 ...


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

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 ...


5

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 ...


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 ...


4

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 ...


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

You can just apply A*( A-star ). Compared to a uniform square grid the only difference is the way you collect the adjacent tiles ( aka your hexagons ). Each tile should have a table of booleans representing the bridges corresponding to their direction like so //Depending on your hexagon order enum Direction{ NORTH, NORTH_EAST, SOUTH_EAST, ...


3

Having some kind of central "meta server" or "locator server" is pretty standard practice, and they are pretty generic and straightforward (even though entire middleware solutions, such as GameSpy, used to be popular in the early days of internet gaming). A locator server just maintains a list of known active game servers that can accept connections, ...


3

I think a bounded Dijkstra is precisely what you want to use. The way that Dijkstra finds the distance between two points is it maps out the distance to every node from an origin node, and then 'selects' the shortest path from this distance map. You want to do virtually the same thing, except you want the distance node graph it creates as output, rather ...


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

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

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

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 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 ...


2

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


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

This is primarily just a design decision. Consider that you can actually do these things at the same time. If you look at the situation in terms of your update loop: Update 1: Calculate outcome for entity: n Play animation: n (frame 1) Update 2: Calculate outcome for entity: n+1 Play animation: n (frame 2) and n+1 (frame 1) Update 3: ...


1

I have no experience programming AI. However, I can offer you my naive strategy that might help you brainstorm a little. I know you said you'd prefer experienced individuals for this question, but this is an intimidating question to say the least. Right then. What I would do is implement a per-turn checklist/surveillance. Each AI unit, every turn, would: ...


1

I think what you're looking for might be Manhattan Distance. Assuming no obstacles, you can say that a square is reachable simply if: |toX-fromX| + |toY-fromY| < maxMoveDistance This algorithm may not be the right direction to go if you're going to have obstacles later; one possible way to adapt it might involve having obstacles cast 'shadows' and ...


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

(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

You will have to decouple the "camera" from a player. Maybe GML has limitations here but I have no experience with that to speak of. There is no reason why the position and setup of the camera has to be locked to a single player. Normally a game consists of a world and sometimes several cameras to be rendered each frame for multiple players on the same ...


1

Whilst not open source, the game/engine Advanced Tactics Gold, has an editor and can be modded with custom tiles to cover just about any WWII conflict you want. The game is sourced from Matrix http://www.matrixgames.com/products/405/details/ And there is already a considerable scenario bank http://www.advancedtactics.org/ Whilst basic scenarios can be ...


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 ...



Only top voted, non community-wiki answers of a minimum length are eligible