Skip to content

Commit

Permalink
Merge pull request #112 from xpenatan/master
Browse files Browse the repository at this point in the history
Release v1.0.0-b8
  • Loading branch information
xpenatan authored Nov 4, 2023
2 parents 8fc4580 + 4962ce1 commit 0f4b610
Show file tree
Hide file tree
Showing 51 changed files with 1,406 additions and 1,149 deletions.
9 changes: 8 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
[1.0.0-SNAPSHOT]

- Fix MMB code
- Fix catch key
- Support IntBuffer in GL20
- Update teavm to 0.10.0-dev-1
- Update libgdx to 1.12.1
- Remove obfuscate from build config. Use TeaVMTool.
- Add useDefaultHtmlIndex and logoPath config option.

[1.0.0-b7]
- Remove jParser
Expand All @@ -13,6 +19,7 @@
- Add resources automatically when module contains META-INF/gdx-teavm.properties
- Fix freetype shadow error
- Improve rendering performance
- Add mouse locking

[1.0.0-b6]
- Update libgdx to version 1.12.0
Expand Down
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/r/com.github.xpenatan.gdx-teavm/backend-teavm?nexusVersion=2&server=https%3A%2F%2Foss.sonatype.org&label=release)](https://repo.maven.apache.org/maven2/com/github/xpenatan/gdx-teavm/)
[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/com.github.xpenatan.gdx-teavm/backend-teavm?server=https%3A%2F%2Foss.sonatype.org&label=snapshot)](https://oss.sonatype.org/content/repositories/snapshots/com/github/xpenatan/gdx-teavm/)

gdx-teaVM is a backend solution to run [libgdx](https://github.com/libgdx/libgdx) games in a web browser. It uses [TeaVM](https://github.com/konsoletyper/teavm) behind the scene to convert Java/Kotlin bytecode to Javascript.
gdx-teavm is a backend solution for running [libgdx](https://github.com/libgdx/libgdx) games in a web browser. It uses [TeaVM](https://github.com/konsoletyper/teavm) behind the scene to convert Java/Kotlin bytecode to Javascript.

Note:
* Reflection support is very small so only reflection used in [tests](https://github.com/konsoletyper/teavm/tree/master/tests/src/test/java/org/teavm/classlib/java/lang/reflect) will work.
* teaVM does not support every class methods from java package or JNI native methods. Check teaVM java classes [here](https://github.com/konsoletyper/teavm/blob/master/classlib/src/main/java/org/teavm/classlib).
* TeaVM does not support every class methods from java package or JNI native methods. Check teaVM java classes [here](https://github.com/konsoletyper/teavm/blob/master/classlib/src/main/java/org/teavm/classlib).
* Kotlin [discussions](https://github.com/libktx/ktx/discussions/443).
* Box2d, Bullet and freetype extension use [emscripten](https://emscripten.org/) to convert C++ to Javascript/WebAssembly. Box2d and Bullet use a custom parser ([jParser](https://github.com/xpenatan/jParser)) to help bind javascript code.
* Box2d, Bullet, ImGui, PhysX and Freetype libraries use [emscripten](https://emscripten.org/) and [jParser](https://github.com/xpenatan/jParser) to convert C++ to Javascript/WebAssembly.

## TeaVM Examples:
* [gdx-tests](https://xpenatan.github.io/gdx-teavm/teavm/gdx-tests/)
Expand All @@ -33,6 +33,12 @@ repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url "https://teavm.org/maven/repository/" }
// If there is a problem with the teavm repository, you can try using http
maven {
url = uri("http://teavm.org/maven/repository/")
isAllowInsecureProtocol = true
}
}
```
gdxTeaVMVersion = "1.0.0-SNAPSHOT"
Expand All @@ -41,23 +47,18 @@ repositories {
dependencies {
implementation "com.github.xpenatan.gdx-teavm:backend-teavm:$project.gdxTeaVMVersion"
// Bullet extension
implementation "com.github.xpenatan.gdx-teavm:gdx-bullet-teavm:$project.gdxTeaVMVersion"
// Box2D extension
implementation "com.github.xpenatan.gdx-teavm:gdx-box2d-teavm:$project.gdxTeaVMVersion"
// FreeType extension
implementation "com.github.xpenatan.gdx-teavm:gdx-freetype-teavm:$project.gdxTeaVMVersion"
}
```

## Supported Extensions:
- Box2D (WIP)¹
- Bullet Physics (WIP)²
## Supported libraries:
- [Box2d](https://github.com/xpenatan/gdx-box2d) (WIP). Use GWTBox2d for now.
- [Bullet](https://github.com/xpenatan/gdx-bullet) (WIP)
- [PhysX](https://github.com/xpenatan/gdx-physx) (WIP)
- [ImGui](https://github.com/xpenatan/gdx-imgui) (WIP)
- FreeType

¹: Box2D extension is WIP, please check if the class/method your game use is in [webidl](https://github.com/xpenatan/gdx-teavm/blob/master/extensions/gdx-box2d/gdx-box2d-build/jni/box2D.idl) file. If not, you can use gdx-box2d-gwt. <br>
²: Bullet extension is WIP, please check if the class/method your game use is in [webidl](https://github.com/xpenatan/gdx-teavm/blob/master/extensions/gdx-bullet/gdx-bullet-build/jni/bullet.idl) file. This extension does not support some custom [c++ code](https://github.com/libgdx/libgdx/tree/master/extensions/gdx-bullet/jni/src/custom/gdx) from libgdx bullet.

## Generator:
A WIP standalone tool to convert your libgdx game in .jar or .class format to javascript. [Example](https://youtu.be/BIL_5eaxg9w)
<br>
Expand Down
Loading

0 comments on commit 0f4b610

Please sign in to comment.