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

learn more… | top users | synonyms

1
vote
1answer
57 views

2D World - How to represent my Game Objects graphically?

I want to code my own topdown 2D game with SFML+C++ that later shall have multiplayer functionality. Therefor I want to seperate the graphical and logical Parts of my game. All of my ingame Objects ...
1
vote
0answers
25 views

How to test which edge is going in and which edge is coming out in Weiler-Atherton Algorithm?

The basics of Weiler-Atherton Polygon Clipping Algorithm are: Start from the first edge which is going inside the clipping area. When an edge of a candidate/subject polygon enters the clipping area, ...
0
votes
1answer
55 views

Should a mesh consist of triangles or quads?

Currently I am a bit puzzled. I am writing my master thesis about procedural mesh and texture generation and for that I am writing a Blender Add-On to generate low poly planets with physical ...
0
votes
0answers
30 views

How to easily make an own polygon scene on a very low level? (no preferences) [closed]

I'd like to make a game/scene that is made out of a very low polygon level (e.g. poly bridge see picture below). Just because I like that style and additionally I believe it takes way less time then ...
0
votes
1answer
36 views

Vertex ordering with THREEjs's exporter

I'm using THREEjs's exporter to export a 2D polygon plane. The resulting JSON gives me the vertices. I'm trying to properly order these vertices as to make the actual polygon shape, without luck. ...
0
votes
1answer
66 views

Moving a Polygon based on Camera position [JAVA]

I am in the process of implementing TMX Maps (made in Tiled) for my game. In Tiled, I can create polygons, which leaves a tag, containing the points. Loading in these points to a Polygon ...
1
vote
1answer
48 views

How can I determine “exact moment” of collision with ray casting?

I'm currently brainstorming how the physics for my game engine is going to be handled. It's top down and I'm thinking of using ray casting for collision detection. I've reached two potential problems ...
0
votes
3answers
9k views

How do I make a circular hole inside an editable poly without boolean operations?

I have created a rectangle, then converted it into an editable poly. Then I created a circle and converted it to editable poly too. How to make it so that that the circle becomes a hole in the ...
3
votes
2answers
51 views

XNA/C# Convert polygons into tilemap

I'm currently working on my 2D survival game, where the world is infinite and generated by perlin noise. I wanted to also include biomes and this article interested me - ...
0
votes
0answers
25 views

Libgdx polygon ratating

I'm using polygons for collision detection. Here is the code: poly = new Polygon(verticies); poly.setOrigin(100,100); poly.setRotation(45); renderer.setColor(Color.GREEN); ...
0
votes
0answers
28 views

Blender to UDK 3 How to smooth Static Mesh

I've created a bed cover model for my small game and here is how it looks like in blender: http://imgur.com/T88Mnbs but whenever I import it to UDK it looks like this: http://imgur.com/OMXBno3 it ...
5
votes
5answers
9k 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 ...
2
votes
1answer
176 views

Creating polygons with separate outline/fill colors in OpenGL

Subject I am creating a terrain map with triangle strips and I would like to make the bodies of the triangles black, but have their outlines be colored. Problem The solution appears to be to draw ...
1
vote
1answer
110 views

Polygons requirement on mobile devices, around 3000 vertices?

I read on the unity documentation that a character should be between 300 to 1500 "polygons" on mobile devices to have good results. In Blender, we have "tris" or "faces", does "polygon" stand for the ...
1
vote
0answers
43 views

2D Polygon Collision push direction with large polygons

I have a collision detection/resolution implementation that uses the Separating Axis Theorem. Detection and such works perfectly fine, as well as resolution for most objects/shapes in my game. ...
0
votes
0answers
27 views

Efficient point-in test on static Polygons

I have some convex 2D polygons that are static and I would like to create an efficient point in test for them. I'm pretty new to this area of study so I just want to make sure I haven't made an error ...
5
votes
2answers
2k views

What is a good way to determine if a vector is between two other vectors in 2D?

I could operate with the angles, but I do not have the angles calculated yet (and would like to avoid having to do that). It would be possible to calculate and cache the local-coordinate-frame angles, ...
16
votes
2answers
4k 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 ...
0
votes
1answer
141 views

How to unsmooth polygons in 3dsMax

i am creating a game using a "Low Poly Art Style". Meaning there is an effect of polygons on the model. Whilst modelling a tree, a portion somehow became smooth and i continued to model not knowing ...
0
votes
0answers
81 views

Libgdx triangulation messing up triangles

I'm trying to triangulate a convex polygon. On the left are the triangulated polygons, while on the right is the convex polygon without triangulation. (both are wrong) but the one on the right is ...
0
votes
1answer
82 views

Tiled PolygonObjects rendering wrong in libgdx

this is how I render the polygons in Tiled this is how they get rendered in libgdx. Notice the top part of the triangles is straight instead of being hollow. here is the code I use to convert the ...
2
votes
1answer
154 views

What are some ways of making a game engine centered around the idea of drawing vector lines and polygons only? [closed]

I've always loved the look of games that just use simple lines and polygons for graphics. Rez is one of my favorite games, visually. I'm a programmer and designer first and foremost, and I'm horrible ...
5
votes
5answers
3k views

How can I test whether points are within a polygon?

I have 2D-points, which boundaries depict a polygon. The points are at integer positions (no fractions possible). Now I want to build an enumerator in C# that returns all points that are inside the ...
1
vote
2answers
121 views

What is the purpose for drawing vertices and shapes in OpenGL (or DX), if a game is using sprites?

Something I do not understand. All the tutorials on OpenGL, DirectX, or other, always show you how to draw a shape and then change its vertices, move it around and so on. But all the games I know ...
0
votes
2answers
432 views

