一个简单、易用的原生轻量级JVM游戏引擎。
查看 APIs 或者Wiki以更多地了解Frice Engine。
An easy, light, native game engine running on JVM.
View APIs or wiki to learn more about Frice Engine.
一个简单的Flappy bird 仅用了65行代码。
使用Kotlin写就,并支持Java, JRuby, Groovy, Scala等语言。
A flappy bird game is in 65 lines of code only.
Written in Kotlin, also work on Java, JRuby, Groovy and Scala.
Kotlin运行时库仅用736KB(使用Kotlin开发游戏可以在游戏集成而不必引擎附带),引擎也仅仅略大于800KB。
未来将会加入的MP3支持可能会占用200KB。
Kotlin runtime is 736KB in size (if not using Kotlin to build games), and the engine JAR file size is just a bit above 800KB.
MP3 format support (in the future) will take 200KB.
This engine is completely platform-independent: no JNIs, no native methods, everything is written by myself in pure Kotlin.
And this is what a JVM app should be exactly.
clone (clone https://github.com/icela/FriceEngine.git) and open with IntelliJ IDEA(please install Kotlin, Groovy, or Ruby plugin first).
Currently under construction. Maybe you know how to build your own apps.
- Kotlin (Native)
- Java
- Groovy
- JRuby
- Scala (Not tested)
- Game Objects (from image or shape, image from file or web)
- Life cycle
- Collision detecting
- Audio playing (*.wav only)
- Dialogs
- Cursor overriding
- Clock system
- Animations (frame, move, scale, accelerate, etc.)
- A simple key-value database
- Screen cut
- Buttons
- Particle effects
- Easy time controlling
- Language extensions(for Kotlin only)
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.
- Create a class extends Game in org.frice.game package.
- Implement the abstract methods, just understand them by name.
- call the empty constructor in the public static void main.
- For full API doc please view help
- demo/Demo1.java
- demo/Demo2.java
- demo/Demo3.kt
- demo/Demo4.groovy (database demo)
- demo/Demo5.rb (BUG: it can create a game window but cannot add objects)
- demo/Demo6.java (acceleration demo)
- demo/Demo7.java (flappy bird demo)
- demo/Demo8.java (audio and cursor demo)