CI | status |
---|---|
Travis CI | |
AppVeyor | |
CircleCI | |
CodeShip |
An easy, light, native game engine running on JVM.
View APIs or wiki to learn more about Frice Engine.
The doc is poorly maintained and deprecated. I'm deciding to make some tutorials soon.
A flappy bird game uses just 65 lines of code only.
Written in Kotlin, also work on Java, JRuby, Groovy and Scala.
The release build jar is about 300kb (with a 800kb Kotlin runtime) only.
This engine is completely platform-independent: no JNI linkage, no native methods, everything is written in pure Kotlin.
Add code below to your gradle scrip:
allprojects {
repositories {
/// ...
maven { url 'https://jitpack.io' }
}
}
dependencies {
compile 'com.github.icela:FriceEngine:v1.4.0'
}
- Kotlin
- Java
- Groovy
- Scala
- Game Objects (from image or shape, image from file or web)
- Life cycle
- Collision detecting
- Audio playing (*.wav, *.mp3 only)
- Dialogs
- Cursor overriding
- Clock system
- Animations (frames, moving, scaling, accelerations, etc.)
- A simple key-value database
- Screen cut
- Buttons
- Particle effects
- Easy time controlling
- Language extensions (for Kotlin only)
- Smart auto garbage collection (you can close it (objects far from the screen will be removed))
- Resource manager(when you read files/urls, the result will be cached)
- File/URL utils
- A BoolArray implemented in bitwise operation, each boolean value will only take 1 bit space (instead of 1 byte which is default on JVM).
FriceEngine is based on the life cycle mode.
To build games based on frice engine, follow these steps:
- Import the jar in the latest release to your project, or add dependency in your
build.gradle
file. - Create a class extends Game in org.frice.game package.
- Override the life cycle methods(
onInit
,onExit
,onLastInit
,onRefresh
,onFocus
,onLoseFocus
), just understand them by name. - If you want to draw something additionally, override
customDraw
. This method will be invoked every time after all game objects drawn. - Write
launch(YourGameClass.class)
in the main function. - Feel free to open issue for feature request, bugs, etc.
see FriceDemo