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.

114 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
120 views

Please can someone point me in the right direction. I'm working on a slot game. that I'm having trouble figuring how to implement the probability function for. The game has a set of symbols that bets ...
MSD's user avatar
  • 51
5 votes
1 answer
1k views

I'm trying to create a simple rogue-like game in ncurses in a C program. The idea here is that, I'd parse a file like this: ...
TTEd's user avatar
  • 159
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
3 votes
0 answers
130 views

I am working on an implementation problem in which given an aircraft and the objective of the system is to find the quickest route (optimal in terms of time) from point A (contains the information of ...
IndyKuma's user avatar
3 votes
0 answers
90 views

I was wondering if there is a way to calculate the smallest distance between two 4-sided objects in space. In this specific scenario, the only information I know about both of them are the 4 points ...
Carmo's user avatar
  • 157
3 votes
0 answers
112 views

I created a 2D map using Perlin Noise. Based on the value on x,y, I determine an altitude and so a color to apply to my map (8 levels map). Now, I don't want my player to see the map but I would like ...
d3cima's user avatar
  • 131
3 votes
0 answers
96 views

I am currently working on a design that will incorporate an object that can change size and shape. For an example, I'll use a brick of clay. It starts out with normal dimensions of 1"x3"x6", but that ...
Tim S.'s user avatar
  • 131
3 votes
0 answers
329 views

How can I calculate texture coordinates of such geometry? The angle shown in the image (89.90 degree) may vary, therefore the geometry figure is changing and is not always such uniform.(maybe like ...
Cherkesgiller's user avatar
3 votes
0 answers
204 views

I'm currently developing 3rd person building game (as bacheleor thesis). I need to recognize constructed patterns co I can mark corresponding structure as some building (so player can start using that ...
Pavel Pája Halbich's user avatar
3 votes
0 answers
575 views

Overview: Simply put, I'm trying to make a zoom to cursor algorithm. This would normally be very simple, but the implementation of the camera is making it difficult. As the camera zooms in and out, ...
Monatrox's user avatar
3 votes
0 answers
106 views

I have a around 100k points on the screen (that might update). 2D points. The goal is to cluster them into groups, by a constant distance. Meaning, finding groups of points that the distance between ...
Raziza O's user avatar
  • 131
2 votes
0 answers
89 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
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
2 votes
0 answers
886 views

I'm trying to implement the Bowyer-Watson point insertion version of the Delaunay triangulation algorithm, but in 3D. I previously implemented the 2D version without problems, but when transitioning ...
Yattabyte's user avatar
  • 1,043
2 votes
0 answers
180 views

I'm working on the map editor of a game, where you can create a grid of hexagons to paint. An example of a grid of radius 6: What I want Once map creation is done, I would like to generate a mesh for ...
Luke B.'s user avatar
  • 1,031
2 votes
0 answers
2k views

TLDR: How to query all nearest neighbors with the least effort? (Iterating over a bigger neighboring area that's continuous and filtering out elements that are not immediate neighbors?) Suppose the ...
sarasvati's user avatar
  • 121
2 votes
0 answers
871 views

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. ...
Asik's user avatar
  • 555
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
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
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
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 vote
0 answers
89 views

I have a map with islands, and I need to detect whether the player is on an island or not. The player can be flying far above the island, so a fixed-distance raycast is not sufficient, and firing long ...
Robotex's user avatar
  • 251
1 vote
0 answers
83 views

I have a 3D game. The sound engine supports: playing ambient music to the player (two channels always the same) playing static sounds from a single position in space playing mobile sounds from a ...
Tooster's user avatar
  • 308
1 vote
0 answers
211 views

I am trying to create an outline from a collection of points. I found this solution for Convex Hull. I specifically picked this implementation: https://en.wikibooks.org/wiki/Algorithm_Implementation/...
Hector Llanos's user avatar
1 vote
0 answers
229 views

I want to play with deformation of tetrahedral mesh (soft-body simulation) but I need help with self-collision detection stuff. I found SOFA collision detection but I'm not sure that it fits for self-...
Daiver's user avatar
  • 201
1 vote
0 answers
262 views

First off, there seems to be a sparse number of audio programming tutorials out there so if anyone knows of some good resources I would be very appreciative. Now on to the topic at hand! I am using ...
Ryoku's user avatar
  • 187
1 vote
0 answers
68 views

I am working on a space themed game with space being a 2D pane. The player issue order by clicking on the coordinate for his/her ship to navigate to a certain point on the pane. The player ship can: ...
Saranpat Thanadsornsarn's user avatar
1 vote
0 answers
155 views

How do you create a random grid where the lines aren't orthogonal (and cells aren't a perfect square), but are warped? Here's an example of what I mean: (Credit: screenshot taken from a video by ...
Pandaqi's user avatar
  • 113
1 vote
0 answers
94 views

Imagine you had a world like Minecraft, but wanted to bake in some sort of physics (okay, I was playing minetest actually). For example, blocks under too much pressure might break, limiting how many ...
user1833028's user avatar
1 vote
0 answers
190 views

I've recently started looking into BSPs for real-time collision detection, and I'm now looking into improving the performance of my solution. The system that I've implemented is rather similar to the ...
Lolslayer's user avatar
1 vote
0 answers
216 views

I'm looking for a very simple way to put up 2 teams out of unspecified amount of players. So its not actually a standard matchmaking since it only creates one match out of the whole pool of queued ...
WardS's user avatar
  • 111
1 vote
0 answers
58 views

I read this: How do I handle packet loss in a client-server network model? ...But I'm looking for more advice. Currently I'm implementing my own lazertag vests. I'm programming hardware (8051 ...
Mike -- No longer here's user avatar
1 vote
1 answer
351 views

I am trying to emulate acceleration and deceleration in Unity. I have written to code to generate a track in Unity and place an object at a specific location on the track based on time. The result ...
Dan's user avatar
  • 185
1 vote
0 answers
383 views

I am documenting myself on collision detection algorithms. If I understand well, "sweep and prune" algorithm using frame coherence is powerful to detect object vs object collisions (almost as 0(n)). ...
Sylvain B.'s user avatar
1 vote
0 answers
313 views

I doubt many people want to grind for an item that has a 0.00001% chance to drop from a boss that takes 30 minutes to kill. I'd imagine there are certain factors that play into how rare an item should ...
John's user avatar
  • 119
1 vote
0 answers
55 views

I have N objects and I've done a routine to get the overall objects : min_x, max_x min_y, max_y min_z, max_z and, i have an ...
stighy's user avatar
  • 477
1 vote
0 answers
557 views

I am new to LOD-based techniques so please be lenient with your comments about my naive questions. Preface: My aim is a simple terrain renderer (preferred C++ and OGL) that is to load a height-map (...
Edward's user avatar
  • 11
1 vote
0 answers
64 views

I'm dealing with hardware that uses quads as its polygonal primitive. Not triangles. A triangle can be expressed by setting 2 of the 4 equal to each other for a degenerate quad. For the 3D engine, I'...
ijacquez's user avatar
1 vote
0 answers
82 views

Part of my game takes SVG polylines (which are just basically a set of x,y coordinates that define a multi-segment line) and converts them into 3D 'paths' (ie. a line created as a set of faces all ...
Steve Harding's user avatar
1 vote
0 answers
388 views

First of all I want you to forgive me when I make mistakes in my writing, english isn't my first language, and also: If this is the wrong place to ask, please direct me to the right place then. So, ...
Nocalora's user avatar
1 vote
0 answers
743 views

I am trying to implement Field of View algorithm in my game and I followed the great tutorial here : sight-and-light and here is what I got so far : As you can see it works fine for me :) And then I ...
user772349's user avatar
1 vote
0 answers
123 views

Scenario: A floating structure composes of many nodes (or in more visual meaning - a cubic block). Every node is snapped to the same 3D grid. (similar to a minecraft castle) There are external ...
javaLover's user avatar
  • 227
1 vote
0 answers
218 views

I'm trying to create a 2D game with a traffic intersection: My car game-objects need to pass through the intersection without colliding with each other, and without stopping, if possible. How can I ...
unfamous's user avatar
  • 111
1 vote
0 answers
288 views

I was recently given an assignment to generate a mesh from code, in Unity. At runtime, the player will click at random positions on the screen. An array will store all these points. There must be ...
Shraa1's user avatar
  • 434
1 vote
0 answers
491 views

I'm trying to generate an endless 2d terrain. So the terrain isn't random per say as the random function I'm using is a hash based on an X,Y coordinate. ...
Justin808's user avatar
  • 213
1 vote
0 answers
144 views

I am developing a Pocket Civ game engine. (You can check the process at www.pocketciv.com). Basically there is maximum of 8 Areas (round nodes in the pic) that have Tribes (number inside the node). So ...
Juho Rutila's user avatar
1 vote
0 answers
227 views

what is the simplest algorithm for collision detection that respects the following requirements: The collision is only between cubes that are always aligned with the axis of the world (not rotated). ...
Luis Alves's user avatar
1 vote
0 answers
558 views

I am using libnoise in C++ taken and I have some problems with getting coherent noise. I mean, the noise produced now are completely random and it doesn't look like a noise. Here's the image produced ...
Doodlemeat's user avatar
1 vote
0 answers
419 views

Context: I am working on a 2D Destructible Terrain engine for Cocos2D with Box2D. All images, when a level loads, have their border's traced and cached for the purposes of forming Box2D b2EdgeShape ...
Paul Renton's user avatar
1 vote
0 answers
192 views

Any suggestions on how to get more 'jagged' results like linear interpolation gives with value noise using a faster algorithm concept like simplex noise? Simplex noise I haven't spent enough time ...
Mythics's user avatar
  • 1,486