165 reputation
16
bio website
location
age
visits member for 1 year, 6 months
seen Aug 15 '13 at 21:41

Oct
8
comment How do you set the movement speed of a sprite?
Slick has its own method called update(). I'm not sure how it works. I haven't looked at the code.
Oct
8
comment How do you set the movement speed of a sprite?
I understand the physics, but how do I implement this? So my rate is a constant, like .3. Would time be delta (a variable of the Slick method update())?
Oct
7
comment How do you set the movement speed of a sprite?
I considered this. I just didn't know if it was good form. I'll try it though, thanks.
Oct
7
comment Can a high FPS negatively affect how a program runs?
Huh... Good point. Unfortunately, eliminating delta does not solve the problem...
Oct
7
comment Can a high FPS negatively affect how a program runs?
That's what I figured... And unfortunately why I'm not expecting a perfect answer. I know there is too much that can go wrong. I was just looking for some information about updates and frame rate, which you provided very well.
Oct
7
comment Can a high FPS negatively affect how a program runs?
Yes I am. I multiply the velocity (which is the cos/sin of the angle that the image is facing * move speed) by delta. You think that could be causing a problem?
Oct
7
comment Can a high FPS negatively affect how a program runs?
thanks for both replies. I'll check for gotchas and consider the latter. As for calling the update, it's Slick's own required method that gets called. I did, however, stop it from drawing on every update. Now it only draws when something changes.
Oct
7
comment Can a high FPS negatively affect how a program runs?
As for the calling the draw method too often, that is likely. I'm calling it in every update. What's a better way to call it?
Oct
7
comment Can a high FPS negatively affect how a program runs?
What's a gotcha?
Oct
2
comment How can I move a sprite in the direction it is facing?
Thank you. After a few modifications, this did work. I have another question for you though if you happen to read this: getting the sprite to move backwards is just -= of what you have here. How do I make it move left or right though?
Sep
29
comment How can I move a sprite in the direction it is facing?
movespeed is a constant, in this case set at .3
Sep
28
comment How can I move a sprite in the direction it is facing?
No it's the code I used that caused the problem. See the comments below. Someone asked for it.
Sep
28
comment How can I move a sprite in the direction it is facing?
The exact code has been updated
Sep
26
comment How can I move a sprite in the direction it is facing?
I tried doing this, but the sprite still doesn't move correctly. It only seems to move to the left of the screen really. And when a key is down, you can't move the mouse around the screen. Any ideas what causes that?