A new video arrived. Let us show you, how KorGE ha...
# korge
n
A new video arrived. Let us show you, how KorGE handles resolution, aspect ratio, resizing and the coordinate system

https://www.youtube.com/watch?v=81IG0ld5w-8

👏 1
r
Just watched it and found it quite informative. Have a few followup questions now; 1. for 2d games, should i always define a virtual window and create a game around it, and then let the engine scale to whatever resolution the user has selected? 2. let's say i have a resolution selection in my settings, where i provide 2-3 resolution for each aspect type. How do I need to handle this case. should I create dynamic virtual window and handle the setting change myself, or can the engine also handle it implicitly? 3. How the does the camera interact with local/native resolutions? what you showed in the video seemed like a basic camera in itself. In KorgE, is this how cameras are implemented (with extra features like following an object, shakes and other effects). 4. How does Korge helps me to handle the general settings for Fullscreen and Windowed fullscreen?
n
@Deactivated User can answer this best. I only have an educated guess atm ;)
d
1. Yes 2. You still use the same virtual size. You would just resize the window/fullscreen (width,height) 3. The camera is a bit limited now. But we will add the features you requested. Camera uses the virtual dimensions too. So it is independent to the native resolution 4. views.gameWindow.fullscreen = true?
r
Thanks. For cameras, IMO the most important functionalities are: 1. culling (dont render anything outside the view area) 2. follow any game object 3. Effects (shaking, color overlays, filters etc.) Would love taking the camera on a spin next week. btw, the fullscreen mode isn't working for me. I tried both;
Copy code
object MyModule : Module() {
	// define the opening scene
	override val mainScene: KClass<out Scene> = MenuScene::class

	// define the game configs
	override val title: String = "My Test Game"
	override val icon: String = "icon.png"
//	override val size: SizeInt = SizeInt(800, 600)
	override val fullscreen: Boolean = true
and
Copy code
class MenuScene() : Scene() {
    suspend override fun Container.sceneInit() {
        // set a background color
        views.clearColor = Colors.BLACK
        views.gameWindow.fullscreen = true
let me know if I am doing something wrong. Else I will add in a bug in GH
n
Is this at windows?
d
You can create a bug report. We will check after the jam
👍 1
r
yep. Windows 10. tried using runJVM script. I'll add a bug on it.
n
Aah cause I could have sworn that it worked for me last week on Mac
d
I think it works on Mac, not sure about linux. But I think it was not implemented on Windows yet. So yeah, we'll implement it after the JAM