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.
0
votes
0answers
11 views
Handeling outcomes too similar in a tree search with MCTS
I'm using a MCTS algorithm to handle the decision process an an AI agent. My problem would likely the same with other kind of tree-search algorithm.
I want the AI to work in all cases but for the ...
2
votes
2answers
40 views
Putting items into a 3D space
Imagine a fridge and a bunch of random foods. I want to take one food item, automatically put it somewhere in the fridge, and repeat. I can stop at any time.
Basically, the filled fridge should look ...
2
votes
1answer
57 views
Algorithm for spending x points on y things divided by n people
I'm trying to devise an algorithm to spend a given amount of points on a randomly generated list of items each with their own cost in a way that results in having a number of items that is divisible ...
3
votes
1answer
62 views
Generating 'Specially' shaped rooms for a Dungeon
I've made a fairly simple dungeon generator but now I want to expand on it so that I can procedurally generate a dungeon with irregular shaped rooms. I don't just want any old crazy shapes popping up ...
0
votes
2answers
108 views
Exponential EXP Curve | FIXED TIME -> MAX LEVEL
I have yet another experience equation question, with a slight twist.
Problem Situation
Player gain experience from Level 1 - 80.
Time to level from Level 1 to 80 grows exponentially.
There is a ...
0
votes
1answer
43 views
How are loot box labels positioned?
Take this screenshot for example:
How exactly are they positioned perfectly adjacent to each other? Do they already create the label positions based upon the world map first, and then when the ...
3
votes
1answer
24 views
Calculate visible points in grid in 2D game
I have a game grid and I need to figure out which game grid points are not behind occupied grid point from players view. The visible points. I'd like to define a visible point first, because it can ...
1
vote
1answer
47 views
My attempt at a drunkard walk algorithm seems to generate large groups instead of more linear paths
...and I'm not sure if that's normal due to the random nature of the algorithm or am I doing something wrong. What I'm doing is:
Set a random point within map boundaries (which I called a sandbox).
...
2
votes
1answer
68 views
Graph search with a high number of actions
I have implemented A* to reach a goal state from a start state. My state is position X,Y, angle and others state variable. I have a number of actions.
What I call actions is : A* on a grid has 4/8 ...
2
votes
3answers
196 views
Find two points in a point cloud with the maximum distance?
What is the least computationally complex way to find two points such that the distance between them is greater or equal to any other pair.
Remember hearing something about how you could find such a ...
5
votes
3answers
149 views
How should a circuit or power system (like redstone in Minecraft) be implemented
I want to implement a power-system like the redstone system in minecraft.
I have n power sources and m cables. If I disconnect the power source or a cable the circuit should turn off.
How do I ...
0
votes
1answer
47 views
Most efficient way for nested loop to not repeat a value of parent loop in pair-wise structure (C# or Javascript)
It's hard to choose the correct title for this question, so let's see if I am able to better convey here what I am in search for. If the title is too far away, suggestions are welcome and I can edit ...
2
votes
1answer
47 views
How to implement view bobbing?
I'm developing a First-Person shooter game. Everything is just fine but I've a little problem with my camera moving.
My FPS camera is moving smoothly! But the camera should move like a human is ...
0
votes
0answers
30 views
Marching cubes and greedy meshing
Currently i am trying to implement the marching cubes algorithm into my voxel engine to get smoother terrain. My voxel engine also uses the greedy meshing algorithm to optimize the engines meshing. My ...
-1
votes
0answers
53 views
developing algorithm for a puzzle
a)Its a single user game.
b)There is a board , that can vary in dimension can be 4*4 (square) or (4*5) rectangle
c)There are numbers in the board ranging from -9 from 9
d)These numbers ...
17
votes
2answers
2k views
Matching a chunk of procedurally generated world to a chunk of other world
Have you read The Chronicles of Amber by Roger Zelazny?
Imagine yourself playing in 3rd person MMO game. You spawn in the world and start to wander around. After some time, when you think, that ...
1
vote
1answer
71 views
Are hard coded “rooms” better than dynamically generated on a smart phone, from performance point of view
This question pertains to a type of platform/maze game (made with Unity 5) for typical smartphones (iOS/Android).
This game has following characteristics:
1. an upper limit (about 100) on the amount ...
0
votes
1answer
92 views
Improve (adding randomness) minmax algorithm for Connect Four
I have implemented the minmax algorithm for the Connect Four game. It works well (almost...), but if the player does the same moves, the computer will do the same moves as well, for each match. There ...
4
votes
1answer
53 views
What is a viable way of finding the minimum swaps to sort numbers in pyramid?
I have made a game that consists of a pyramid of hexagons with numbers from 00 to 99 randomly positioned in groups of 6, 10 or 15 elements. Now, I'm working to create an auto-solver but for the last 2 ...
0
votes
1answer
66 views
Funnel algorithm
I'm implementing the funnel algorithm for pathfinding. After searching many resources I found those : https://skatgame.net/mburo/ps/thesis_demyen_2006.pdf
...
5
votes
4answers
140 views
Good algorithm to generate pixels for thick line?
I am not really making some drawing as of picture manipulation but I use line function to calculate "claimed" pixels in my line race game (demo here):
The actual rendering is apart from the game ...
7
votes
3answers
192 views
City-region generation
I am currently making a procedural generated map and wanted to add regions to the cities indicating their reach, the way I am achieving it currently is by expanding outwards from the city center until ...
5
votes
1answer
111 views
RTS: Unit sight in fog of war
I am making an RTS game, and like most RTSs, you can see what's going on in a part of a map only if you have a unit over there.
I have few ideas how to accomplish this, but there are problems with ...
0
votes
1answer
78 views
Match 3 game - Check for matches
I'm out of ideas and need help. So far I generate a board nicely using a flood fill algorithm and a 2d-array, I can also move tiles around the board.
Each Tile knows its own row, column and ID ...
0
votes
0answers
14 views
How can I dynamically change the bone structure to reach a point?
Say I have a skeletal animation about a whip hit a target. When I create this animation, the root of the whip is at (0, 0, 0) and the target is at (10, 20, 10). Now in the real game, the target is not ...
6
votes
3answers
105 views
How do I make hit damage a Gaussian distribution centered around a value?
I'd like my character's attacks to on average 10 damage, but to vary anywhere from 0 to 20.
Instead of a linear spread, I would like a normal distribution, so most of their hits are between 10-15, ...
2
votes
1answer
40 views
How can I calculate an octree node's depth from its location code?
The article Advanced Octrees 2: node representations states:
The AABB (axis-aligned bounding box) of the node can be stored explicitly as before, or it can be computed from the node’s tree depth ...
2
votes
2answers
144 views
Best 2d AI movement system
I'm creating a top-down rpg (no tile-based) using libgdx. Now I need to make enemies move on map with obstacles. What is the best approach to realize that? A*(I think, if enemy see player, he should ...
1
vote
0answers
38 views
How to get a difference of angles in one mathematical expression? [duplicate]
I need to do this for AI and also range calculation over a curved surface.
I have two angles, a1 and a2, which can be in the range from 0 to 359. I need to calculate the difference between them, and ...
0
votes
1answer
56 views
A* Pathfinding math for 2D, oblique style game
I'm making a 2D, oblique-styled RPG game and am implementing A* pathfinding for NPCs. The game is on canvas, using melonJS engine and sprites not confined to a 'grid'. I'm having a hard time ...
0
votes
1answer
53 views
A Star pathfinding on oblique map
I'm making an RPG and want to make npc ai to navigate the city. I am using polylines for collision detection, and my map is 2D, but oblique styled. I am considering using the A* algorithm to help them ...
3
votes
4answers
137 views
Special Pathfinding Algorithm
I need help with following pathfinding Task:
I have a grid (7x7 squares) and the starting square is always on the far left side (column 0) and its target is to reach the far right side (column 6).
...
0
votes
1answer
32 views
traversing the area
i want to move point along spiral like hexagon for example i want to traverse the whole area and my player (point) is standing where i have placed it manually. now i want to start from this point and ...
0
votes
1answer
102 views
Pathing for 2D, sprite-based game
I'm making a 2D, oblique-styled sprite based RPG. My game does not live in a 2D matrix (like Tetris), rather it's sprites animating over a tilemap. I am trying to set pathing rules for NPCs. I've ...
0
votes
1answer
42 views
Calculating the illumination level of an object
In my (UE4) scene I have an object and several (point) light sources. The object can move around, getting closer and away from all those light sources. Now I need to calculate for each light source ...
1
vote
1answer
159 views
What are the disadvantages of R-Trees in collision detection?
I was poking around in SQLite and discovered R-trees. A little digging revealed that R-trees are really just fancy AABB-trees.
Then I realize that the state of the art in collision detection (often ...
1
vote
1answer
54 views
Efficient dynamic character shadows [SW Rasterizer]
I am working on a SW rasterizer for a quarter-century old console (think sub-100 MHz RISC CPU, no dedicated 3D HW, couple megs of RAM) and am approaching a stage where I will be adding dynamic ...
1
vote
2answers
82 views
How can check a collision between 2 non-axis aligned boxes?
I'm making a simple and easy game and I need to detect the collision between 2 boxes. It only needs to return trueor false, no physics involved.
I started working and couldn't find an algorithm that ...
0
votes
0answers
51 views
How do I efficiently generate all valid configuration spaces of a Tetronimo in Tetris?
This question is relevant to How can I do optimal pathfinding for a tetris piece, which assumes we already have a start and end state.
How we can efficiently generate all those valid configuration ...
1
vote
3answers
82 views
Best collision algorithm for Axis Aligned Bouding Boxes [duplicate]
I have a number of quads (suppose like 20-40) and i want to quickly check the collisions between any of them. I would like to know if there's a quick algorithm to do that 60 times per second without ...
0
votes
0answers
41 views
Grid board fill with special cells - predicting movement
I have to create an algorithm which will fill a board, which is made of square cells, with elements. Board can have different sizes and it doesn't have to be a square. Elements fall from top to ...
0
votes
1answer
64 views
Algorithm to fill a shape defined by 4 pixel points?
I'm developing an application in Unity3D where a user can define 4 pixel points on screen, and what I would like to do is fill this shape with pixels using Unity's SetPixel.
While I can do this ...
2
votes
1answer
39 views
How does hidden surface removal work?
Lately, I've been learning some OpenGL for fun, and I've been thinking about hidden surface removal.
Say you have a high poly count static scene, with nothing that moves, no bones, physics, etc. Just ...
2
votes
3answers
152 views
How do game engines mitigate CPU cost for many trigger zones & entities? [closed]
It's a rather simple question, but a somewhat fundamental in computing in general.
Let's say we have a player controlled character in an open world. The world is large. In this game-world we have a ...
-2
votes
1answer
61 views
Optimal trajectory of area exploration
I've got next problem. There is three objects:
first one, with next characteristics: circular area of view, speed, drag coefficient;
wind (or water current, doesn't matter; some sort of resistance) ...
2
votes
1answer
63 views
Short distances from reference point
I would like to compute short distance from reference point in 2d grid. To expose:
0, 0: not penetrable
0, 1: not penetrable
...
1, 1: penetrable
...
I search an algorithm who return:
1, 1: 1
...
6
votes
2answers
163 views
Pathfinding with inertia
I'm currently working for pathfinding for a game where units are moving, but they have inertia. Most typical pathfinding algorithms (A*, Djikastra, etc.) are simply designed to minimize the length of ...
3
votes
2answers
160 views
Algorithm for a smooth weather transitions in game weather system
I've been slowly learning c++ and building up a codebase intending to create a simple first person role playing game.
I've coded a time management tool to track time elapsed in game, an inventory and ...
-2
votes
1answer
81 views
Libgdx array of Vector2 closest point
I have an array of objects. Their position is a Vector2 (x, y). I want to select the closest object, given a (x, y) coordinate (that represents an user touch on screen). Searching on web I found a few ...
2
votes
3answers
82 views
Get algorithm (Chance-to-Hit) from Input and Output
I am currently working on a chance-to-hit formula for an rpg. It consists of the following parts:
AttackSkill: The used Attribute of the Attacker (Range: 1-10)
AttackBonus: A Modifier from ...