Tagged Questions
-2
votes
0answers
36 views
Catapult projectile math [duplicate]
I'm trying to make a catapult that will attack enemies as they approach a castle but I have only a foggy idea on how to get the math correct for the projectile to travel from the catapult, to the ...
4
votes
2answers
121 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
256 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
854 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
277 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
278 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
73 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
249 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
154 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
209 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
276 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
206 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
125 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
274 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 ...
0
votes
2answers
602 views
3D: First Person Movement
I've searched and searched for a solution today but haven't found one.
I have a Camera with Vector3 and also the camera has an angle.
If I use this:
hero.position.x += speedX;
hero.position.z += ...
0
votes
1answer
134 views
Minimap Around Perimeter of Screen, Code Provided
What I'm essentially trying to do is what a lot of FPS's nowadays do in regards to their HUD. When an objective is off-screen, a small icon / symbol is shown on the perimeter of the screen, basically ...
1
vote
1answer
452 views
Relating a point after an image is panned and zoomed
For Android, let's say you have a image of a map that you draw inside your view. On this map there are many, many "hot spot" locations where you want your user to be able to select. Given that there ...
2
votes
3answers
997 views
Suggest a simple Java math library for matrix operations for use with OpenGL (lwjgl) [closed]
I'm writing an OpenGL app with Java. I need to do some math for camera and frustum culling (for AABB). Could you suggest a simple and fast Java math library for that?
1
vote
3answers
2k views
Find Point with only angle and distance
I'm working on a school project and we have to create a tank team with the programming game Robocode (tank battle with self programmed bots in Java).
I have to program a scout bot that scans, finds ...
1
vote
2answers
408 views
OpenGL Camera causes spatial distortion
I'm trying to implement a 3D camera of the "Orbit around the origin" variety in a game engine I'm developing in order to learn about 3D graphics and game programming. I have a basic handle on the ...