#cursed player movement

21 messages · Page 1 of 1 (latest)

ornate sky
#

made a game base but the players positions are scuffed im not sure what i can do for update() since i know thats the problem, im too stupid atm its 7:52pm.

hazy sedgeBOT
#

Hey, @ornate sky!
Please remember to /close this post once your question has been answered!

ornate sky
#
    @Override
    public void update() {
        x += speed;
        y += speed;

    }
#

oh wow that didnt even embed

past yacht
#

If you don’t it updates way to quickly

#

And you won’t even see it

#

Here is the one I use

#

Then you just have a long lastTick somewhere in the class

ornate sky
#

my base uses Graphics2D and its kinda scuffed to do

past yacht
#

Just use a thread

ornate sky
#

oh

past yacht
ornate sky
#

the background kinda flickers white randomly when i tried

elder kayak
#

Drawing stuff is mostly done on a separate thread. Something tells me that updating from another thread without doing research isnt ok. I do not know much about swing though.