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
64 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
152 views

I'm making a game where players need to spell English words (including American and British English) using a limited set of 8 distinct letters, which can be re-used multiple times. How would I go ...
Woodrow Bonewright'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
1 answer
131 views

I have a hexagon grid with cubic coordinates. I want to calculate clockwise all border hexagons for a given movement range. At the moment, I am iterating every neighbor that is not in the range and is ...
Jachuc's user avatar
  • 45
0 votes
1 answer
230 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
189 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
259 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
0 votes
0 answers
124 views

I'm developing a finite state machine AI where some interaction with the NPC can be made through a popup window with some choices. The image below shows how it looks: The player (on the right in this ...
philB's user avatar
  • 333
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
1 vote
1 answer
247 views

Brief I have spent probably the last year thinking about implementing an Octree data structure into my C++ game engine project for scene management and frustum culling of lights and meshes. Right now ...
Sharpie's user avatar
  • 51
2 votes
2 answers
134 views

For my collision system I’m using a boids-like method that works fine for "small" obstacles (like other characters) where the character can turn slightly left or right to avoid the obstacle ...
philB's user avatar
  • 333
6 votes
4 answers
728 views

i am making a 3d tactics game, visually similar to something like final fantasy tactics. it's tile based, with units able to move up and down the level onto buildings and up staircases and what have ...
graveyard's user avatar
2 votes
2 answers
403 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
40 votes
9 answers
14k views

I'm working on a game which requires players to draw a line from a point A(x1,y1) to the other point B(x2,y2) on the screen of an Android device. I want to find how well that drawing fits to a ...
user3637362's user avatar
0 votes
0 answers
88 views

I am attempting to solve a MAPF-like problem using the Conflict-Based Search (CBS) algorithm. My specific problem is based on a grid graph where some edges are not connected. For example, in the ...
Runfeng Yu's user avatar
2 votes
2 answers
12k views

I'm currently researching, for a summary paper, the different variants of A* search algorithm and how they are used in games. I stumbled across the name HPA*. I've heard that it's much faster than ...
Ixion Chowdhury's user avatar
1 vote
2 answers
384 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
62 votes
9 answers
58k views

What is a good texture packing algorithm? Technically, bin packing is NP-hard, so a heuristic is what I'm really after.
deft_code's user avatar
  • 7,642
7 votes
2 answers
10k views

I'm developing an RPG and I want to do the damage calculation in my game. I have for example the following situation: Player 1 Stats: ...
Crazy's user avatar
  • 197
0 votes
1 answer
140 views

This is definitely a "doing for the sake of learning" question, so apologies in advance for that, but how would you go about using the Gizmos class to draw a basic wireframe shape? I'm ...
NJJ_002's user avatar
  • 47
82 votes
5 answers
39k views

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 ...
pek's user avatar
  • 2,827
2 votes
2 answers
280 views

I am looking for an algorithm that can find separate rooms inside a set of walls, by determining which openings should be considered doorways between adjacent rooms. All is defined on a grid. My main ...
Jamek's user avatar
  • 21
10 votes
3 answers
3k views

I'm currently working on a 2D Age of Empires style RTS game. Here's my problem: I'm currently using the A* algorithm (via Path finding package) to move my units. When you select a "group" of ...
GauthierBee's user avatar
69 votes
7 answers
22k views

I would like to understand on a fundamental level the way in which A* pathfinding works. Any code or psuedo-code implementations as well as visualizations would be helpful.
Daniel X Moore's user avatar
1 vote
1 answer
169 views

I am developing a third-person shooting style game and I want to implement an armor system. The system that I have envisioned does not reduce the damage to 0, but by half. So the incoming damage is ...
Daniel Rudy's user avatar
0 votes
2 answers
164 views

I am trying to make an terrain editor. The terrain is described by a grayscale height map. When I click at somewhere in the terrain map with the brush, the terrain should raise or lower about that ...
martinrhan's user avatar
1 vote
0 answers
216 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
2 answers
156 views

I have some difficulties with my basic collision system in croweded places as it is based on simple box to box or radius detection. Sometimes characters are stuck to something or stopped because there ...
philB's user avatar
  • 333
4 votes
1 answer
595 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
0 votes
2 answers
233 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
2 votes
0 answers
682 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
-1 votes
1 answer
208 views

Could you please provide guidance on how to create the curved part? regard,
Saeed Asmani's user avatar
23 votes
3 answers
10k views

I'm working on trying to improve the pathfinding for my game's enemies. Right now, they basically just constantly move towards the player's exact position by calculating the angle between themselves ...
Darin Beaudreau's user avatar
0 votes
0 answers
105 views

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

I am making a game similar to Volfied using Unity: The player outlines an area using straight lines, either horizontal or vertical. I am stuck at the algorithm to decompose the area into rectangles ...
nicklowkc's user avatar
  • 101
0 votes
1 answer
171 views

In a game like a simple adventure or a room escape game, I would like to know if there are established algorithms to check for simple constraints on the layout. I would like some pointers so I could ...
john_smith's user avatar
0 votes
1 answer
2k views

I am kind of a beginner of Unity and I am trying do work on a grand strategy game. I already have a province map, colored by unique rgba for each province, looks like something below: I know that the ...
Zizheng Yang'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
0 answers
321 views

I have an arbitrary array of points that describe vertices of the polygon 2D, they ar in order. To generate plane mesh for that, I need to generate tris. For something like circle/hexagon/square it is ...
Kirikan's user avatar
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
34 votes
12 answers
10k views

I am making a simple tile-based 2D game, which uses the A* ("A star") pathfinding algorithm. I've got all working right, but I have a performance problem with the search. Simply put, when I click an ...
user2499946's user avatar
0 votes
0 answers
153 views

I want to know what's the best way to combine individual squares on a grid (tilemap) into larger rectangles. I need this to simplify my physics collision detection/resolution, so that collision doesn'...
JorensM's user avatar
  • 101
56 votes
1 answer
41k views

I have been looking at shaders found here shadertoy.com and most of the cool ones have noise and raymarch in common. I do not understand the source code at all but I really want to. How do these ...
jmasterx's user avatar
  • 2,099
0 votes
1 answer
114 views

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

I want to make a simple maze with colour-coded cells: white denotes a blank space, black denotes a wall, green denotes source and red denotes destination. So, my idea was to write an array of ...
MAGS94's user avatar
  • 157
1 vote
1 answer
247 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
52 votes
11 answers
59k views

I'd like to read up on path finding algorithms. Is there a primer available or any material or tutorials on the Internet that would be a good start for me?
0 votes
1 answer
367 views

I want a game object to keep its brightness (modulating mainColor, like mainColor * brightness) most of the time, but sometimes ...
OtakuFitness's user avatar
3 votes
1 answer
3k views

So, I need to be able to make a picture slowly transition into another picture, not as a transparency fade, but as a morph. And I need that in real time. More on "morphs": When you outline ...
user179283's user avatar
7 votes
1 answer
1k views

I'm attempting to create a tillable hex shaped terrain map using c++. As part of the process I'd like to use perlin noise, but it seems that in order to make it tillable I'll need to generate it 5 ...
Knackname's user avatar
  • 103

1
2 3 4 5
24