Tagged Questions
8
votes
2answers
2k views
How do I tackle top down RPG movement?
I have a game that I am writing in Java. It is a top down RPG and I am trying to handle movement in the world. The world is largely procedural and I am having a difficult time tackling how to handle ...
6
votes
4answers
381 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 ...
5
votes
3answers
859 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 ...
4
votes
4answers
423 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 ...
4
votes
2answers
2k 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 ...
3
votes
6answers
1k views
How to implement object velocity as a vector
I'm working on a Breakout game, and want to change the ball's movement code from how I currently do it, to something based on vectors (as I feel learning and implementing movement based on vectors ...
3
votes
2answers
610 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 ...
3
votes
2answers
688 views
Mouse-driven Movement
I'm trying to write a game where player picks where they are going by just mouse-clicking on that position and it goes there (just like RuneScape's point-and-click mouse interface).
I'm trying to get ...
3
votes
1answer
204 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
1answer
131 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 ...
2
votes
3answers
489 views
Movement in RPG
I want to make an RPG game in which I move tile by tile. So when I hit up, the tile row that I am on decreases by one for example. Also, it's supposed to be a slow movement so that I can see the ...
2
votes
2answers
245 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 ...
2
votes
1answer
315 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
140 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
1answer
978 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 ...