Questions tagged [recursion]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
158 views

Problems with recursive backtracking algorithm for a 3D maze

The algorithm really shines when craving process get's stuck (only visited nodes around), then it backtracks and creates alternative routes for the maze. That's kind of the point of a maze, that there ...
Janis Taranda's user avatar
0 votes
2 answers
753 views

Recursively find neighbors

I'm making a Bubble Shooter game in Unity. I came to the point where I can hit another bubble and it destroys all of its neighbors. Now I'm trying to use recursion to destroy all of its neighbors ...
e-mag's user avatar
  • 3
0 votes
1 answer
237 views

Ensuring a Recursive method completes in one update tick?

OK so I have a method that calls itself as this was the only way I could think to get the behaviour I needed. Its a tetris clone i am making and this method is for checking for full lines across X ...
Big T Larrity's user avatar
1 vote
2 answers
595 views

Recursively calculate possible pathway on a grid depending on max walk distance

I have a character that is placed on a grid. It has a variable maximum walking distance. Grid fields can be walkable or not walkable. As the character may has to walk around certain not walkable ...
xeetsh's user avatar
  • 59
1 vote
1 answer
526 views

Efficiently calculate 2d world position based on parent(s) recursively

I am writing a small 2d html5 game engine in javascript that relies on the concept of a hierarchy. The scene is the root node or entity, and its children make up the game objects. These children can ...
clabe45's user avatar
  • 408
0 votes
2 answers
961 views

Recursively get all combinations of tiles

Recursively get all combinations of tiles For a game, I need to calculate all possible combinations of a set of a grid in a 5x5-grid and do some calculations on these. Some combinations of tiles ...
Runar's user avatar
  • 111
1 vote
1 answer
2k views

Recursive Unity Coroutine

I have a co-routine which is heavily reliant on calling itself to get the task done. I have tested it and the code works fine, the problem is that the co-routine will return every time that it enters ...
user3797758's user avatar
  • 3,641
0 votes
1 answer
157 views

Pathfinding function crashes Unity?

I've been trying to add this pathfinding function to my program, but when I run it, it just crashes. I've read other threads and this might be an infinite loop, but I don't see where it would be other ...
Calvin B's user avatar
3 votes
4 answers
3k views

Calculate average of arbitrary amount of quaternions (recursion)

Simply calculate the average for 2 Quaternions should work like follows right? : ...
TobiasW's user avatar
  • 987
0 votes
2 answers
75 views

Recursive method causes an OutOfMemory error [duplicate]

If a GameObject in my game has a special ability it triggers it, but I want all the special GameObjects that this GameObject affects to also trigger their abilities, for example if a bomb hits some ...
Milen Pivchev's user avatar
1 vote
1 answer
95 views

Method causes OutOfMemory error

If a GameObject in my game has a special ability it triggers it, but I want all the special GameObjects that this GameObject affects to also trigger their abilities, for example if a bomb hits some ...
Milen Pivchev's user avatar
1 vote
1 answer
133 views

Java - Trouble with recursion and rectangle placement

I am using Android API's and using the RectF class for rectangles. I have a list of blocks that are on the screen at one time. Each block is given a random position, and then I go through all of the ...
Kyle Jensen's user avatar
0 votes
1 answer
3k views

How to iterate a sprite group correctly in Pygame avoiding "maximum recursion depth exceeded"?

I'm making a game and I have almost finished it, but I'm usually finding the error RuntimeError: maximum recursion depth exceeded when I iterate a sprite group. ...
Drumnbass's user avatar
  • 295
10 votes
2 answers
1k views

How to determine if a 3D voxel-based room is sealed, efficiently

I've been having some issues with efficiently determining if large rooms are sealed in a voxel-based 3D rooms. I'm at a point where I have tried my hardest to solve the problem without asking for help,...
NigelMan1010's user avatar
2 votes
1 answer
170 views

Pathfinding results in false path costs that are too high

I'm trying to implement pathfinding in a game I'm programming using this method. I'm implementing it with recursion but some of the values after the immediate circle of tiles around the player are ...
user2144536's user avatar
3 votes
1 answer
1k views

Implement Negascout Algorithm with stack

I'm not familiar with how these stack exchange accounts work so if this is double posting I apologize. I asked the same thing on stackoverflow. I have added an AI routine to a game I am working on ...
Dan's user avatar
  • 143
3 votes
2 answers
496 views

Tessellating/Subdividing a quad

I am creating a quad that starts as a single quad, then divides itself multiple times (from 1 to 4 to 16 to 64 to 256 and so forth) but I have encountered an issue. When I get to 64 sub divisions only ...
Darestium's user avatar
  • 1,154
14 votes
4 answers
8k views

How can I implement voxel-based lighting with occlusion in a Minecraft-style game?

I am using C# and XNA. My current algorithm for lighting is a recursive method. However, it is expensive, to the point where one 8x128x8 chunk calculated every 5 seconds. Are there other lighting ...
user avatar
4 votes
1 answer
2k views

Issue with implemented Minesweeper algorithm

So I'm attempting to learn Python by way of Minesweeper. I've got experience with SDL, so I figured playing around with PyGame sounded like a fun way to learn the syntax of the language. Anywho, I'm ...
erik's user avatar
  • 1,378