https://github.com/zachgrayio/codenamerxg
A somewhat FRP-based game engine.
https://github.com/zachgrayio/codenamerxg
Last synced: 11 months ago
JSON representation
A somewhat FRP-based game engine.
- Host: GitHub
- URL: https://github.com/zachgrayio/codenamerxg
- Owner: zachgrayio
- License: gpl-3.0
- Created: 2016-02-29T20:51:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-11-09T05:53:10.000Z (over 8 years ago)
- Last Synced: 2025-03-30T01:37:01.088Z (over 1 year ago)
- Language: Kotlin
- Homepage:
- Size: 148 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# codenameRXG
### DSL usage:
Actor extension:
```kotlin
var Actor.health: Int by ActorAttribute({ 3 })
val Actor.flying : Boolean get() = position.y in 0f..ground
```
Keybindings:
```
ESC on RELEASED does togglePaused
A on PRESSED does ifNot(paused) { player moveLeft step play playerMoveAnimation() }
S on PRESSED does ifNot(paused) { player play "crouch" }
D on PRESSED does ifNot(paused) { player moveRight step play playerMoveAnimation() }
A on RELEASED does playerStand
S on RELEASED does playerStand
D on RELEASED does playerStand
```
### Build/Run
To build/run the demo game: `./gradlew run`
### Build distributable
`./gradlew distZip`, and run by CD'ing into the bin directory and executing the run script from there. NOTE: if building for Mac, uncomment the jvm args in build.gradle.