Then im back at square one. Where the name does not attach to the monster. If you read my first post, it will happen same thing. Also i’m share same batch with my hud.
"Fonts in libgdx are scaled in pixel dimensions and not your game world units. The best course of action here is to maintain two sperate cameras to render your game: world, and ui.
The world camera will be in your world units as you have it now. The ui camera will be in pixel units scaled to the game window. Use the project and unproject methods on the camera classes to position your ui elements correctly. Render the world using the world camera then do a ui pass over that with the ui camera."
My way is ideal, but i need help to setup it correctly.
Sorry but this did not work, as i said. Unit scale is a ridiculous size to scale down to. So thats why i need to seprate the ui stuff from the world stuff.
You do something totally wrong
You have pixel ground tiles – let say 32 x 32 pixels you draw them
No zoom – scale needed
Then you draw Npc – trees etc – also pixels 1:1
No zoom – scale needed
But when you try draw text above world – you’r text is scaled from nowhere
And looks totally wrong
By setting Assets.font.getCache().setUseIntegerPositions(false); now it setScale propely. But i wonder, when i have alot of monster on my screen and drawing the monster font. It decrease my FPS alot. Any suggestions about that? Also if i would like to add progress bar, how should i scale that? Since it does not have the same option as font.
Need Draw names to texture (Cache) and then draw only 1 texture above monster not 10 draw calls for every character in name
That why you don’t need use scale in 2d games at all - so everything be same - predictable size
(except global zoom , or some Effects scale like laser)
No problem
p.s Realy go check and try Unity . Unreal
This problems you have now is only drop in the ocean, you be forced of thousands new ones(engine problems)
you use scale wrong - simple remove it from game.
And all be ok: all textures & fonts - be nice and pretty.
For the graphics we need to define a target resolution of 800x480 pixels (landscape mode on Android). If the device the game is run on does not have that resolution, we simply scale everything to fit on the screen. Note: for high profile games you might want to consider to have different assets for different screen densities. This is a big topic on its own and won’t be covered here.
You must Use only Global scale not per random element you want
(because you have no idea how scale works ^^ - Scale always destroy pixels: if in 3D its Ok - for pixel games its nightmare)
You need read many more tutorials in google and Gamedev books to at least understand basics
I really can’t answer on every you’r question (problem)