A geometrical description of the part of that space occupied by the object, as determined by its external boundary – abstracting from location and orientation in space, size, and other properties such as colour, content, and material composition.
0
votes
1answer
63 views
How do I determine if a tiled shape is closed, but without checking diagonal connections?
This is a follow-up to a similar question Determine if a set of tiles on a grid forms an enclosed shape. My needs are similar, but I do not need to check diagonal connections. I am also using Unity. ...
0
votes
0answers
20 views
FInding out if a shape is enclosed by other shapes
I'm trying to programmatically work out if a 'core' shape is surrounded with other shapes and thus no space exists around it. Here's an illustration of what I mean (ignore white gaps, they are just to ...
8
votes
1answer
136 views
Snapping shapes together in game
I'm trying to work out how to snap shapes together the player may move around on a canvas.
As the square approaches the other object, I want to pull that shape in (given a certain proximity) and have ...
2
votes
2answers
68 views
LibGDX: Is there a maximum amount of vertices for a PolygonShape?
When you use PolygonShape.set(Vector2[] vertices), is there a limit of vertices of the array which is passed to the method?
2
votes
1answer
148 views
How to create “broken glass” animation?
I have started making a 3D game in Unity5 that consists in avoiding obstacles. It is very easy but I want to add a collision effect when I collide on the wall.
I would like to slice the screen into ...
1
vote
1answer
253 views
Use Stage's draw() method to invoke Actor's draw method in Libgdx
Question :
In the following snippet, I wish to draw different shapes such as rectangles, circles, triangles etc. I will be creating different class files for each of such objects, as I did for ...
0
votes
0answers
39 views
ChainShape in Box2D
I recently began to learn libgdx and I am stuck at a problem with the CainShape of Box2D.
My first goal is to simply create a box with a ChainShape.
In order to achieve that, I added four Vector2 to ...
5
votes
4answers
274 views
Creating force shields: the most efficient way of deforming/reshaping a simpler convex mesh so it envelopes a complex mesh?
So, the best way I can think of how to explain what I need is the following (images used here are just random images found trough google image search).
What I am trying to create during run-time is ...
2
votes
1answer
609 views
How can I add a transparent overlay to a UI in libGDX?
I am attempting to use the following code
shapeRenderer.begin(ShapeRenderer.ShapeType.Filled);
shapeRenderer.setColor(3,3,3,.3f);
shapeRenderer.rect(0,0,gameWidth,gameHeight);
...
2
votes
2answers
134 views
Getting the topleft, topright, bottomleft and bottomright points of a shape in Unity3D?
I have a 4-point shape that is defined in screen space by the user.
They can draw the 4 points, one at a time, in any order they wish.
I am using a List of Vector2's to store the screen co-ordinates ...
0
votes
1answer
159 views
Algorithm to fill a shape defined by 4 pixel points?
I'm developing an application in Unity3D where a user can define 4 pixel points on screen, and what I would like to do is fill this shape with pixels using Unity's SetPixel.
While I can do this ...
1
vote
0answers
79 views
Cutting a 3D mesh with a 2D shape
I have a 2D image that i want to use to cut into a 3D mesh while leaving it closed (basically cut straight through it, and close it by generating vertices in both places it cut, front and back, to ...
2
votes
0answers
156 views
LibGDX - ShapeRenderer as principal game entity renderer
I am trying to make a 2D game that is just a bunch of default figures like circles, arcs and quadrilaterals with no textures (similar to Super Hexagon), and for that I was using C# and XNA long time ...
7
votes
3answers
569 views
Determine whether a shape formed from a series of other shapes is 'unbroken'
I have a grid of tiles in a game and each tile can have a certain simple shape on it.
I want to be able to determine whether the combined shape from any given arrangement of these tiles results in ...
2
votes
1answer
734 views
OpenGL: Draw an arrow
I'd like to know how to draw an arrow to represent a vector position, length and direction.
The issue is that I can't quite find an easy way to know the location and rotation of the triangle ...
1
vote
1answer
74 views
Finding the side of a shape a ray intersects
For some simple 3D shapes (cubes, prisms) how can I determine which side a ray intersects, knowing the direction of the ray, and the normals of the shapes' sides.
I thought of using plane ...
0
votes
2answers
100 views
How to render apart blocks of a cone [closed]
in OpenGL I want to render a cone in parts like on the image. My problem is to calculate the arc of each block in 3D space.
has someone an idea how to handle this?
1
vote
2answers
196 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 of,...
1
vote
1answer
414 views
How do I find the shape of Tiled's circles or ellipses in libGDX?
I created a level in the 'Tiled Map Editor' and loaded it into my libGDX game.
I can easily transform almost all objects into Box2D objects (although this problem is not Box2D specific), but I have ...
2
votes
1answer
789 views
Collision detection between 2 irregular shapes
I need to implement a collision system for a vertical-shotter and the bullets can have any type of shape; i've implemented the shape class with an array of choords and an array of lines which have the ...
1
vote
1answer
166 views
Rotate an arrow on a plane?
I'm creating a display for a GPS-based embedded system and would like to have an arrow indicating the current bearing. I'd love the arrow to have a 3d appearance by rotating it on a plane tilted up ...
2
votes
1answer
240 views
What AI algorithm to use to find hidden shapes in a Battleships-like game
I'm developing a game similar to Battleships, only using different shapes. A single type of shape will be used within a game session, by both the human player and AI. There will be several objects ...
1
vote
1answer
454 views
Libgdx/Box2D PolygonShape has no position… well, what now?
As my prototype works perfectly fine I want to advance to more fun areas of the project and add a more complex player-character body.
So for Box2D I figured I'd need multiple fixtures, like one for ...
0
votes
1answer
371 views
LibGDX ShapeRenderer rotated
I'm having a weird problem with the LibGDX ShapeRenderer where it draws everything rotated.
Here are some images to show you what i mean:
This is what it looks like in Tiled(Map Editor):
This is how ...
1
vote
1answer
2k views
If filled polygon cannot be drawn via libgdx ShapeRenderer , then what is the work around?
I know most of you would suggest me to draw a filled polygon by using combination of triangles and rectangles , but that is not possible for complex shapes . I want to basically draw a generic shape ...
2
votes
2answers
184 views
AI and shapes in 2D Grid
I'm working on a grid- and turn-based strategy rpg. My problem is concerning finding best position for my AI to use a skill. But lets start at the beginning.
My plan is to make each skill an action ...
3
votes
3answers
4k views
How do I render a rounded rectangle in libgdx?
I've been thinking of ways to render a rounded rectangle in libgdx. I haven't found a pre-built way in the documentation. I've looked at:
ShapeRenderer, but that's apparently quite expensive ...
1
vote
1answer
79 views
Shape collision checking
I want to check in an shape, wether an point is in it or not.
The shape is descriped with one Array of float vectors.
The vectors are added in clock direction.
The first I can check very easy, the ...
1
vote
1answer
1k views
How to simulate cylinder shape in collision detection?
AFAIK, many physics engines like Physx and Havok don't incorporate cylinder as basic shape because it is expensive than sphere, box and capsule. But bullet engine does incorporate cylinder as a basic ...
0
votes
1answer
145 views
libgdx fixture is giving unresponsive error
need some support. I am novice in libgdx game engine. Below is my code
package com.game.box2d.fruitcart;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio....
7
votes
1answer
690 views
How do I get the areas enclosed by an arbitrary 2D shape?
In my game I want users to be able to draw arbitrary 2D shapes of any length around game objects. The shapes must be closed and drawn with a single stroke that does not overlap.
For example:
I want ...
6
votes
2answers
10k views
Libgdx ShapeRenderer rectangles
I'm trying to draw a filled rectangle in Libgdx and according to the API this should work:
shapeRenderer.begin(ShapeRenderer.ShapeType.FilledRectangle);
But it gives me an error and tells me to ...
1
vote
1answer
163 views
How to render polygons of arbitrary shape? [duplicate]
I am trying to render a plane with nodes.
FYI : Nodes know what other nodes it is being attached to.
I can think of a way to render them as long as they are aligned in a circular pattern; have a ...
0
votes
2answers
225 views
games logic based on closed shapes
I would like to know the math concepts behind shape based games like http://www.miniclip.com/games/fat-slice/en/
To be specific, I would like to know on
how to model shapes programmatically
finding ...
4
votes
2answers
101 views
Making various shapes equally difficult to tap
I'm developing a game where the player quickly has to tap/click on various shapes such as squares, circles, triangles, stars and so on. I'm now struggling with the following task: I'm searching for a ...
0
votes
1answer
353 views
How to convert a silhouette to a blob?
Using ShapeShop you draw a silhouette and it converts the silhouette to a "blob", which gives a nice game character. Using 3DSMAX 2012 you draw a line and close the spine. How do you convert it to a "...
2
votes
2answers
975 views
Farseer Physics: How to create shape from Vertices?
As you can understand from the title, I'm pretty new to game development. I'm doing this for fun. Anyway here's my question.
I have this Farseer Physics samples and i've been studying them for a few ...
1
vote
1answer
1k views
Custom VertexDeclaration for Color, Texture, Normal
What is the best way to create a VertexDeclaration, that makes it able to render a Shape consisting of vertices and also be able to store a color for the shape (in case the texture can't be rendered - ...
4
votes
2answers
1k views
Blending textures together, texture fade over / fade in
What is the best way to render a texture overlapping effect?
Like in this example:
I want either the grass to fade in to the snow texture, or the other way around. No rough edges. Somehow make them ...
1
vote
2answers
353 views
Texturize a shape of multiple triangles in 2D
This is an example of a shape consisting of multiple points, triangles and eventually a shape:
Red Dots = Vector3 (X, Y, Z) or Vector2 (X, Y)
If I have a Texture of a certain size, how do I ...
2
votes
2answers
233 views
Drawing multiple triangles at once isn't working
I'm trying to draw multiple triangles at once to make up a "shape". I have a class that has an array of VertexPositionColor, an array of Indexes (rendered by this Triangulation class):
http://www....
1
vote
0answers
992 views
How to properly add texture to multi-fixture/shape b2Body
Hello to everyone this is my first poste here I hope that will be not fail start.
At start I must say I make part 1 in Ray's Tutorial "How To Make A Game Like Fruit Ninja With Box2D and Cocos2D". But ...
1
vote
1answer
1k views
AndEngine Physics: Shape rotating but not updating physics effects
I was looking at PhysicsExample from AndEngine's Examples. I made the following change that I added a vertical line shape and created a fixture for it. Then I registered a rotation modifier for that ...
0
votes
2answers
4k views
How do I draw a single Triangle with XNA and fill it with a Texture?
I'm trying to wrap my head around:
http://msdn.microsoft.com/en-us/library/bb196409.aspx
I'm trying to create a method in XNA that renders a single Triangle, then later make a method that takes a ...
1
vote
1answer
302 views
How do I draw shape distortion with a Texture2D in XNA?
Say I have a rectangular Texture2D object in XNA, and I draw it on the screen.
How can I animate it so it slowly changes to a trapezoid shape, and then to a pentagon, etc.
I have no idea what this ...
1
vote
1answer
557 views
Intersecting Ray with Extruded 2D Shapes (e.g. Extruded Text)
I'm looking for a way to find intersection between a ray and an extruded 2D shape or text (defied by a Bézier curve). Any ideas?
1
vote
4answers
6k views
Trying to create a sphere in UDK on which I can stand
Trying to build a globe in UDK, but when I do (create a sphere), my player falls straight through it. How do I make a sphere that I can walk on? Every other shape (cube, cone...etc) work just fine.
...
3
votes
5answers
5k views
XNA - Drawing 2D Primitives (Boxes) and Understanding Matrices in Computer Graphics
I have two issues which I wish to solve by creating 2D primitives in XNA.
In my game, I wish to have a "debug mode" which will draw a red box around all hitboxes in the game (Red outline, transparent ...
0
votes
1answer
93 views
Shape editor with custom format?
I'm trying to determine what format the shapes in my 2D game should be stored in and also what software I should use to aid in making the actual shapes.
Up until now I used PhysicsEditor from code'n'...
2
votes
1answer
639 views
Shapes and sprites in SVGs
I understand SGV images are used in 2D games to store shape data for the physics engine of the game. I'm unsure though, should the raster sprite also be stored in the SVG or should it be separate?
...