Tagged Questions
-1
votes
1answer
91 views
A paddle in my pong game isn't moving [closed]
I'm working on a little pong game in LWJGL but only one paddle moves. I've tried to switch around some code in the hopes it would work again but it still doesn't.
Here is my paddle class:
public ...
2
votes
1answer
175 views
2D Top down acceleration vector
I have been wanting to solve the issue of movement once and for all... with all that I have learnt and read through, should be a piece of cake one would have thought... , seems it isn't. Having ...
2
votes
2answers
109 views
Smoother controls
I am trying to move my background left if the user hits the right key. and right if the user hits the left key, so that it will look like the player is moving.
The problem is that whenever I hold the ...
2
votes
2answers
152 views
Making a player move to my mouse when clicked?
How can I get my player to move to the mouse when it is clicked (like in Warcraft)?
So far I have tried:
if (Mouse.isButtonDown(0)) {
if (X < Mouse.getX()) {
X += Speed;
}
if ...
3
votes
1answer
108 views
AI surrounding algorithm suggestions
I am building up a simulation where predator groups (tribes) try to hunt other agents in the simulation (whom also are clustered in groups).
Now I got to a point where members of a group follow their ...
6
votes
4answers
342 views
Implementing AI to hide behind obstacles
I am developing an AI simulation of predator and prey. I would like to simulate the AI hiding behind obstacles, if it is being chased. But I am still trying to figure out the best way to implement ...
1
vote
1answer
312 views
Moving sprites on a graph in libGDX
In my game I'd like to move sprites on a fixed path. Until this point I was trying to stick with the tools already provided by libGDX, like the Tiled map renderer classes so I'm looking for a solution ...
3
votes
1answer
140 views
Moving the jBullet collision body to with the player object
I am trying to update the location of the rigid body for a player class, as my player moves around I would like the collision body to also move with the player object (currently represented as a ...
3
votes
2answers
313 views
How do you set the movement speed of a sprite?
I'm using Slick 2D/Java to play around with graphics. Getting an image to move is easy:
Input input = gc.getInput();
if(input.isKeyDown(sprite.up)){
sprite.y--;
}else if ...
4
votes
4answers
373 views
Can a high FPS negatively affect how a program runs?
Yeah I know this is a broad question and will get down rated, I'm just hoping for some answer before it gets closed.
Anyway, I'm using Slick 2D/Java to play around with graphics. I'm having some ...
1
vote
1answer
209 views
How to I get a rotated sprite to move left or right?
Using Java/Slick 2D, I'm using the mouse to rotate a sprite on the screen and the directional keys (in this case, WASD) to move the spite. Forwards and backwards is easy, just position += ...
0
votes
2answers
306 views
Can't get sprite to rotate correctly? [closed]
I'm attempting to play with graphics using Java/Slick 2d. I'm trying to get my sprite to rotate to wherever the mouse is on the screen and then move accordingly. I figured the best way to do this was ...
4
votes
2answers
1k views
Move sprite in the direction it is facing?
I'm using Java/Slick 2D. I'm trying to use the mouse to rotate the sprite and the arrow keys to move the sprite. I can get the sprite to rotate no problem, but I cannot get it to move in the direction ...
5
votes
3answers
470 views
How can I make a character move forward in a certain direction?
I have an entity class which is updated every game tick. Let's just assume said entity moves forward constantly. What i want to know is, how can i make it so that i can give an angle to a function and ...
2
votes
1answer
663 views
How can I accomplish Pokemon-style movement over tiles in java?
I'm talking about where if you press a directional key once you walk over to the adjacent tile and can't do any other actions during the walk. I can get my character to move one tile width, but my ...