Ko Ja Match Up - a realtime massive multiplayer match up game

Overview

🎮 Ko Ja Match Up

Ko Ja Match Up is a realtime massive multiplayer match up game. Two teams try to beat each other in a concentration game.

💡 The short name stands for [Ko]tlin vs [Ja]va [Match Up] game

🕹 Play the game Online

For Windows, change all the ./gradlew for gradlew.bat.

You should use Gradle 5.5 or greater and Java 8 or greater.

Resources

Compiling for the JVM (Desktop)

Inside IntelliJ you can go to the src/commonMain/kotlin/main.kt file and press the green ▶️ icon that appears to the left of the suspend fun main() line.

Using gradle tasks on the terminal:

./gradlew runJvm                    # Runs the program
./gradlew packageJvmFatJar          # Creates a FAT Jar with the program
./gradlew packageJvmFatJarProguard  # Creates a FAT Jar with the program and applies Proguard to reduce the size

Fat JARs are stored in the /build/libs folder.

Compiling for the Web

Using gradle tasks on the terminal:

./gradlew jsWeb                     # Outputs to /build/web
./gradlew jsWebMin                  # Outputs to /build/web-min (applying Dead Code Elimination)
./gradlew jsWebMinWebpack           # Outputs to /build/web-min-webpack (minimizing and grouping into a single bundle.js file)
./gradlew runJs                     # Outputs to /build/web, creates a small http server and opens a browser

You can use any HTTP server to serve the files in your browser. For example using: npm -g install http-server and then executing hs build/web.

You can also use ./gradlew -t jsWeb to continuously building the JS sources and running hs build/web in another terminal. Here you can find a testJs.sh script doing exactly this for convenience.

You can run your tests using Node.JS by calling jsTest or in a headless chrome with jsTestChrome.

Compiling for Native Desktop (Windows, Linux and macOS)

Using gradle tasks on the terminal:

./gradlew linkDebugExecutableMacosX64         # Outputs to /build/bin/macosX64/mainDebugExecutable/main.kexe
./gradlew linkDebugExecutableLinuxX64         # Outputs to /build/bin/linuxX64/mainDebugExecutable/main.kexe
./gradlew linkDebugExecutableMingwX64         # Outputs to /build/bin/mingwX64/mainDebugExecutable/main.exe

Note that windows executables doesn't have icons bundled. You can use ResourceHacker to add an icon to the executable for the moment. Later this will be done automatically.

Cross-Compiling for Linux/Windows

If you have docker installed, you can generate native executables for linux and windows using the cross-compiling gradle wrappers:

./gradlew_linux linkDebugExecutableLinuxX64   # Outputs to /build/web
./gradlew_win   linkDebugExecutableMingwX64   # Outputs to /build/web

Generating MacOS .app

./gradlew packageMacosX64AppDebug             # Outputs to /build/unnamed-debug.app

You can change Debug for Release in all the tasks to generate Release executables.

