LGame
LGame is a cross-platform java game engine(framework), offering comprehensive foundational modules for 2D games (with 3D support planned for future releases). It supports platforms including Windows, Linux, macOS, Android, web browsers, and iOS. Additionally, it provides native implementations in C# and C++ alongside syntax conversion to accommodate as many systems as possible.
Only Android-studio Template : androidstudio-template
All Java code Run Template : loon-gradle-template
('task run' call main methond , 'task dist' packager game to jar)

- 2019 year resurrection continues to update - 2019-03-08.
International Entertainment Machines
Loon

formal name : Loon
A fast, simple & powerful game framework, powered by Java (also supports C# and C++).
LGame Project Restart,The game's just started.
Features
LGame(LoonGame) is a very cool and small game library designed to simplify the complex and shorten the tedious for beginners and veterans alike. With it, you can use the best aspects of OpenGL/OpenGLES in an easy and organized way optimized for game programming. It is built around the concept that beginners should be able to start with the basics and then move up into a more complex plane of development with the veterans, all on the same platform.
LGame puts all of its effort into keeping things short and simple. The initial setup of a game consists only of making a single class; then you are done. The interface is entirely documented for easy and fast learning, so once you are started, there is nothing between you and your killer game but coding and creativity.
LGame is built around the users wishes, so do not hesitate to suggest and critique!
Games Code Samples

Game Run the Example(JavaSE)
package org.test;
import loon.LSetting;
import loon.LazyLoading;
import loon.Screen;
import loon.javase.Loon;
public class Main {
public static void main(String[] args) {
LSetting setting = new LSetting();
// Whether to display the basic debug data (memory, sprite, desktop components, etc.)
setting.isDebug = true;
// Whether to display log data to the form
setting.isDisplayLog = false;
// Whether to display the initial logo
setting.isLogo = false;
// The initial page logo
setting.logoPath = "loon_logo.png";
// Original size
setting.width = 480;
setting.height = 320;
// Zoom to
setting.width_zoom = 640;
setting.height_zoom = 480;
// Set FPS
setting.fps = 60;
// Game Font
setting.fontName = "Dialog";
// App Name
setting.appName = "test";
// Whether to simulate touch screen events (only desktop is valid)
setting.emulateTouch = false;
/* Set the global font to BMFont */
//setting.setSystemGameFont(BMFont.getDefaultFont());
Loon.register(setting, new LazyLoading.Data() {
@Override
public Screen onScreen() {
return new YourScreen();
}
});
}
}
Create a LGame project
LGame comes with a file called LGameProjectMake.jar which is an executable UI and command line tool. You can simply execute the JAR file which will open the setup UI.





关于 LGame
总之就是一个非常懒人化的 2D 全功能游戏库(标准版会增加 3D 支持),基于 OpenGL(OpenGLES)开发,有多平台适配,基本上可以一个 jar 满足绝大多数的 2D 游戏需求(暂时不含网络部分,准备有时间单开项目),目前仅以 Java 语法来说,算是很方便的 2D 游戏库了。
开发思路:
目前计划就是 Java,C#,C++这三种版本(以前想过 go 语言支持,但语法差异大,转译太麻烦,放弃了),但是三个版本并不独立,而是以 Java 版为基础,然而另外两个版本作为多平台的支持环境而存在。
Java 版没什么好说的,jvm 能够直接运行的本地环境封装基本都做了,2d 部分已经快要构建完毕,目前会专注于搞多语言跨平台,跨平台都初步实现以后,再翻过头来增添 3d 功能。
C#版基于 MonoGame(后续会加 Unity 版)封装而成,会提供代码一键转换工具,但只提供 Loon 的 C#版封装,不会提供本地环境支持(代码转化后可以直接使用 MonoGame 和 Unity 提供的),这个完全没难度,直接 Java 转译 C#代码过去就行,更简单是用 ikvm(但是不能用,因为 ikvm 的支持库太大了……),想的话随时可以写完,没完成就是没(特)时(别)间(懒),加 C#支持就是因为自制的 C++版环境适配肯定没有人家多年开发的 C#库做的好,上 C#用户能少走弯路,毕竟现阶段 C/C++版的配置和运行会很复杂……
C 版则是基于 TeaVM 转 C 还有 SDL 封装的实现,一样会提供一键转换,直接 Java2C 后编译运行(根据 cmake 文件的配置不同,可细分具体编译的输出平台),理论上并不存在 C 版不能运行的环境,而且此版本内部也会提供绝大多数环境,特别是游戏机环境的支持。
2026-02-04
C 版大体已经可用,目前只是在调试细节和多平台适配,加了个 win 版 demo(loonJ2C(demo).zip)在 Java 文件夹下,压缩包体积 3.5MB,有兴趣可以体验一下(其中 dialog.ttf 字库非必须,loon 可以读取本地字库,加上只是保险,不加就是 1.5MB 的完整游戏包,基本和纯 SDL 项目体积一致),含控制台信息,方便查看内部运行流程。
PS:稍微解释下执行文件体积。
一般 debug 测试使用 O0 模式,编译 TeaVM 的 C 版转化的 Loon 代码还有 Loon 提供的 SDL2 绑定代码(未来我还会提供一个 SDL3 绑定,SDL2 有一堆第三方跨平台实现不能放弃,SDL3 则是有一堆新特性和新平台支持,也不能放弃),大约会生成 7.5mb 左右的可执行 debug 文件。
而 release 时,有几种情况,若使用 O1 完整编译,体积优先时,可执行文件就会变成只有 3.5mb 左右,加上 SDL2 的支持库,不压缩也仅仅是 5MB 足矣,若选择 O2 或 O3 速度优先模式(demo 使用此模式),体积会略大,但也只需 4-5MB,加上 SDL 库不压缩 6.5MB 左右(PS:部分平台已经不支持 opengl,所以也需要 angle 支持库模拟 gl,比如高版本的 mac,但加个 libGLESv2 也就 5mb 左右,全算上使用 O3 模式,不压缩最多也才 12mb 左右,而且 android 之类平台有本地 angle 绑定,也不需要自行准备,旧有游戏机平台也都支持 gl,更何况还可以上 upx,代码部分我还可以执行更严格的不可达代码剔除,体积还能更小,无论如何变,打成压缩包后全库都不会超过 4mb)。
对比某 u 打包一个 apk 要 40 多 mb,打包一个 exe 要 60-80mb 甚至以上,已经不可同日而语了,你不说别人肯定不知道是 Java 写的。
