java - Swing/libgdx Level Editor -


I am trying to create a level editor to create the game. I want to play the game swing Run in JPNEL . Here's how I did this. Public class gamepellelJPNL (set layout (new border layout); canvas = new algebraic canvas (new migration), add (canvas.getCanvas (), BorderLayout. CENTER);}}

So this is the problem when I run MyMegade as LWGLAPP, then it runs with about 60 fps, but when I display it in JPanel Runs with 1000 fps and gets too much CPU

Is there a way to fix this, so it will not use this CPU so much. I do not have much experience with swing, should I use something else.

< / Div>

There is no framerate of libdx. It runs with the highest possible framerate, so you can do something like this in your main loop Better:

  thread (sleepy) (1000/60-Gdx.graphics.getDeltaTime ());  

You want your desired Can change 60 with framerate and voice!


Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

python - mayavi mapping a discrete colorbar on a surface -