You can use the strip tool from your toolchain (or in the case of windows found in the ``~/.konan` toolchain) to further reduce Debug and Release executables size by removing debug information (in some cases this will shrink the EXE size by 50%).

In windows this exe is at: %USERPROFILE%\.konan\dependencies\msys2-mingw-w64-x86_64-gcc-7.3.0-clang-llvm-lld-6.0.1\bin\strip.exe.

Linux notes

Since linux doesn't provide standard multimedia libraries out of the box, you will need to have installed the following packages: freeglut3-dev and libopenal-dev.

In ubuntu you can use apt-get: sudo apt-get -y install freeglut3-dev libopenal-dev.

Compiling for Android

You will need to have installed the Android SDK in the default path for your operating system or to provide the ANDROID_SDK environment variable. The easiest way is to install Android Studio.

Using gradle tasks on the terminal:

Native Android (JVM)

./gradlew installAndroidDebug             # Installs an APK in all the connected devices
./gradlew runAndroidEmulatorDebug         # Runs the application in an emulator

Triggering these tasks, it generates a separate android project into build/platforms/android. You can open it in Android Studio for debugging and additional tasks. The KorGE plugin just delegates gradle tasks to that gradle project.

Apache Cordova (JS)

./gradlew compileCordovaAndroid           # Just compiles cordova from Android
./gradlew runCordovaAndroid               # Runs the application (dce'd, minimized and webpacked) in an Android device
./gradlew runCordovaAndroidNoMinimized    # Runs the application in Android without minimizing (so you can use `chrome://inspect` to debug the application easier)

Compiling for iOS

You will need XCode and to download the iOS SDKs using Xcode.

Using gradle tasks on the terminal:

Native iOS (Kotlin/Native) + Objective-C

Note that the necessary bridges are built using Objective-C instead of Swift, so the application won't include Swift's runtime.

./gradlew iosBuildSimulatorDebug          # Creates an APP file
./gradlew iosInstallSimulatorDebug        # Installs an APP file in the simulator
./gradlew iosRunSimulatorDebug            # Runs the APP in the simulator

These tasks generate a xcode project in build/platforms/ios, so you can also open the project with XCode and do additional tasks there.

It uses XCodeGen for the project generation and ios-deploy for deploying to real devices.

Apache Cordova (JS)

./gradlew compileCordovaIos               # Just compiles cordova from iOS
./gradlew runCordovaIos                   # Runs the application (dce'd, minimized and webpacked) in an iOS device
./gradlew runCordovaIosNoMinimized        # Runs the application in iOS without minimizing (so you can use Safari on macOS to debug the application easier)

JS-game deployment to GitHub Pages

  • Go to settings page and enable GitHub Pages
  • Choose branch github-pages and select folder / (root)
  • After that you can use link:
    link to JS-game, click "View Deployment"
  • When you push to main or master branch, - deployment process will start again with GitHub Actions.
You might also like...
Cocos2d-x is a suite of open-source, cross-platform, game-development tools used by millions of developers all over the world.
Cocos2d-x is a suite of open-source, cross-platform, game-development tools used by millions of developers all over the world.

cocos2d-x Win32 Others cocos2d-x is a multi-platform framework for building 2d games, interactive books, demos and other graphical applications. It is

QRGame - storage a game inside a qr code
QRGame - storage a game inside a qr code

QRGame Can we storage a game inside a qr code? Yes! At least in theory. That was the question that started that entire project. QRGame is an Android p

In-game editor for item NBT

Building Gradle - Dependency Management The GradleWrapper in included in this project. On Windows: gradlew.bat clean build On MacOS/Linux: ./gradlew

Basic template to create a game using minigdx

MiniGDX Game Template Create your first game using miniGDX by clicking the "Use this Template" button above. The game will be configured for: the JVM

 Android Kotlin: Matching Kitties: A Game Inspired by Cats
Android Kotlin: Matching Kitties: A Game Inspired by Cats

Android Kotlin: Matching Kitties: A Game Inspired by Cats A kotlin based Android memory game Screenshots | | | | | | | | | Viewing the App You can clo

a bitcoin key collision game for android

BitteryApp BitteryApp is an opensource bitcoin key collision game for Android. How to Build BitteryApp source code build in chromium building environm

Flappy Bird game
Flappy Bird game

Flappy Bird by Compose 📜 Description Flappy Bird game built with Jetpack Compose. 💡 Motivation and Context All UI built with Jeptack Compose Images

The second iteration of the Xlite game.

Xlite 2.0 Xlite is a modular kotlin based RSPS. The goal of Xlite 2.0 is to provide the community with a stable and powerful sandbox to experiment wit

The Xlite Game Server.

Xlite 2.0 Xlite is a modular kotlin based RSPS. The goal of Xlite 2.0 is to provide the community with a stable and powerful sandbox to experiment wit

Owner
Tobse
🐱‍👤 Kotlin Fanboy 🧹Clean Coder         🎮 Gaming Nerd 🦾 3D Printer             📸 Hobby Photographer 😎 Father
Tobse
🛥 Stream Draw - a real-time multiplayer drawing & chat game app built entirely with Jetpack Compose

?? Stream Draw is a real-time multiplayer drawing & chat game app built entirely with Jetpack Compose. Draw and guess words with your friends! This pr

Stream 286 Dec 20, 2022
Multiplayer Dots and Boxes game for Android

Multiplayer Dots and Boxes game for Android. One player is the server, and the rest connect to them. Has player customization and in-game chat! Still in development, but fully compatible with version 2.0 of my NetDot protocol.

Matthew 0 May 8, 2022
This is an application that is about an X / O game. You can enter the names of the game, and there is also a screen for those who win and there is a button to continue playing and the game determines the result of each player

Game-X-O This is an application that is about an X / O game. You can enter the names of the game, and there is also a screen for those who win and the

Mohamed Rafat 2 Aug 20, 2022
Game made with Korge (Kotlin Multiplatform game engine)

MolesAttack Kotlin Multiplatform Game Play Html/js: https://feliperce.github.io/MolesAttack-Distribution/ Jar: https://feliperce.github.io/MolesAttack

Felipe Rodrigues 10 May 30, 2022
Our maze game is an 2d-animation game developed using android studio.

Our maze game is an 2d-animation game developed using android studio. The game consists of a ball and a board with a hole in the center of it. We are using accelerometer as controller to guide ball towards the hole. T

Suraj Devgan 6 Nov 29, 2022
An easy open source Android Native Game FrameWork.

JustWeEngine - Android Game FrameWork An easy open source Android Native Game FrameWork. Engine Flow Chart How To Use? Import Engine's module as Libra

JustWe 767 Dec 8, 2022
Desktop/Android/HTML5/iOS Java game development framework

Cross-platform Game Development Framework libGDX is a cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux

libgdx 20.9k Jan 8, 2023
Cocos2d-x is a suite of open-source, cross-platform, game-development tools used by millions of developers all over the world.

cocos2d-x Win32 Others cocos2d-x is a multi-platform framework for building 2d games, interactive books, demos and other graphical applications. It is

cocos2d 16.7k Dec 31, 2022
Free Android 2D OpenGL Game Engine

AndEngine Donations While developing AndEngine was a lot of fun, it also also consumed many(!) months of my life. It actually continues to cost me a s

Nicolas Gramlich 3.2k Jan 5, 2023
A cross-platform Java game Engine (Framework) , support JavaFX / Android / IOS / HTML5 / Linux / MAC / Windows

Loon Game Engine (Java Game Framework) EN / KR Free Game Resources Links Download Loon Game Engine Only Android-studio Template : androidstudio-templa

cping 502 Jan 4, 2023