70

Melee counter-attack is an easy way to make ranged attacks valuable. Do you build and use units that have strong melee attacks but die more easily because they're in melee or do you use units with weaker ranged attacks that live longer because they can stay out of melee? Melee counter-attack reduces otherwise over-whelming attacker advantage. In a game ...


15

It's a basic question of a certain type of "realism". It's hard to imagine getting a melee hit in on an enemy and them not getting involved at all, because you have to very close to them to hit with with something like an axe. It makes sense that the unit getting attacked gets a swing in. Ranged attackers can't get hit by the melee units they attack because ...


15

I am currently developing a turn-based strategy game. There are (overly simplified) two kinds of units in the game: sturdy melee damage sponges and fragile ranged damage dealers. The player is supposed to position the first in a way which prevents the opponent from attacking the second. However, that usually means that the melee units will receive the first ...


11

You can either copy an existing battle system, or create a new one. Copy. This is obvious, use Google to find information about some RPG mechanics (e.g. AD&D or Fallout) or play your favorite game and this will be inspiring enough. Problem with this solution is the fact that better systems are more popular and players are more bored with them. Create. ...


11

I agree with Jari Komppa that defining card effects with a powerful scripting language is the way to go. But I believe that the key to maximum flexibility is scriptable event-handling. In order to allow cards to interact with later game events, you could add a scripting API to add "script hooks" to certain events, like the beginnings and endings of game ...


9

I gave this problem - flexible computerized card game engine - some thought some time ago. First off, a complex card game like Chez Geek or Fluxx (and, I believe, Dominion) would require cards to be scriptable. Basically each card would come with its own bunch of scripts that may change the state of the game in various ways. This would let you give the ...


8

Pacing One standard rule not just of game design but of any form of entertainment is to aim for an engagement curve which slowly builds up excitement and then relieves the tension at the peak point. Game designers usually aim for that curve not just in their overall narrative, but also in smaller events, down to the most basic game loops. When you ...


6

If you need an active connection and literally real-time gameplay, then go with WebSockets, or a similar technique like Comet. Note that WebSockets requires a recent browser, while Comet is probably good enough for most purposes with better support for older browsers. For example, Facebook and Google use Comet for their technologies (Facebook Chat, Google ...


6

i don't know about Risk but i had developed a Chinese Chess game few years ago. I think you can try Minimax which the game calculate every possible decisions and each decision will branch out a node for all the players until a certain depths within reasonable time. I think it is suitable for most turn based games. For 'difficulty' your game will randomized ...


6

Go is difficult for computers because there are many, many possible moves for the player in each board state, too many for the computer to brute-force and calculate all possible outcomes (unlike, for example, tic-tac-toe). Traditionally, chess playing computer programs would calculate all possible moves a few turns into the future and pick one of the moves ...


6

Of course it's good for you to have this tree, but what I see from this is that you are aiming too high! As a beginner developer you might just get stuck. Trust me it happened to me many times and I have only finished one small game. I didn't read the whole thing, but I ran trough it and I can really say it's too much for a beginner. So if you want to get ...


5

I wouldn't do the turn-based gameplay in a separate loop. Instead, just have the one main game loop like any other game, and that loop checks if it's time to advance a turn yet.


4

The idea of simultanous turn based gaming is quite old, actually. In industrial age around 1800, it has surfaced as Kriegsspiel - german for wargame - and was used to train officers in the Prussian army. Also, the concept is well known in the board game community, with early game system titles like Diplomacy beeing released in 1959. As for computerized ...


4

Ok, if you don't care about the graphics, that's simpler. From a high-level pseudocode, what I suggest is like how any other game loop works: while game has not ended yet: keep going // we're out of the while loop; game has ended show results, etc. go back to main menu Thing is, yours is turn-based, so we can do away with the loop part, or keep it and ...


4

For a game like you described you might consider going for a full Planner based solution. This allows you to describe simple transformations of the world state the AI can perform. Essentially the AI plans a number of moves ahead of time to reach its desired goal. This approach is computationally expensive but for a turn based game it's a great fit over ...


4

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


4

Here is how I would approach this: I would start by performing terrain analysis (pdf) and creating a set of influence maps based on various attributes (conflict maps, resource maps, etc). You might want to combine the influence maps together with associated weights. You'll probably update some of them at the start of each turn. But assuming you have the ...


4

When you develop your game object-oriented, this might be a good application for the flyweight pattern. In this context, a flyweight would be an object which acts as a copy of the gamestate, but actually references the original gamestate it was created from while also having one or more modifications to it. To create a flyweight, you need a reference to ...


4

Your pathfinding should return a list of way points to reach your objective for each unit. Since you are making a turn based game, I am assuming that the unit movement is like a chess piece. It is either on "this" tile or "that tile, and not in between. If this is the case you might end up with the scenario where a units movements runs out in the middle of ...


4

Note: I'm playing fast and loose with the pseudocode here, so let me know if anything is unclear. Ideally, the player shouldn't be special - just another set of components. The main function of entities is to group components. You might think of it this way: components get updates, not entities. From the good old Evolve Your Hierarchy article: Updates ...


4

I think the rationale is pretty simple. A melee or a close quarters attack is a immediate threat to your survival fail to counter and your dead, or running for your life. Going into a melee is a two way street, you might get the first blow, but the other will counter attack or die. Nobody in their sane minds would be standing in place when they get attacked....


4

You add additional depth by mixing 2 existing systems. System 1: Combat can be initiated from either side, winner is determined by stats and luck. System 2: Only the one initiating combat deals damage. Retaliations are just a variation of the first system. Both systems make sense on their own. "Attacker deals all the damage" has been used since chess, so ...


4

You should not force players to make their moves under duress by giving them a ticking down countdown timer. A reasonable time limit might not be a bad idea to prevent AFK players from ruining everyone's game experience, but if you make the time limit too short, the game will become very stressful. You don't want players to lose a game because they simply ...


4

First of all, 65000 peak current users is quite a lot. Many games don't even get near that number. Looking at the current player stats on Steam, there are just 7 games which broke that limit today. And if you think you are playing in the same league as CS:GO, DOTA 2 or PUBG, then you should be able to afford more than one gameserver. But the number of ...


4

My stance is there aren't inherently bad mechanics. Different mechanics appeal to different people. However, it sounds like that particular set of play testing might have found a disconnect between this particular mechanic & your particular game. Here are some options: The play testers are not the intended audience. The good news is this lets you keep ...


3

The easiest way to cause this effect would be to give each shield type a % chance to block (possibly also influenced by other stats, depending on how you want the logic to function) Say if a small shield blocks 10%, a medium shield blocks 25% and a large shield blocks 50%, like in Orin's comment. At this point you just need to grab a random value and see ...


3

I'm thinking the clients will send data to a central server over a socket or http, and receive data via GCM push messaging. GCM push messaging strategy isn't appropriate for sending large amounts of data, for a few reasons: Rate limits are in place to prevent malicious or poorly coded apps from spamming an individual device with messages. Messages aren't ...


3

If you want to use sockets, you should probably choose a different language, perhaps Python or Node.js (server-side JavaScript); PHP is best suited for generating HTML in response to requests. Sockets would be used for truly real-time data, but PHP would be adequate for data that can be a few seconds delayed; you would just need to have the client keep ...


3

I don't know where you got the idea of doing it like this, but it doesn't sound very game design like at all. For a simple game like this you shouldn't need multiple windows and multiple threads. Also events aren't commonly used in game development because they break the flow of your game loop. Anyway why not try something like this: Build a game loop that ...


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