Tagged Questions
4
votes
2answers
115 views
Inventory Grid Detection
I'm working on creating an inventory system for a game. The inventory system will use cells and 2D images to represent items, like Minecraft, Diablo, or WoW. I've hit a bit of a snag when trying to ...
0
votes
1answer
218 views
LibGDX Perspective Camera for 2D
I'm very new to LibGDX and I'm trying to use DecalBatch with PerspectiveCamera, simply to have z-coordinate for my sprites, as SpriteBatch does not offer that. However, I don't know how to calculate ...
11
votes
8answers
828 views
Converting a 2D curve into points for data storage
I’ve created an algorithm which converts any curve i.e. path into minimum number of points so that I can save it into a file or database.
The method is simple: it moves three points in equal steps ...
0
votes
1answer
265 views
Please help me with my 2D isometric tile picking [duplicate]
Possible Duplicate:
How to convert mouse coordinates to isometric indexes?
Okay, I apologise in advance if I make no sense here.
Basically, I've got a simple application that takes in a ...
3
votes
1answer
260 views
Drawing isometric walls
I'm having some trouble with isometric walls.
I'm drawing isometric floor tiles using the back to front rendering method, and it works fine. I also keep my floor tiles lined up properly in a nice ...
0
votes
1answer
70 views
Find the footprint of an isometric entity
I'm working on making a 2D isometric engine in Java. I'm getting into collision detection and I've hit a bit of a problem.
Characters in-game are not restricted to movement from tile to tile - they ...
4
votes
0answers
238 views
Isometric - precise screen coordinates to isometric
I'm trying to translate mouse coords to precise isometric coords (I can already find the tile the mouse is over, but I want it to be more precise). I've tried several different methods but I seem to ...
-2
votes
1answer
150 views
Move projectile in direction the gun is facing [duplicate]
Possible Duplicate:
Move sprite in the direction it is facing?
I am attempting to have a projectile follow the direction a gun is facing. When using the following code I am unable to make ...
1
vote
1answer
204 views
Point inside Oriented Bounding Box?
I have an OBB2D class based on SAT.
This is my point in OBB method:
public boolean pointInside(float x, float y)
{
float newy = (float) (Math.sin(angle) * (y - center.y) + Math.cos(angle) *
...
1
vote
3answers
261 views
(int) Math.floor(x / TILESIZE) or just (int) (x / TILESIZE)
I have a Array that stores my map data and my Tiles are 64X64. Sometimes I need to convert from pixels to units of tiles. So I was doing:
int x
int y
public void myFunction()
{
getTile((int) ...
0
votes
0answers
198 views
Java Collision Detection of a Slope using a Gradient [closed]
Im testing out collision detection for a game, The ball is traveling and i need to know when the ball hits a sloped line.
For this example i have used the whole screen, with a sloped line going from ...
2
votes
2answers
144 views
Get all triangles that are < N dist from you?
Does anyone know of a way I could add a radius to this code for p? Like basically saying "this is true if the triangle is < N dist from the point"
public boolean isPointInTriangle( Vector3f p, ...
8
votes
3answers
1k views
How to move an object along a circumference of another object?
I am so out of math that it hurts, but for some of you this should be a piece of cake.
I want to move an object around another along its ages or circumference on a simple circular path. At the moment ...
0
votes
0answers
123 views
way to do if(x > x2) x = x2 with rotation?
Alright, so I got this walking code, and some collision detection, now the collision detection returns a Vector3f of the closest point on the triangle that the projected position is at (pos + move), ...
-1
votes
1answer
271 views
How do I convert sin, cos and tan into an int in Java?
How would you be able to change Math.sin, Math.cos and Math.tan into an int?
This is because I heard that it is useful to have those Math resources in movement, gravity, etc. in gaming.
Also, as a ...