Algorithms are used for calculation, data processing, and automated reasoning. More precisely, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function.
35
votes
2answers
1k views
Procedural… house with rooms generator
I've been looking at some algorithms and articles about procedurally generating a dungeon. The problem is, I'm trying to generate a house with rooms, and they don't seem to fit my requirements.
For ...
0
votes
4answers
428 views
Storing huge 2D tiled map in a txt file
I'm working on a global startegy game that uses a 2D tiled map. The map is to be 8000x8000 tiles large (this size is fixed, the map stays the way it is throughout the game), since I'm covering a large ...
1
vote
1answer
301 views
Tongue pull effect
I've been searching on the net for several days and can not find nothing about this effect. Even a name for this effect. I want to make a character that can use his tongue to pull objects objects 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, ...
-1
votes
1answer
56 views
Algorithm behind targeting mechanism used by the player characters in Bionic Commando and Just Cause
In Bionic Commando (2009) and in Just Cause 2, the player's character is able to target, using a "hook based one arm mechanism" almost anything and is able to propel itself to it and perform several ...
0
votes
1answer
82 views
2D object move & evade obstacle
Description:
Actor{
int x,y,width,height;
float speed, angle;
}
actor is an object that move around the map
every frame, actor change position(x,y) according to it’s speed & angle
...
3
votes
1answer
68 views
Player ranking using ELO with more than two players
I would like to use ELO to track player rankings between matches of a certain game, however the game can be played with up to four players in a match. I have seen games like Carcassonne use ELO with ...
4
votes
2answers
155 views
Matchmaking by user-supplied parameters
I'm looking for matchmaking algorithm for a 1 vs 1 online game. Players must not be matched by their skill level, but instead by some specific filters set by the players.
Each player sends a request ...
0
votes
3answers
263 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 ...
0
votes
2answers
199 views
Job finding algorithm
My issue seems simple enough to me, but I can't break it down the the bare essentials to be able to program it into my game.
First of all different professions requires different skills, these skills ...
3
votes
1answer
77 views
Pygame: circular motion with Bresenham's algorithm
I'm trying to figure out a way to move an object in a circular path. I read about Bresenham's circle algorithm, but all the codes available online draw an entire circle.
For my game, I want it so ...
2
votes
2answers
252 views
Derive a algorithm to match best position
I have pieces in my game which have stats and cost assigned to them and they can only be placed at a certain location.
Lets say I have 50 pieces.
e.g.
Piece1 = 100 stats, 10 cost, Position A.
Piece2 ...
1
vote
0answers
48 views
MiniMax where bots make simultaneous moves .
What is the correct approach for using miminax in a game where bots make simultaneous moves ?
0
votes
0answers
79 views
The algorithm for removing a group of adjacent balls of arbitrary shape
I'm writing a game that something like Diamond Dash and/or lines, you can delete on the horizontal / vertical and diagonal directions. Which algorithm is best suited for removing a group of balls ...
10
votes
5answers
834 views
How could you parallelise a 2D boids simulation
How could you program a 2D boids simulation in such a way that it could use processing power from different sources (clusters, gpu).
In the above example, the non-coloured particles move around ...
1
vote
1answer
222 views
2D Drag Racing Algorithm
What algorithm can I devise for a 2D drag racing game to simulate a race?
The gameplay is 2D and the camera's perspective is from the right side of the cars i.e. cars are seen from their right side ...
8
votes
2answers
292 views
Drone targeting
Imagine a "drone" and a target point on a 2d plane. There are eight parameters:
P = my position
Q = target position
V = my velocity
I = my moment of inertia
w = my angular velocity
s = my angular ...
13
votes
2answers
631 views
Partially observable game map — is A* appropriate?
I know very little about game development and I'm trying to wrap my head around pathfinding algorithms.
Consider this setup: an agent is on a 2D map and must find the shortest path to a globally know ...
4
votes
1answer
207 views
Help me please to choose proper path-finding algorithm
I am new to game development and just want to ask for advice. I need to know which path-finding algoritm will be suitable for my scenario:
Units - any shape. But in most cases rectangles of ...
6
votes
2answers
196 views
Comparing two tree structures
I'm having a hard time trying to describe this in correct terms so I will just give as much detail as possible and hopefully someone knows what I'm trying to do =-)
I am trying to compare two node ...
3
votes
1answer
131 views
What algorithm to use to fill a KenKen square board with cages?
I am working on recreating KenKen, a popular math puzzle involving a blank grid that is divided into "cages". Each cage is just a collection of adjacent squares and has a clue which is generally a ...
-4
votes
1answer
64 views
Get location of nearest array object [duplicate]
Is there an algorithm that would calculate the location of the nearest MovieClip in an array? Perhaps a loop? If so, what?
14
votes
3answers
748 views
How do history generation algorithms work?
I heard of the game Dwarf Fortress, but only now one of the people I follow on Youtube made a commentary on it... I was more than surprised when I noticed how Dwarf Fortress actually generates a ...
0
votes
1answer
119 views
Pong horizontal movement algorithm
I was just wondering about the horizontal movement of a pong ball? What is the general algorithm used with this? The ball in my pong game just move vertically and I don't know about the algorithms ...
5
votes
1answer
125 views
How to determine what hexes are in an area bounded by 3 hexes
I've been searching for hex grid algorithms for a while now, but I'm not having much luck.
I'm working on a game that will be using hex grids for the board. There seems to be sufficient resources to ...
1
vote
2answers
3k views
How can i use A star pathfinding algorithm
How would i implement an A star algorithm for a game that i'm making on the android in java? i'm looking for a pre-made A star API in java with classes and methods to call. i don't want to have to ...
6
votes
0answers
153 views
Path Finding for an Arena based map in 3D using NavMesh
I have a 3D arena map (consider a small island surrounded by water on all sides) for a multiplayer Tank fight game.
The moveable areas are marked using a Navigation Mesh made by the Arena designer.
...
5
votes
2answers
531 views
How to remove floating terrain when generated with 3D Perlin Noise?
I'm currently using 3D Perlin Noise to generate random terrain in combination with Marching Cubes.
My issue seems to lie in scaling the noise function to get reasonable heights in my terrain. If ...
2
votes
3answers
298 views
Time of Day Lighting / Day Cycle
I'm trying to implement a simple "lighting" system that alters a value of light between 0.0-1.0, 1.0 is midday 0.0 is total blackness.
Are there any "good" information regarding this particular ...
15
votes
2answers
363 views
Why is my sky color calculation in Mathematica incorrect?
I'm trying to implement an algorithm to calculate sky color based on this paper (Perez' model). Before I start programming the shader I wanted to test the concept in Mathematica. There are already ...
2
votes
0answers
90 views
Decomposing a concave mesh into a set of convex meshes
I'd like to be able to decompose a concave mesh into a set of convex meshes for 2 reasons:
Transparent rendering
Physics shapes
Is there an algorithm that takes a set of triangles (concave) as ...
8
votes
1answer
113 views
Flowfield density conversion
I'm trying to implement flowfield navigation, as described in http://grail.cs.washington.edu/projects/crowd-flows/
but I can't understand how the Density Function in Figure 4 of the paper is supposed ...
6
votes
4answers
201 views
Interstellar Economic Simulation
I'm designing a game reminiscent of Elite or Escape Velocity, those old space trading games, where you play a traveling merchant in space.
I'd like to have the game's economy at least resemble a real ...
0
votes
0answers
132 views
2D tile-based collision: avoid tunneling
We have a box that tries to move from A to B. In order to avoid tunneling we need to check if there is a collision in the path described by its four corners.
Let's focus on the bottom-right corner of ...
0
votes
1answer
152 views
Create Random Platformer-Gameworld
Evening.
I created a xna-game like the iOS Platformer game "Banana Kong".
The level-layers are currently saved as XML files.
Example:
<level>
<layer1>
<tile type="0" ...
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 ...
2
votes
4answers
2k views
2D Collision in Canvas - Balls Overlapping When Velocity is High
I am doing a simple experiment in canvas using Javascript in which some balls will be thrown on the screen with some initial velocity and then they will bounce on colliding with each other or with the ...
1
vote
4answers
146 views
Checking game objective status in efficient way on each update call
I am creating a 2d mobile game where there are three levels. Each level has 20 objectives. This can increase in the future.
Examples:
Level 1
Current Objective: 2/20
Objective : Collect 1000 coins
...
5
votes
1answer
215 views
How do you parameterize turn based AI?
I would like to create/find an AI algorithm/process that can be parameterized such that a change in the parameters causes a change in the AI behavior. I am specifically looking to apply this to a turn ...
0
votes
2answers
381 views
What algorithms can I use for bullet movement toward the enemy?
I'm developing 2D strategy game. There are weapons that shoot at enemies.
From what I've read in this, this, this and this post I think that I need linear algebra, but I don't really understand what ...
-1
votes
1answer
120 views
Server fixed timestep not running at 30Hz but way way too fast [closed]
I'm trying to make my game's server thread run at a fixed 30Hz but can't figure out how. Basically, before I just had a stupid while(1) { //do everything as fast as you can} which means that for my ...
12
votes
1answer
337 views
Get ring of tiles in hexagon grid
Thanks to this post I'm able to collect adjacent tiles to a given tile.
But I'm pretty much stuck on an algorithm that gives me only a "ring" of tiles specified by an offset. The algorithm given in ...
1
vote
1answer
286 views
Negamax implementation doesn't appear to work with tic-tac-toe [closed]
I've implemented Negamax as it can be found on wikipedia, which includes alpha/beta pruning.
However, it seems to favor a losing move, which should be an invalid result.
The game is Tic-Tac-Toe, ...
1
vote
0answers
62 views
How to trace contour of shapes with holes?
I am experimenting with the RVO2 library for collision avoidance in a 2D simulation. This library supports specifying arbitrary obstacles as a list of vertices. The obstacles must be full shapes, i.e. ...
5
votes
1answer
373 views
3D isometric depth sorting
How is it possible to depth sort tiles and objects in an isometric environments without any limitations? I've been researching this for a while now and there seems to be no publicly available answers ...
0
votes
0answers
97 views
How to predict encounters between a ship and a body's sphere of influence in 2D
Long time listener, first time caller. I'm making a little hobby game in XNA, its about transport ships in space, analogous to container ships at sea. There are to be AI ships and player controlled ...
4
votes
2answers
702 views
Algorithm for random flight of a fly
I'm new to game development. What is a good algorithm to model the random flight of a fly? I've been looking at path-finding algorithms, but they don't give any interesting random behaviour.
7
votes
2answers
134 views
Determining if removal of a voxel will break up a group
I have the following situation: I have a 3d grid of voxels (on/off, the max size is probably 128x128x128). I know in advance that inside the grid, all the voxels that are turned on are interconnected, ...
9
votes
3answers
497 views
Algorithm to see if two voxels are interconnected
I'm looking for a good algorithms for the following problem: Given a 3D grid of voxels (which may be either empty or filled), if I pick two non-adjacent voxels, I want to know if they are connected to ...
0
votes
1answer
103 views
Simulating building stress [closed]
I need to simulate the effects of adding supporting materials to a building structure for a genetic algorithm in a block-based world. Essentially I am planning to use a genetic algorithm to optimise ...


