Tag Info

Hot answers tagged

19

A turn based game is going to be governed by a state machine. Basically, you would lay out a series of states that can occur in a logical order. At a high level, a player's turn could be the start of a new state, followed by all the possible actions that are allowed during that turn. For instance State - change player it is now player 1's turn ...


19

Why has no one mentioned Frozen Synapse? It's exactly as you describe. Turns are planned and played out at the same time. It works amazingly well. http://www.frozensynapse.com/


16

I'd figure out what you want the "guaranteed hit" and "guaranteed miss" chances to be (i.e. the chances for a kitten to hit a dragon and a dragon to miss a kitten). Store your random result, and before applying power differences, mark a hit if it's within those bounds. That will prevent the 100% hit/miss chance problem... although there's another option ...


16

Collision resolution, instead of collision prevention. Simply move the objects, then check if there have been any collisions. If there has been a collision with another block move back to previous square, or depending on the game type, a different square.


12

The classic Diplomacy works like this, of course (I can't believe nobody mentioned it yet ...). It's a great rule book to study if you're interested in such game modes, in particular in how they deal with conflicting move orders. You can download the rulebook on the official site.


10

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


9

You will probably need to micro-manage the 3G modem to ensure that you don't have delays while it switches power modes. Your simple answer is make sure you send at least one packet larger than 128 bytes every 6-8 seconds. If you can guarantee that all your packets are smaller than 128 bytes make sure you send something once every 6-8 seconds. Avoid, at all ...


8

This isn't a minimax algorithm, however the guys responsible for the Killzone AI released a paper based on position evaluation functions which some chess AI also uses. It's very simple in that all it does is picks a position on the board based on the agent's current knowledge. So if the agent is low on health, then positions further away from its enemy will ...


8

Flag all players as either stationary or moving, depending if they submitted a move this turn. Go through the list of moves. If two moves point to the same location, remove them from the list and set the players stationary. Loop through the list removing all moves that point to a stationary player or other obstacle. Do this repeatedly until the list ...


7

Yes, its possible to do in a single thread. Generally speaking though, you'll want to be updating the objects every frame and not just when there are spare cycles. Your animations and movement will be disconnected from the frame rate and look rather choppy if you don't. If you're talking more about AI updates or something else that does not need to be ...


7

I don't mean to start a holy war here, but most of the internet services (flickr, twitter, facebook and such) have been dropping SOAP in favor of RESTful webservices and JSON as the serialized format. Although essentially the same, REST services rely on the url and http method to define what should be done, for example GET /articles - list all articles POST ...


7

I'm not sure what it is exactly that you want to achieve. But, there's one pattern that is used constantly in game servers, and may help you. Use message queues. To be more specific: when clients send messages to server, do not process them immediately. Rather, parse them and put into a queue for this specific client. Then, in some main loop (maybe even on ...


7

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


7

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


6

I first encountered this technique on a game called Laser Squad Nemesis. I always thought it was a great idea, and used it when I developed Zwok for Sony. It allows Zwok to have 6 player multiplayer without ever having to wait in turn.


5

An example of a game that uses this paradigm is Flotilla. The space combat sequences start with a simple three-step setup for each ship (direction, speed, target). You get a "ghosted" preview of where your ship will move when the orders are executed. Once you've set up all your ships, you commit your actions, then the game runs real-time for 30 seconds. The ...


5

Are there any games out there that use this paradigm? "Turn-based" and "real-time" are not mutually exclusive, so if you're asking if this has been done before, it depends on how you define them. There are plenty of turn-based games where all players write down (or enter, or program, or whatever) their commands for the turn, secretly and ...


5

It depends on the mechanics of the game. Game tree min-max may be inapplicable overall, but maybe it applies in some areas. It's common that some locations on a map are strategically important. Min-max may apply at a strategic level for which of those locations to control. At a tactical level, for the x squares around each strategic location, min-max ...


5

My answer from this question would fit here. To adapt for your problem: A monster would look to assign a score to each enemy. Pass the enemy to each of a collection of behaviour classes, which each return an integer score. Add all these scores together, and assign the final score to the enemy. Attack the enemy with the highest score. This has the scope for ...


5

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


5

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


4

Since your game is going to be turn based, real-time updates are not super important. The easiest way to do this is to use an already built server, I would go with a web server. Any platform worth porting your game to should facilitate accessing web services located on a web server. In order to provide updates in near real-time, I recommend you look into ...


4

I'm assuming this is a game balance question and not a coding question, and there are a lot of ways to handle this. From your existing algorithm, I suspect you are making it more complicated than it has to be (three attributes AND a random number make for an extremely muddy system from the player's perspective). My first instinct is to simplify! Favor ...


4

If you wanted them to act really smart, usually in RPGs the best thing for the monsters to do is all attack the PC with the highest ratio of offensive capability to hit points. You don't see this actually done a lot, though, since it tends not to be rewarding for the player. :) One place I might recommend starting is to come up with some general ...


4

if you are only asking about the path finding problem you can use your answer in this question, but for the whole idea of how to implement an AI read the rest of my answer. It's not always finding algorithm like A* that decide what AI should do, usually for games with too many possiblities they use some state-machine that controls the actions and those ...


4

Move all players according to their request. while there are still some squares multiply occupied: For each square that is now multiply occupied: For each player in that square that moved there this turn: Return them to their previous square Mark them as having not moved this turn This requires that each player remembers ...


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

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


3

If you feel comfortable and productive in WCF there may not be a strong reason to use anything else. I certainly think that WCF is a good place to start because if you follow its contract pattern it is an easy pattern to convert to work with other systems, should that need arise. For one of my own projects, I started with a WCF prototype. When I started ...


3

Simultaneous turn-based games are common enough, mainly in the wargame genre, where they're sometimes referred to as "WEGO" turn-based systems. As already mentioned, Laser Squad Nemesis would be the main example of a squad-level one. On slightly larger scales, the Combat Mission series from Battlefront would be a good example; ...



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