https://kotlinlang.org logo
#korge
Title
# korge
f

fkrauthan

06/14/2020, 2:24 AM
Hey I just started looking at Korge (not gonna participate in the jam unfortunately) but was wondering if anyone can pinpoint me in the right direction for the following things: 1. Can I toggle fullscreen through a button in game? I saw that I can specify it on game start but not if I can change it on runtime? 2. I saw that Korge offers a Scene system. I assume it works similar to the Phaser 3 scenese in which the usual game setup looks to have at least 3 Scenes. A Boot scene to load the assets for the loading screen. A loading/preloading screen that shows a loading indicator and then fetches all the assets and a Game screen that contains the actual game logic. Is this a workable approach for Korge as well and if yes how would you do the loading screen? And if I request a resource through
resourcesVfs
is that cached or do I need to build my own asset cache (like a lot of the C++ Game engines for example)?
d

Deactivated User

06/14/2020, 8:42 AM
1.
views.gameWindow.fullScreen = true
2. KorGE does asynchronous resource loading, you can even streaming non-critial assets. It doesn't provide anything special for resource caching (though in the browser caching will happen automatically). Scenes are just a way to divide game logic. Nothing special for preloading. You can make a preloader scene or something if you want manually. The initial JS loading doesn't include a preloader yet. It is planned. https://github.com/korlibs/korge-plugins/issues/14
f

fkrauthan

06/15/2020, 5:10 AM
But in case I want a general asset preloading (e.g. outside of Web) I need to write my own asset manager? What is the cheapest way to trigger the preloading for assets?
d

Deactivated User

06/15/2020, 7:36 AM
Maybe we can trigger a resource loading event, so you can handle that by code. Maybe a spinning circle or something. Ill think about that myself, but If you can suggest something that you would find comportable would be awesome.
f

fkrauthan

06/15/2020, 10:30 PM
Yeah that would be great. Maybe somehow I can batch up a couple of resources I want to load and then I can get an even more detailed progress indidcation (e.g. 4 of 10 resources are loaded)
I like the simplicity of phaser a lot so maybe this can be of some inspiration: https://gamedevacademy.org/creating-a-preloading-screen-in-phaser-3/?a=13
👍 1
🙏 1
2 Views