基于 libGDX 开发的 RPG 游戏,实现了完整的游戏系统,包括战斗、存档、UI等功能。
- Java 17
- libGDX 游戏框架
- Gradle (Kotlin DSL)
core/ # 游戏核心模块
├── src/main/java/ # 核心游戏逻辑
├── src/main/resources/ # 游戏资源
└── src/test/ # 单元测试
desktop/ # 桌面版本模块
└── src/ # 桌面特定代码
- 游戏状态管理
- 场景管理
- 资源管理
- 输入处理
- 音频管理
- 回合制战斗
- 伤害计算
- 技能效果
- 战斗AI
- 战斗界面
- 多存档支持
- 自动存档
- 存档加密
- 存档读写
- HUD界面
- 战斗界面
- 菜单界面
- 对话界面
- 物品栏
- 地图加载
- 地图切换
- 碰撞检测
- NPC交互
- 实体工厂
- 组件系统
- 状态管理
- 效果系统
- 音乐播放
- 音效管理
- 音量控制
基础职业可以进化,每个职业有2个进阶方向:
graph TD;
WARRIOR-->KNIGHT;
WARRIOR-->GLADIATOR;
KNIGHT-->PALADIN;
KNIGHT-->WARLORD;
GLADIATOR-->DUELIST;
GLADIATOR-->WEAPON_MASTER;
- 基础攻击
- 物品使用
- HP/MP管理
- 等级提升
- 属性加点
- 物品拖放
- 装备系统
- 消耗品使用
- 物品分类
- 任务追踪
- 任务奖励
- 任务对话
- 任务进度
-
环境要求
- Java 17+
- Gradle 7.0+
-
构建步骤
./gradlew desktop:dist- 运行游戏
java -jar desktop/build/libs/desktop-1.0.jar- WASD:移动
- E:交互
- I:物品栏
- O:选项
- ESC:暂停/菜单
- 左键:选择目标
- 右键:取消
- 1-9:技能快捷键
- 拖放:物品管理
- 双击:使用物品
- 右键:查看详情
-
抽象工厂模式
- 实体创建
- 地图生成
-
装饰器模式
- 效果系统
- 装备强化
-
代理模式
- 资源加载
- 音频管理
-
观察者模式
- 事件系统
- 状态更新
-
组合模式
- UI组件
- 实体组件
-
状态模式
- 游戏状态
- 实体状态
- 添加新职业
- 添加新地图
- 添加新物品
- 添加新技能
- 添加新任务
- 音效系统完善
- 战斗动画优化
- AI行为增强
- 制作系统
- 更多过场效果
- 深度排序优化
- 碰撞系统完善
- 地图动画
- 物品堆叠问题
- 菜单切换特效
- 拖拽选择偏移
- HP/MP显示间隔
- 退出位置重置
This project is based on https://github.com/patrickhoey/BludBourne using LibGDX library.
It is an RPG 2D base game.
The maps are from the Sword of Mana game (GBA) and influenced by the seiken densetsu serie.
The edition was made with Tiled.exe in order to build layers.
- The hero is an animated 2D sprite.
The hero moves freely in the maps with the arrow keys or with "WASD".
The hero will soon be able to interact with NPCs with the "E" key. - NPCs are also animated 2D sprites.
You can interact with them by clicking on them at a proper distance. Some have conversations and quests.
The battle system is a turn based fight.
The screen displays the amount of damage taken and inflicted by the player.
For now, you can do a basic attack and use objects to restore your health and magic. Later you will be able to choose between a various set of attacks.
The option screen is divided into 3 buttons :
- The music settings (music is ok / sound is not implemented yet)
- The control settings
- A back input, so we can return to the previous screen
The option screen is triggered on the "O" key.
The inventory can be displayed through the chest icon on the status UI.
You can drag and drop items and use consumables by double-clicking on them.
When you level up (battle, quest), you will be able to display some more extra points to your base stats.
The game is saved automatically when a specific action is down (change map, get quest, ...).
You can chose to start a new game or load an existing profile on the menu screen.
Base class can evolve if you meet the requirements. Each class can upgrade into 2 different classes, which themselves give 2 possible classes
Upgrading class will grant you different bonuses, from bonus on character stats to weapons stats.
Example of the class tree system for the warrior :
graph TD;
WARRIOR-->KNIGHT;
WARRIOR-->GLADIATOR;
KNIGHT-->PALADIN;
KNIGHT-->WARLORD;
GLADIATOR-->DUELIST;
GLADIATOR-->WEAPON_MASTER;
gameplay demo
battle demo
demo with the new DA (can't show it on a public repo)
-
add sounds & sounds settings
-
battle feature
- entities' animation while attacking
- ultimate attack cutscene
- implement bonus gained by class
- implement magic, resist, ... stats
-
crafting feature
-
credits
-
improve AI
- Objects in inventory are stacking even if there are not the same
- FadeIn effect not working when transition [menu → game]
- Drag and drop selection issue on item's render (items are far from mouse when picking them)
- Sometimes current hp/mp on status HUD add a blank space before the max player's hp/mp
⊗ Reset position when exiting the game is not properly set when you close the game with the X window button (it is fine when exiting with the ESCAPE key)
- More transition effect
- Z sorting
- Improve collision with Box2D
- Animations on map (opening doors, water, ...)



