Skip to main content

Questions tagged [algorithm]

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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
58 views

The stated assertion that a point outside some intermediate Minimum Enclosing Sphere is on the boundary of the final Minimum Enclosing Sphere seems unsupportable. It is true only for the first point ...
WernerJuengst's user avatar
4 votes
1 answer
241 views

I'm prototyping a train simulator and running into design issues with physics and train car movement. The scope is similar to games like Run8, SimRail, or Derail Valley. Requirements: Realistic train ...
b2soft's user avatar
  • 143
0 votes
0 answers
76 views

Let's begin with a picture: I am currently making a turn-based strategy game set in space where you can settle colonies and have to transfer minerals from the colonies ("foo", "bar&...
Applekini's user avatar
  • 8,543
0 votes
1 answer
217 views

I'm making an open source turn based JRPG in Godot 4.3, I want any programmer to be able to very easily create new enemies with different behaviors by simply customizing export variables in the editor,...
buzzbuzz20xx's user avatar
3 votes
2 answers
188 views

I would like to procedurally-generate ant farm-style layouts on a grid: long horizontal spaces connected by short vertical spaces. Also similar to cave systems formed by water erosion. Every tile in ...
user avatar
2 votes
2 answers
255 views

The permutation maps are usually the numbers from 0 to 255 arranged in a random order. If I were to use a cryptographic hash function to convert a string, and then use the result's individual integers ...
user avatar
1 vote
2 answers
370 views

I'm trying to implement A*. I'm storing the queue of nodes to visit in a min-heap, and I'm seeing the same node being added more than once to it (with different priority). Wikipedia's pseudocode ...
HolyBlackCat's user avatar
  • 2,054
2 votes
2 answers
401 views

It seems like every procedural dungeon generation tutorial focuses on how to avoid overlapping rooms, so how would one go about intentionally overlapping those rooms instead, possibly treating the ...
NJJ_002's user avatar
  • 47
1 vote
0 answers
215 views

How would I go about automatically generating the layout of a skill tree? Skill tree nodes have at least one parent, but they can have more. Ideally I'd have a root node that recursively creates its ...
409's user avatar
  • 11
0 votes
0 answers
104 views

Say I have a canonized struct: { health: 100, items: ["apple", "knife"], name: "Bobby" } "Canonized" here means ...
Ibrahim's user avatar
  • 196
0 votes
1 answer
103 views

I've got the first part of the code working. It iterates and does a check through the gameobjects to find the furthest nav point to hit. Then it calculates path to see if its valid or not. Now I'm ...
WestMansionHero's user avatar
0 votes
0 answers
110 views

I'm doing what this thread is doing except that it's not very satisfactory. What this does is finding the "closest" attacking position. But typically you want the attacker to attack from as ...
Weikai Wu's user avatar
0 votes
2 answers
228 views

I am developing mobile game and I am stuck on an issue regarding proper player stats scaling based on level. As a parameters for the computation we have: base XP value multiple increment values (for ...
Jakub M's user avatar
0 votes
1 answer
110 views

Given a Vector2(x,y) that represents an object's velocity, like so: ...
CAOakley's user avatar
  • 101
1 vote
0 answers
54 views

I want to optimize a bidirectional node traversal algorithm. Because the node is bidirectional, it may cause an infinite loop. The current algorithm uses memory records. However, memory writing will ...
noodle_run's user avatar
2 votes
0 answers
87 views

I have a 2D tiles map. Some tiles are water (black tiles on image). I can compute which tiles are coastal when it's 4 neighbors are not water (black dots on image). I would like to compute coastal ...
bux's user avatar
  • 159
1 vote
1 answer
245 views

I have created an object that is comprised of two bezier curves (constructed of an identical finite segments equal to a variable named resolution). The two curves ...
Magikarp's user avatar
4 votes
1 answer
594 views

I have a hex grid of 10000 cells (100x100). The player can grab a cell next to one of his cells (borders). If the player has formed a ring after placing a cell, I want to get a list of cells that ...
ArtemiZ Studio's user avatar
1 vote
2 answers
344 views

I'm currently in the process of writing my own chess engine in java and am having a little trouble with negamax. I've opted for negamax since its easier on the eyes and reduces the number of lines of ...
AF_'s user avatar
  • 11
2 votes
0 answers
675 views

I'm making a game where the terrain is infinite and procedurally generated. I'm using Perlin noise with octaves to make the terrain shape. I would like to implement some sort of erosion to make the ...
Vincent's user avatar
  • 73
0 votes
1 answer
57 views

I'm trying to solve a challenge with linearity of my animation. Let say we have a Tug of war mechanic. One team is much stronger and it moves line from point A(0) to point B(10) with a speed of 1 unit ...
Ardoos's user avatar
  • 29
0 votes
1 answer
298 views

I have a 2d array with ground represented by 0s and the walls represented by 1s. Player can use a LOOK command or a MOVE command. Look command returns a 5x5 array centered around the player and the ...
mathsymaths's user avatar
1 vote
1 answer
151 views

Let's say I have regiments of varying sizes, 500, 1000, 4000 troops. I want to distribute 1000 troops worth of losses to them so that in aggregate they lose 1000 troops. I want to do it as a ...
Harry's user avatar
  • 167
0 votes
0 answers
62 views

I have a bicycle with suspension and need to find the contact point of the wheel on the "road". If the front fork was pointing straight down, it would be as easy as doing a raycast down the ...
Charl Cillie's user avatar
1 vote
0 answers
50 views

Consider the below images get from the Final Fantasy VII and Alone In The Dark games: I assume that the above scenes are composed by a set of layers composing the background image (allowing thus the ...
Jean-Milost Reymond's user avatar

1
2 3 4 5
24