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.
-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 ...
3
votes
1answer
66 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 ...
0
votes
3answers
256 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 ...
3
votes
1answer
73 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 ...
0
votes
1answer
80 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
...
0
votes
2answers
197 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 ...
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
77 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 ...
13
votes
2answers
562 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
188 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 ...
8
votes
2answers
264 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 ...
6
votes
2answers
177 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 ...
-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?
3
votes
1answer
129 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 ...
0
votes
1answer
117 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
124 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
1answer
217 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 ...
6
votes
0answers
150 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.
...
2
votes
3answers
296 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 ...
2
votes
0answers
89 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
197 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
131 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 ...
8
votes
2answers
246 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 ...
15
votes
2answers
361 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 ...
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
...
12
votes
2answers
315 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
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
335 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
0answers
61 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. ...
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 ...
5
votes
1answer
210 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 ...
7
votes
2answers
132 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
489 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
102 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 ...
0
votes
2answers
179 views
How to build a math module and simulate a system?
For example, in the classical game SimCity:
an economic model to simulate the supply and demand of the city, then calculate how many people live in each building, how many people work there.
a ...
2
votes
1answer
111 views
Collision Resolution: How to avoid Interpenetration/Tunneling Caused by Prior Collision Handling? [duplicate]
My game processes world collisions followed by entity collisions. The problem here is that entities can break through walls the next frame when world checks are run again as a result of the prior ...
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" ...
1
vote
1answer
54 views
Build a Cube/Prism from other varied Cubes/Prisms [closed]
I'm wondering, are there any algorithms or theories in existence (that aren't patented/proprietary/protected) that would take a series of 3d rectangular prisms (or cubes but a cube is a prism) and ...
1
vote
2answers
150 views
How to do FoV similiar to Nethack? [duplicate]
I am currently writing a little roguelike and wondered how Nethack/other games do the FoV of the player. I had a look at Nethacks source code, but since it's C it's pretty hard to read.
For people ...
5
votes
3answers
289 views
3D pathing finding with flying
Does anyone know of a (free or paid) solution that enables 3D path finding? Basically something like:
CalculateRoute(input_geometry, start_pos, end_pos, variance)
I found a good paper on the ...
7
votes
7answers
585 views
What's the best way of translating a 2D vector into the closest 8-way compass direction?
If you have a 2D vector expressed as x and y, what's a good way of translating that into the closest compass direction?
e.g.
x:+1, y:+1 => NE
x:0, y:+3 => N
x:+10, y:-2 => E // closest ...
5
votes
1answer
371 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 ...
2
votes
2answers
174 views
Implementing a color picker [closed]
I'm making a paint program using applets in Java, and I want to create some sort of color palette where the colors blend into each other, similar to this:
However, I'm having trouble understanding ...
1
vote
4answers
255 views
3-in-a-row or more logic
This is a bit more difficult than it seems and the one other post on here isn't sufficient. You have a row of n items, and each item could be any one of 5 colors. You need to find if there are any ...
1
vote
3answers
379 views
Smart terrain generation to avoid unconnected tiles
To make this clear from the get go;
I'm not looking for HOW To randomly generate a terrain (I know I can use Perlins noise for that).
I'm looking for an algorithm that can help with the terrain ...
0
votes
2answers
172 views
NPC AI articles for walking and fighting? [closed]
I'm looking to learn about NPC AI to solve a problem how an NPC should walk e.g. walking straight and then turn at a wall. Perhaps I can program it to walk along a line but then I still would not know ...
1
vote
6answers
430 views
Is it good to sort objects list before every rendering?
I need to render a "tile" game, which are like these:
or
or
I don't know how to render them in correct order. I intend to perform a sorting operator before every rendering (depending on their ...
0
votes
1answer
65 views
make a character walk along a defined path(as much as possible)
What I want is a character walking along a path, which is defined as a sequence of waypoints. For example, a soldier patrol around a castle.
The problem is, I want the soldier to avoid (dynamic) ...
2
votes
2answers
341 views
How to generate houses procedurally in a voxel world?
I am developing a mod for the game Minecraft, a block-based voxel game. As part of the mod, I want to create a procedural house generator that will be generated based on specific needs/desires, such ...

