I just learn about libGdx and find it’s good. However I have several questions regarding their example of Hello World,
- To change OpenGL between LWJGL and JOGL, is it really simple enough by just do this
new LwjglApplication(new HelloWorld(), "Hello World", 480, 320, false);
without change anything in backend (HelloWorld class)?
-
When I did above, it works. However the window with LwjglApplication didn’t allow you to resize. How to fix it?
-
When I have a class implementing ApplicationListener with custom constructor, which one called first, the constructor or create()?
-
In moving the text, why need to multiply 60 instead declare “new Vector2(60, 60)”? does it to create smooth move?
textPosition.x += textDirection.x * Gdx.graphics.getDeltaTime() * 60;
-
How the “Gdx.Graphics.getDeltaTime()” calculated? If it’s calculated from SpriteBatch.begin() to SpriteBatch.end() then the time taken for update game logic isn’t counted right?
-
There is a commented line. I uncommented it but only see the text moved faster. What exactly it did?
textPosition.add(textDirection.tmp().mul(Gdx.graphics.getDeltaTime()).mul(60));
-
Is there advantage to use Vector2 instead Point, and awt.Color instead gdx.graphics.Color?
-
Is it right to reuse BitmapFont to draw multiply Strings?
-
When I cropping texture with SpriteBatch.draw, the 0,0 position of texture relative to screen is left bottom, while cropping area (x, y, width, height or constructing TextureRegion) using left up as 0,0. Is it true? just to be sure.
-
Whatever game it is, I should implement ApplicationListener and declare SpriteBatch right? Is Gdx.graphics static?
Thanks. ;D