# Tagged Questions

A 2D shape consisting of straight lines that are joined to for a circuit.

4k views

### How can I get textures on edge of walls like in Super Metroid and Aquaria?

Games like Super Metroid and Aquaria present the terrain with the other facing parts having rocks and stuff while deeper behind them (i.e. underground) there's different detail or just black. I ...
4k views

### How do I handle collision detection so fast objects are not allowed to pass through walls?

I'm creating a 2d sidescrolling shooter, and I'm having a little trouble with collision detection for the bullets. Everything including the bullets are objects with their own polygons / update ...
5k views

### A* navigational mesh path finding

So I've been making this top down 2D java game in this framework called Greenfoot and I've been working on the AI for the guys you are gonna fight. I want them to be able to move around the world ...
10k views

### Any reliable polygon normal calculation code?

Do you have any reliable 3d polygonal face normal calculation code? Any language will do, I'll port it to make it work. Even if you find some code in a 3d game engine and post it here I'll be more ...
319 views

### Is there any heuristic to polygonize a closed 2D raster shape with n triangles?

Let's say we have a 2D image black on white that shows a closed geometric shape. Is there any (not naive brute force) algorithm that approximates that shape as closely as possible with n triangles? ...
1k views

### How can I tell whether an object is moving CW or CCW around a connected path?

Lets say we have a jagged shape: And two creatures moving along it's outline. Then we smooth the shape completely by pulling the corners out. We get this: It is easy to see now that Orange is ...
5k views

### How do I test if a circle and concave polygon intersect?

I have a polygon (sometimes convex, but often concave), and a bunch of circles with different radii. How can I find out if a circle is intersecting/overlapping with the polygon? I could split my ...
2k views

### How to create 2D game terrain?

Last month, I experimented a lot in game development using cocos2d for the iPhone, especially on moving and modifying sprites. However, vertices and polygons are still new stuff for me. I developed ...
543 views

### Subdividing a polygon into boxes of varying size

I would like to be pointed to information / resources for creating algorithms like the one illustrated on this blog, which is a subdivision of a polygon (in my case a voronoi cell) into several boxes ...
1k views

### How can I add and subtract convex polygons?

I have two 2D convex polygons overlapping each other. I am looking for an algorithm to subtract and add them. The result must be a single concave polygon or (even better) a set of biggest convex ones ...
2k views

### How do I align the matrix used in SpriteBatch and the matrix used in BasicEffect?

I'm writing a Windows tool that uses XNA and allows the user to place textures on the screen. I'm using a 'camera' for the SpriteBatch used to draw the textures, e.g: Matrix matrixForSpriteBatch = ...
219 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 ...
1k views

### How did they do it: Trine 2.5d terrain?

How did they make the terrain in trine? I think they took a polygon approach. It doesn't seem that they used a heightmap because it is in all three vectors, or a voxel method because it doesn't have ...
500 views

### How to make a stack stable? Need help for an explicit resting contact scheme (2-dimensional)

Previously, I struggle with the sequential impulse-based method I developed. Thanks to jedediah referring me to this paper, I managed to rebuild the codes and implement the simultaneous impulse based ...
443 views

### How can we match polygon data structure with a background image

I am referring to this fireball game. The ball will collide with background, which is in polygon form. I was wondering, how I can match my polygon data structure with the background image. Say, I ...
804 views

### Polygon editor to draw collision data over image

I need an editor to plot a polygon over the texture for of a ship in my game. It would look like this.. Where the red is the collision outline and the image is the texture. I want to store the ...
1k views

### I need help with 2D collision response (of stacking rotating polygons, with friction and gravity, for a game)

Hi I am looking for suggestions on how to write a collision response for game programming purpose (so not a scientific simulation). I am dealing with 2D polygons that are rotating, and I want them to ...
804 views

### Scan-Line Z-Buffering Dilemma

I have a set of vertices in 3D space, and for each I retain the following information: Its 3D coordinates (x, y, z). A list of pointers to some of the other vertices with which it's connected by ...
567 views

### Adding tolerance to a point in polygon test

I've been using this method which was taken from Game Coding Complete to detect whether a point is inside of a polygon. It works in almost every case, but is failing on a few edge cases, and I can't ...