Getting Started
The smallest dependency-only desktop app uses the published engine bootstrap and Vulkan backend.
Awake owns the GLFW window, frame loop, input polling, and standard VulkanEngine construction;
your project only supplies the app lifecycle and render plan.
Installation
Add the following to your libs.versions.toml:
[versions]
awake = "0.1.0-alpha.1"
[libraries]
awake-bootstrap = { group = "com.awakekt.awake.engine", name = "bootstrap", version.ref = "awake" }
awake-shaders = { group = "com.awakekt.awake.asset", name = "shaders", version.ref = "awake" }
awake-vulkan = { group = "com.awakekt.awake.backend", name = "vulkan", version.ref = "awake" }
For a JVM desktop target:
kotlin {
jvm("desktop")
sourceSets {
commonMain.dependencies {
implementation(libs.awake.bootstrap)
implementation(libs.awake.shaders)
}
named("desktopMain").dependencies {
implementation(libs.awake.vulkan)
}
}
}
Creating a Game
Define the lifecycle in commonMain, then launch it from desktopMain:
// commonMain
val game = app {
window {
title = "My Awake App"
size(1280, 720)
backend.vulkan()
}
render { frame ->
// Update your game state here.
}
}
// desktopMain
fun main() = runVulkanDesktopGame(game, MyRenderPlan)
MyRenderPlan is the app's shader and pipeline declaration. Apps that need custom backend
construction can use the existing applicationFactory overload instead.
For a scene or Compose UI, add those published feature modules and install them in the same
app {} root; they remain optional rather than hidden engine policy.
The repository's executable example is:
/*
* SPDX-FileCopyrightText: 2023-2026 Ron June Valdoz
*
* SPDX-License-Identifier: Apache-2.0
*/
package com.awakekt.awake.showcase.app
import com.awakekt.awake.engine.bootstrap.dsl.WindowDsl
import com.awakekt.awake.engine.bootstrap.dsl.appDefinition
import com.awakekt.awake.engine.platform.lifecycle.AwakeAppLifecycle
import com.awakekt.awake.showcase.DEFAULT_SHOWCASE_ID
import com.awakekt.awake.showcase.EngineShowcases
import com.awakekt.awake.showcase.engineShowcaseModule
/** Creates a focused showcase session; callers choose an ID from [EngineShowcases]. */
fun engineShowcaseApp(initialShowcaseId: String = DEFAULT_SHOWCASE_ID): AwakeAppLifecycle =
appDefinition(createState = {}) {
window { configureShowcaseWindow() }
module(engineShowcaseModule(initialShowcaseId))
}.createApp()
private fun WindowDsl.configureShowcaseWindow() {
title = "Awake Engine Showcase"
size(1600, 900)
}
[!NOTE] The example above is pulled directly from the
samples/engine-showcasemodule, ensuring it always compiles and stays up-to-date with the latest Engine APIs.