Tagged Questions
1
vote
4answers
287 views
How do I approximate the result of battle between two armies with known strengths?
I need a simple algorithm to calculate the outcome of two differently sized armies battling.
Each army has 1-100 troops and every troop is the same value on the battlefield. The troops do not have ...
8
votes
2answers
247 views
100 points between 0-1000 on an increasing scale
Basically, it's for roleplay, I need to generate 100 points along a scale. Level 1 is the starting amount, and is at point 0 on the scale. Level 100 is the highest amount planned at this point, and it ...
12
votes
2answers
316 views
Scrambling word into least recognizable form
My goal is to present the player with a scrambled word that should be reordered back into the original form:
OELHL --> HELLO
I want a scrambling algorithm that takes any given word(>3or4 letters, ...
2
votes
1answer
256 views
How should I go about randomizing levels in a “runner” game?
I'm working on a runner type of game (basically it's a never ending run through hordes of enemies and platforms and whatnot). 2d platformer view.
Should I random a bit of map every now and then? Few ...
6
votes
4answers
421 views
Ideas for attack damage algorithm (language irrelevant)
I am working on a game and I need ideas for the damage that will be done to the enemy when your player attacks. The total amount of health that the enemy has is called enemyHealth, and has a value of ...
1
vote
1answer
86 views
Game window systems and internal frames
I don't know if this is a valid question, but: What kind of window manager do games use which have internal frames (Frames inside frames)? Does this differ between the programming languages (Are e.g. ...
0
votes
0answers
149 views
Help with this optimization [closed]
Here is what I do:
I have bitmaps which I draw into another bitmap.
The coordinates are from the center of the bitmap, thus on a 256 by 256 bitmap, an object at 0.0,0.0 would be drawn at 128,128 on ...
2
votes
2answers
93 views
Repetition of move in Draughts game
I am having a little problem in my draughts game. Lets say my red piece (moving through AI) has arrived at the border of black pieces and now it has become a king, lets assume it is at index 2. Now ...
-1
votes
1answer
517 views
MiniMax not working properly(for checkers game)
I am creating a checkers game but My miniMax is not functioning properly,it is always switching between two positions for its move(index 20 and 17).Here is my code:
public double MiniMax(int[] ...
1
vote
1answer
1k views
How to utilize miniMax algorithm in Checkers game
I am sorry...as there are too many articles about it.But I can't simple get this.
I am confused in the implementation of AI. I have generated all possible moves of computer's type pieces. Now I can't ...
2
votes
2answers
558 views
Match-3 game level generator
I made match-3 game and now i trying to add level generator. Now I generate level by filling random cells with random blocks, but I want to create generator which for given number of moves and number ...
3
votes
2answers
156 views
Load state / continue game based on user input
I'm working on a rather simple 2D game, with a pretty small set of values that will need to be preserved for a user to pick up where they left off last time they played.
Rather than saving/loading ...
5
votes
2answers
195 views
How to evaluate a user against optimal performance?
I have trouble coming up with a system of assigning a rating to player's performance. Well, technically there is is a trivial rating system, but I don't like it because it would mean assigning ...
11
votes
3answers
3k views
Beat detection and FFT
I am working on a platformer game which includes music with beat detection. I am currently detecting beats by checking for when the current amplitude exceeds a historical sample. This doesn't work ...
3
votes
2answers
533 views
Factors to consider when building an algorithm for gun recoil
What would be a good algorithm for calculating the recoil of a shooting guns cross-hairs?
What I've got now, is something like this:
Define min/max recoil based on weapon size
Generate random ...
9
votes
3answers
1k views
Algorithm for determining random events
I'm struggling with coming up with an elegant solution to generating random events in the game that I'm working on.
Say there are 4 classes of events that can happen, with varying events in those ...
1
vote
4answers
291 views
Mahjong solitaire - navigating between open tiles
I am looking for an algorithm to help me navigate between 'open' tiles in a Mahjong solitaire game. The game is to be played on a limited device with only left-right-up-down buttons and I want to ...