Giter Site home page Giter Site logo

nukesz / ktx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from libktx/ktx

0.0 2.0 0.0 1.6 MB

LibKTX: Kotlin extensions for LibGDX games and applications

Home Page: https://libktx.github.io/

License: Creative Commons Zero v1.0 Universal

Kotlin 100.00%

ktx's Introduction

Travis CI Maven Central Kotlin LibGDX

KTX

Kotlin utilities for LibGDX applications.

About the project

KTX aims to make LibGDX as Kotlin-friendly as possible without turning the API upside down. It provides modular utilities for certain parts of LibGDX with poor Kotlin support. This is not a new framework by any means - but Kotlin certainly makes LibGDX feel like one.

Do not confuse KTX with android-ktx: an official Google project with Android utilities. "KTX" name was chosen long before the Android project was announced.

Modules

KTX was designed to be modular from day one: in fact, some of these libraries are just a single Kotlin file. After all, you might not want or need all modules in your application. When possible, the extensions do not depend on the standard Kotlin library - and even if they do, it is marked as a provided dependency. You can choose the Kotlin version that suits you best and it will not be overridden by your build system.

Current KTX modules:

  • actors: general Scene2D utilities for stages, actors, actions and event listeners.
  • app: ApplicationListener abstract implementations and other general LibGDX application utilities.
  • ashley: Ashley entity-component-system utilities.
  • assets: resources management utilities.
  • async: coroutines context based on LibGDX threading model.
  • box2d: Box2D physics engine utilities.
  • collections: extensions for LibGDX custom collections. Based on Kotlin standard library utilities.
  • freetype: FreeType font loading utilities.
  • graphics: utilities related to rendering tools and graphics.
  • i18n: some simple extensions that make LibGDX internationalization API less verbose, safer and easier to use.
  • inject: unsettlingly simple dependency injection with nearly zero runtime overhead and no reflection trickery.
  • json: utilities for LibGDX JSON serialization class.
  • log: minimal runtime overhead cross-platform logging using inlined blocks.
  • math: operator overloads for LibGDX math API and general math utilities.
  • scene2d: type-safe Kotlin builders for Scene2D GUI.
  • style: enhances Skin API with type-safe builders of official Scene2D widget styles. Replace your JSON skin file with type-safe DSL.
  • vis: type-safe Kotlin builders for VisUI. An alternative to the scene2d module.
  • vis-style: enhances Skin API with type-safe builders of VisUI widget styles. An extension of style module.

Note that most guides and examples assume that the reader is at least a bit familiar with the LibGDX API.

Afraid to use some third-party code? Browse through the sources, run the test suites. While certainly not perfect, we try to keep the public API clean and every feature fully unit tested. Note: coverage tools still have problems with Kotlin inlined methods, so the reported code coverage might be much lower than the actual.

Dependencies

KTX libraries are currently in late beta. While tested and stable enough, we want to give them a little bit more time and get some user feedback before a stable release. All versions are available through Maven Central and here. You can also use the preview snapshot releases from https://oss.sonatype.org/content/repositories/snapshots/ repository.

All libraries follow the same naming schema - this is an example Gradle dependency:

compile "io.github.libktx:ktx-$module:$ktxVersion"

Replace $module with the name of required KTX library. $ktxVersion usually matches LibGDX version it was compiled against - although it might end with -b1 (if it is a beta release) or -SNAPSHOT (if you are using the snapshots). For example, the first official beta release with the current group ID was compiled against LibGDX 1.9.6 and its version was 1.9.6-b2. You can browse through our releases here.

Note that even snapshots should be more or less stable, as libraries are not pushed to Maven Central unless they pass the extensive tests.

Documentation

Each module contains a README.md file with a list of all features or a guide with a few code snippets. Browse through the directories in root folder to find out more about each library. GitHub releases also contain archives with generated Dokka documentation for each module. KTX wiki lists some useful resources as well.

If you want to help, read the contribution guideline and browse through the issues to see what's currently to do. Don't be afraid to create issues just to ask a question or make a request for any kind of improvements. Before creating any pull requests, be aware that the code is dedicated to public domain.

ktx's People

Contributors

czyzby avatar jcornaz avatar jkly avatar kotcrab avatar yhslai avatar maltaisn avatar cypherdare avatar kali-dali avatar nukesz avatar proorange avatar keturn avatar dwursteisen avatar sreich avatar tomgrill avatar mrplow442 avatar focuspo1nt avatar elect86 avatar kvonspiczak avatar jojomickymack avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.