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.
2
votes
1answer
150 views
Level design algorithm/pattern for Linerunner etc
I am wondering: how does someone make levels for a game like Linerunner or any other game that uses similar patterns?
About Linerunner (game)
You are a stick man running, you have to jump or crawl ...
6
votes
2answers
226 views
Algorithm to select all cells inside rooms/regions
I have a 2d game map consisting of several 'rooms'
For example, here is a 2D map grid: (Brown cells = wall tiles)
If I click on a tile (that isn't brown), I would like to obtain an array of all ...
2
votes
2answers
252 views
Derive a algorithm to match best position
I have pieces in my game which have stats and cost assigned to them and they can only be placed at a certain location.
Lets say I have 50 pieces.
e.g.
Piece1 = 100 stats, 10 cost, Position A.
Piece2 ...
35
votes
2answers
1k views
Procedural… house with rooms generator
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 ...
2
votes
3answers
194 views
Complex Scaling
I've been trying to figure this thing out for weeks now, but with no luck.So, I am creating this program in WindowsForms and Xna, that allows users to create a 3D room. By draging and customizing ...
1
vote
1answer
140 views
Using circles to create a sphere
I've been working on creating spheres in a 3D space recently, and have successfully created cylinders. I've just run into a little problem. For some reason, my "Spheres" end up looking like very thick ...
3
votes
1answer
59 views
Retrieve outer most points on a 2d graph
G'day everyone,
I have a 2d graph which has some points plotted on it.
What I need to do is get only the outer most points so that I can connect them up (isn't really relevant).
What I can't seem ...
1
vote
1answer
300 views
Tongue pull effect
I've been searching on the net for several days and can not find nothing about this effect. Even a name for this effect. I want to make a character that can use his tongue to pull objects objects it ...
2
votes
0answers
160 views
Catmull Rom Spline - Constant Speed
Given the equations found in the answer here:
Determine arc-length of a Catmull-Rom spline
How would one A) Apply this to a 3D Catmull-Rom Spline, and B) write A out programmatically (for the math ...
2
votes
1answer
251 views
How should I go about randomizing levels in a “runner” game?
I'm working on a runner type of game (basically it's a never ending run through hordes of enemies and platforms and whatnot). 2d platformer view.
Should I random a bit of map every now and then? Few ...
6
votes
1answer
267 views
Elegant autotiling
I'm looking for information about how people implement autotiling in their tile-based games. So far I have always improvised it with a bunch of hardcoded "if ... else ..." statements, and now I ...
-1
votes
1answer
151 views
simple escape algorithm: enemy escapes when hero approches
I need some clues on a "escape" algorithm.
My scene a 2D rectangle (0,0,1000,1000)
I have enemy sprites on this scene. They are immobile until distance from hero <100.
If distance<100, enemy ...
0
votes
1answer
163 views
Iterating 1D array and getting 2D tile position
I know I'm missing something very obvious here, but I have a 1D array that contains integers.I have a map that is 30 x 30 and the center coordinate is 0,0 (This is actually 3D, but I'm essentially ...
2
votes
4answers
531 views
Efficient path-finding on 2D tile-based multilevel map
It's a question I've been thinking about for some time... How do you effiently find a path on a 2D tile-based multilevel map? The map I use, for example, is 2048 on 2048 tiles wide. It has 14 levels ...
0
votes
4answers
426 views
Storing huge 2D tiled map in a txt file
I'm working on a global startegy game that uses a 2D tiled map. The map is to be 8000x8000 tiles large (this size is fixed, the map stays the way it is throughout the game), since I'm covering a large ...
6
votes
1answer
144 views
How to do score systems, combos, multipliers, chains, etc
I am designing a game, but I am having some trouble implementing a decent score system. Basically I have nodes with two different possible characteristics: color and shape. Since the player click from ...
3
votes
2answers
201 views
Syncing game states in a multiplayer RTS game
I'm working in a group with 2 friends on our Gr. 12 final project for programming. We're making a multiplayer RTS game. I've been assigned to the networking section of the game, and none of us have ...
6
votes
4answers
419 views
Ideas for attack damage algorithm (language irrelevant)
I am working on a game and I need ideas for the damage that will be done to the enemy when your player attacks. The total amount of health that the enemy has is called enemyHealth, and has a value of ...
2
votes
1answer
339 views
2D/Isometric map algorithm
First of all, I don't have much experience on game development but I do have experience on development. I do know how to make a map, but I don't know if my solution is a normal or a hacky solution. I ...
4
votes
2answers
154 views
Matchmaking by user-supplied parameters
I'm looking for matchmaking algorithm for a 1 vs 1 online game. Players must not be matched by their skill level, but instead by some specific filters set by the players.
Each player sends a request ...
1
vote
1answer
153 views
Keeping the meshes “thickness” the same when scaling an object
I've been bashing my head for the past couple of weeks trying to find a way to help me accomplish, on first look very easy task. So, I got this one object currently made out of 5 cuboids (2 sides, 1 ...
1
vote
2answers
282 views
Reversi/Othello early-game evaluation function
I've written my own Reversi player, based on the MiniMax algorithm, with Alpha-Beta pruning, but in the first 10 moves my evaluation function is too slow. I need a good early-game evaluation function.
...
1
vote
0answers
65 views
Performance issues with visibility detection and object transparency
I'm working on a 3d game that has a view similar to classic isometric games (diablo, etc.). One of the things I'm trying to implement is the effect of turning walls transparent when the player walks ...
8
votes
1answer
201 views
Showing range on hexagonal grid
Here is the situation.
I have hexagonal board,and a unit on it,with speed or move value 4.Diffrent terrain has a diffrent cost.When i click on the unit,game should show me a move range.
My solution ...
6
votes
3answers
754 views
isometric drawing order with larger than single tile images - drawing order algorithm?
I have an isometric map over which I place various images. Most images will fit over a single tile, but some images are slightly larger. For example, I have a bed of size 2x3 tiles.
This creates a ...
2
votes
2answers
151 views
Basic modelling of radar
I'm currently researching how to model/simulate radar for my naval simulation.
Since the emphasis is on modelling ASW or submarines in general, I need only a basic radar model - at least for the ...
0
votes
1answer
103 views
Build a view frustum from angles
I have 4 angles, left, right, top & bottom. These angles are in degrees. They define the angle between the forward vector and the corresponding side. I am trying to use these to calculate the ...
2
votes
2answers
132 views
Prevent collisions between mobs/npcs/units piloted by computer AI : How to avoid mobile obstacles?
Lets says we have character a starting at point A and character b starting at point B. character a is headed to point B and character b is headed to point A. There are several simple ways to find the ...
7
votes
2answers
381 views
How do display a “mucus spreading” effect in a 2D environment?
Here is an example of such a mucus spreading. The substance is spread around the source (in this example, the source would be the main alien building).
The game is starcraft, the purple substance ...
5
votes
1answer
98 views
trapped inside a Graph : Find paths along edges that do not cross any edges
This is a graph based platformer level and the round shapes are creatures.
I am looking for a path traveling along edges that does not cross other edges(To simulate the creature crawling on the ...
1
vote
1answer
100 views
Help with Collision Resolution?
I'm trying to learn about physics by trying to make a simplified GTA 2 clone.
My only problem is collision resolution. Everything else works great.
I have a rigid body class and from there cars and ...
0
votes
0answers
265 views
What is the best way to implement collision detection using Bullet physics engine and a track generated from a curve?
I am developing a small racing gam, the track is generated from a curve.
As said above, the track is generated, but not infinite. The track of one level could fit with no problem in memory and will ...
1
vote
2answers
209 views
What's wrong with this turn to face algorithm?
I implement a torpedo object that chases a rotating planet. Specifically, it will turn toward the planet each update. Initially my implement was:
void move() {
vector3<float> to_target ...
1
vote
1answer
214 views
How to correct shooting in touch-screen shooting games?
Assume a shooting game for iPhone that the character shoot toward where player has touched.
But as we know, There may be fault in touching screen by player and it conclude to bad game play and low ...
2
votes
4answers
356 views
Detecting long held keys on keyboard
I just want to ask if can I check for "KEY"(keyboard) that is HOLD/PRESSED for a long time, because I am to create a clone of breakout with air hockey for 2 different human players.
Here's the ...
1
vote
2answers
319 views
Rotating multiple points at once in 2D
I currently have an editor that creates shapes out of (X, Y) coordinates and then triangulate that to make up a shape of those points.
What will I have to do to rotate all of those points ...
3
votes
1answer
110 views
Algorithm for approximating sihlouette image as polygon [duplicate]
Possible Duplicate:
Is there any heuristic to polygonize a closed 2D raster shape with n triangles?
I want to be able to analyze a texture in real time and approximate a polygon to ...
10
votes
3answers
373 views
Having a list of rooms with theirs connection to each other, how do I find isolated room groups?
I'm trying to create a small roguelike and went as far as random generating rooms and corridors. Each room is an instanced object and contain an arraylist of the others rooms connected by a corridor.
...
2
votes
3answers
197 views
Polygonal Triangulation - algorithm with O(n log n) complexity
I wish to triangulate a polygon I only have the outline of (p0, p1, p2 ... pn) like described in this question: polygon triangulation algorithm and this webpage: ...
5
votes
2answers
325 views
How can I generate a navigation mesh for a tile grid?
I haven't actually started programming for this one yet, but I wanted to see how I would go about doing this anyway.
Say I have a grid of tiles, all of the same size, some traversable and some not. ...
3
votes
2answers
142 views
how to calculate intersection time and place of multiple moving arcs
I have rocks orbiting moons, moons orbiting planets, planets orbiting suns, and suns orbiting black holes, and the current system could have many many layers of orbitage.
the position of any object ...
2
votes
2answers
490 views
Data structure for bubble shooter game
I'm starting to make a bubble shooter game for a mobile OS. Assume this is just the basic "three or more same-color bubbles that touch pop" and all bubbles that are separated from their group ...
10
votes
2answers
370 views
Finding shapes in 2D Array, then optimising
I've just been allowed an image...The image below from my game shows some darkened blocks, which have been recognised as being part of a "T" shape. As can be seen, the code has darkened the blocks ...
1
vote
1answer
86 views
Game window systems and internal frames
I don't know if this is a valid question, but: What kind of window manager do games use which have internal frames (Frames inside frames)? Does this differ between the programming languages (Are e.g. ...
1
vote
1answer
317 views
Generating random tunnels
What methods could we use to generate a random tunnel, similar to the one in this classic helicopter game? Other than that it should be smooth and allow you to navigate through it, while looking as ...
2
votes
1answer
200 views
Object detection in bitmap JavaScript canvas
I want to detect clicks on canvas elements which are drawn using paths. So far I have stored element paths in a JavaScript data structure and then check the coordinates of hits which match the ...
3
votes
1answer
367 views
AI Game Programming : Bayesian Networks, how to make efficient?
We know that AI is one of the most important part of Game Programming. Bayesian networks is one of the core part of AI at Game Programming.
Bayesian networks are graphs that compactly represent the ...
1
vote
1answer
197 views
Ideas for 2d fire simulation [closed]
I want to simulate a fire in a flat and non flat* surface (fire spread modelling).
I've seen that cellular automata is one of the algorithms that can be used. Are there other algorithms that would be ...
5
votes
2answers
681 views
Diamond-square terrain generation problem
I've implemented a diamond-square algorithm according to this article:
http://www.lighthouse3d.com/opengl/terrain/index.php?mpd2
The problem is that I get these steep cliffs all over the map. It ...
1
vote
1answer
286 views
Negamax implementation doesn't appear to work with tic-tac-toe [closed]
I've implemented Negamax as it can be found on wikipedia, which includes alpha/beta pruning.
However, it seems to favor a losing move, which should be an invalid result.
The game is Tic-Tac-Toe, ...