Collision detection with multiple polygons simultaneously

I've written a collision system which detects/resolves collisions between a rectangular player and a convex polygon world using the Separating Axis Theorem. This scheme works fine when the player is ...
0
votes
1answer
151 views

Calculate polygon points from image

I'm new to OpenGL, so please excuse my brevity and/or lack of technical knowledge of the subject. I need some help with rendering a polygon on an OpenGL canvas (using C# w/ Tao). I understand that I ...
0
votes
1answer
49 views

Box2d polygon skin

In manual is see: Polygons inherit a radius from b2Shape. The radius creates a skin around the polygon. The skin is used in stacking scenarios to keep polygons slightly separated. This allows ...
0
votes
1answer
840 views

How to calculate ray polygon intersection? [duplicate]

I'm in a class where we are creating a ray tracer from the ground up in C++. I'm at a point where I can't seem to wrap my head around the math that is required to calculate the point at which a ray ...
2
votes
1answer
279 views

How do I convert a partially transparent image into polygons?

I'm using GLEE2D, a level editor allowing me to import images, scale them, rotate them, and position them onto layers and export the data into XML format. However, it does not tell me objects' ...
2
votes
1answer
153 views

How to create polygons from tilemap areas?

I'm currently working on a project which needs simple AI's to walk around using pathfinding. I'm trying to find a way to generate a polygon based on the connected tiles (explained below), an i'm ...
0
votes
0answers
37 views

Locate point of collision for two moving lines

I am trying to implement a continuous collision detection system that checks collision between two polygons for a certain time step, concave or convex. It makes the simplification that the path ...
1
vote
0answers
92 views

Cubic bezier polygon clipping

I have a large cubic bezier defined 2D polygon area which I need to render in DX11 real-time to create as many 4096x4096 textures as needed. An average control point count would be around the 12k and ...
1
vote
3answers
296 views

Why are huge polygon amounts bad?

It is always said that the polygon amount of a single modell must be as little as possible when it comes to realtime simulations such as computer games. (Or at least lower than when rendering a movie) ...
0
votes
1answer
644 views

libgdx custom shape overlap detecting

I'm writing my game on libgdx w/o any of those extensions like box2d and whatsoever. But right now I'm forcing problem with overlapping detection. I need to detect if bullet (which is always in ...
1
vote
1answer
1k views

How can I drag a polygon based on a mouse-moved event?

I have drawn a polygon in Java using java.awt.Polygon. I want to move that polygon with the mouse (by dragging it). I know that I have to use mouseDragged method in addMouseMotionListener. That way I ...
2
votes
2answers
269 views

Calculate laser bounce inside polygon

I am trying to calculate the reflection of a laser within a polygon. My current calculations are probably quite long-winded because I'm building on line intersection and other functions. The problem ...
0
votes
0answers
113 views

Create Fog of war polygon obstacles

I'm doing a game (At this moment it's only a prototype using love2D) and I made a fog of war using a mesh over other things, and actually it's working, but I've got some assets (decoration for the ...
2
votes
3answers
3k views

Polygons vs sprites rendering performance in Unity for windows phone 8

I'm currently building a windows phone 8 game with unity, having 111 (no more no less) sprites being updated each frames. I have a strong overhead in the profiler (70% to 90% minimum) I tried the ...
2
votes
2answers
112 views

How can I test if a point is behind a polygon in 2D?

In order to improve the performance of my visibility graph generator I am trying to figure out the following. Given the image below; is there a way to find out if a point is 'behind' the polygon? For ...
3
votes
2answers
413 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 ...
9
votes
3answers
904 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 ...
-2
votes
2answers
414 views

How to calculate a bounding rectangle of a polygon?

Polygon poly = new Polygon(); poly.getPoints().setAll(5d, 15d, 15d, 25d, 5d, 30d); How do I calculate the Polygon's height and width? There is no poly.getWidth() or poly.getHeight() method in ...
-2
votes
1answer
118 views

What do the 6 points stand for in Polygon().getPoints().setAll?

I have the following code to create a polygon: Polygon poly = new Polygon(); poly.getPoints().setAll(14d, 17d, 26d, 17d, 20d, 27d); // What do these mean? What do these 6 points stand for?
6
votes
1answer
285 views

Separating axis theorem with multiple polygons?

I am attempting to implement the separating axis theorem in C#. I have a function that can calculate the minimum translation vector between two polygons. However, I can't seem to create a function ...
1
vote
2answers
170 views

Moai: Clipping an image to a polygon

I'm using Moai SDK. I have an image and some random convex 2D polygons. I want to show only the parts of the image inside these polygons. Here's an example image: The same, shown only where the ...
2
votes
3answers
5k views

Mesh with quads to triangle mesh

I want to use Blender for making models yet realize some of the polygons are not triangles but contain quads or more (example: cylinder top and bottom). I could export the the mesh as a basic mesh ...
4
votes
4answers
194 views

What decrease of polycount should occur as a function of distance?

What decrease in polycount should occur as a function of distance. I make a terrain and I wounder what is the right formula to keep the "poly size"(the screen size) constant. Or is there some mental ...
4
votes
1answer
1k views

Polygon count budget

Is there any smart way to think about polygon budget relating to PC gaming today? My game will have one static 3d background scene and two fighters. No more enemies. I am thinking about having ...
2
votes
2answers
969 views

Would it be more efficient to handle 2D collision detection with polygons, rather than both squares/polygons?

I'm working on a 2D game engine and I'm trying to get collision detection as efficient as possible. One thing I've noted is that I have a Rectangle Collision collider, a Shape (polygon) collider and a ...
51
votes
2answers
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 ...