Skip to content

Development kit to build 2d games for WearOS and Android.

License

Notifications You must be signed in to change notification settings

TocappGames/wearkit

Repository files navigation

WearKit - WearOS 2D GameDev

WearKit is a project to help developers to create WearOS (and Android) 2D games, leveraging Dyn4J java library as a underlying physics engine.

Installation (using gradle)

WearKit can be installed from the official WearKit Maven Repository (recommended), or using GitHub Packages.

Add WearKit Maven repository to project

If you configured gradle repositories in settings, add it to gradle.settings

// File: MyProject/gradle.settings

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven {
            url "https://maven.tocappgames.com"
        }
    }
}
// ...

Otherwise add it to build.gradle

// File: MyProject/build.gradle

// ...
repositories {
    // ...
    mavenCentral()
    maven {
        url "https://maven.tocappgames.com"
    }
}

Add WearKit and Dyn4J dependency to module

Dyn4J isn't necessary by default, but if you want to interact with the physics engine or use the Dyn4J data structures, you need Dyn4J too.

// File: MyProject/MyModule/build.gradle

dependencies {
    // ...
    implementation 'dev.wearkit:core:1.1.4' // mandatory
    implementation 'org.dyn4j:dyn4j:4.2.0' // recommended
}

Usage

See some game examples in example module