简体   繁体   中英

Libgdx Android game dividing screen

Hi I am having trouble working with libgdx making a game. In the image provided you can see there are sections: a minimap, character stats, character actions, and a big map. I am wondering how do I divide the screen to have each of these actions. So far I have the big map loaded. Would the whole screen be a stage? And each section be actors? I am kind of confused on how libgdx works compared to android studio and xml files. Thanks in advance

gamescreen

bettergamescreen

Maybe it's too late, but I'll write it for the other users, reading this post.

On top of your game you render your UI. One viewport and stage for UI and a viewport and camera+batch for the game. Next you have a third camera, and you render with it to a FBO (framebuffer) , and simply display it in your UI. Try searching for FBO with libgdx in the net, you'll find some examples. If not, just ask , I'll post an example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM