This project build based on Unreal Engine 5.3 to create a Top-Down low poly RPG game. It draws inspiration from Minecraft, such as its inventory system and artistic style, as well as the Top-Down view, combat system, and isometric indoor scene design of the game Minecraft: Dungeon. CharmingCraft aims to offer a more relaxed gameplay experience, where players can freely explore the map, gather resources to craft weapons, complete quests, and more...
The game project's wiki contains documentation related to game mechanics and game content, you can find them here. It is currently in Chinese, I will update it to English in the future
- Quick hotbar allow player siwtch different modes (
Z
battle,X
Inventory hotbar,C
Building,V
Team) - The complete inventory system includes merging items, using items, drop items, transferring items, and more.
- Detailed item pannel show item attributes and large preview.
- Quickly close and open container, support player open inventory when moving.
- Auto open player inventory when open any container, close both pannel when player inventory is opened by container not by player. (else close only container)
- 10 Equipment slot with equip model binding.
- When switching game modes, automatically load ContextMapping layouts according to the mode to prevent key conflicts.
- Supports building, rotation (using
Q
andE
keys), build specification preview, collision highlighting, destruction, and other functions (pressF
to switch between Build / Destroy mode). - In build mode, automatically disable the interaction between players and interactive objects.
- Supports filters that only allow building in appropriate areas, such as preventing players from building in mining areas.
-
The Chunk system allows the game map to be divided into several cubes of the size 10 x 10 x 10. A single Chunk can be activated as needed, conserving system resources.
-
A single Chunk Tile calculates the grid it occupies in the Construction Script based on the chunk's size (snapped to 100). These grid points (Blue in graph), stored inside the Chunk, play a significant role in resource generation.
-
The Chunk system has integrated the previously Biome box area Actors. Now, it's only necessary to allocate Biome data within a single Chunk, eliminating the need to create Biome boxes and adjust their sizes. After adjusting the Biome and world resource data, the Chunk will randomly generate resources upon activation.
-
Because a Chunk records all the grid points it occupies upon creation, these snap-to-grid points can be easily used for ray tracing.
The new version of the Chunk system integrates the Biome Box Actor to manage and generate natural resources in Chunk units.
-
To avoid resource collisions or parts being suspended in air within a Chunk, the four corners of the bottom face of the box are used for pre-generation judgment.
-
First, a point is randomly selected from the GridPoints pre-stored in the Chunk for pre-generation.
-
The four corner coordinates of the bottom face of the resource Actor's HitBox are used as starting points for ray tracing downwards. If the Z values of the HitResult's return are the same, it can preliminarily be judged as a plane.
-
If the randomly selected point for ray tracing is not obstructed or is the expected terrain, then the Resource Actor can be generated.
- The farming system, in conjunction with the resource gathering system and Chunk system, allows players to find crop seeds for planting within naturally generated brush.
- However, before planting, players need to use a hoe to dig and till the land. The hoe uses the building system's construction indicator to inform players whether the current grid is valid.
- The growth rate of each crop depends on the current soil medium. Different crops have different growth cycles and stage texture models. Players can also configure the drops of crops at different stages (In the future, crop growth timers will count in "game days" rather than seconds).
- Each crop has its own health. When the health reaches zero, the crop drops items. Different weapons and tools cause different damage to crops (for example, the hoe has higher agricultural damage).
The Item Ability System is an expansion and decoupling based on the Game Ability System (GAS), allowing items and equipment in the game to have skill effects. The types of item skills include USE
, SHIFT
, SHIFT_INTERACT
, RIGHT_CLICK
, HOTBAR_CAST
, INTERACT
, PASSIVE
, ON_HIT
, ON_ATTACK
, with specific keys and game events triggering the above skill callbacks.
- An item can have multiple skills of different types, but only one skill per type can be activated. For example, a bow can have four types of right-click shooting skills, but the player can only activate one. The same applies to other types of skills.
- If the player's inventory contains skills of the same type, they are executed in priority order.
- The skill selected and activated by the player is stored in the ItemMeta. The number and type of activatable skills in an item are based on the initial set of skills + material skills of the item + special skills (level, talents, profession, etc.).
- When a player equips an item, the skills within the item are loaded into the Action Components and are unloaded from the Action Components upon unequipping.
Callback Name | Trigger Condition | Related Component |
---|---|---|
USE |
Triggers when a player clicks the "use" button while viewing the item's detailed interface. | Item Detail Pannel |
SHIFT |
Activated when the player presses Shift . |
Controller |
SHIFT_INTERACT |
Activated when the player presses Shift + Interact button (usually the left mouse button). |
Controller |
RIGHT_CLICK |
The skill is triggered by pressing the right mouse button (e.g., the button used for bows in skill demonstrations). | Controller |
HOTBAR_CAST |
The skill is executed based on the specified binding key when the player performs an action from the skill hot-bar. | Skill Hotbar Widget |
INTERACT |
Activated by pressing the interact key (usually the left mouse button). | Controller, Interact Component |
PASSIVE |
A continuously active aura effect when the item is equipped in the inventory. | Buff Handler |
ON_HIT |
A skill executed when the item hits a target, including OnHit in the item's skill. | Action Component |
ON_ATTACK |
A callback skill executed after any OnHit, similar to attack effects. | Action Component |
equip-assemble.mov
- Just like how people make weapons, you can use any material to create different weapon parts and assemble them together
creature-ai.mov
- Many enemies will interact with the scene and they will use their best advantage to try to defeat you
- Current enemies: Slime, Skeleton, Skeleton Shaman
action-system-click.mov
- Although it is a TopDown perspective game, you can click on the target to attack or hold down shift to attack to specify the click direction.
- Different weapons have different attack animations, and the speed of these attack animations depends on your character and equipment attributes.
scene-switching.mov
- When you walk into the room from the outside, the scene switching will be smooth and stylized.
- Use the chain of responsibility design pattern to handle multiple types of damage. The damage is packaged into HitData by struct.
- Use BuffInfo, BuffData, BuffHandler to callback BuffModels implement Buff System.
- Magic, arcane, and some weird stuff...
Skill Name | Can Level Up | Resource Cost | CoolDown | Basic Damage | Description |
---|---|---|---|---|---|
Parry | Yes | None | 2 |
Depends on Projectile | Parry and Reflect the ranged attack |
Sword Draw Slash | Yes | Mana 20 |
5 |
Depends on Weapon | Draw weapon forward and perform a long-range slash, dealing 1.5 times weapon's hit damage. |
Sneak | Yes | Mana 50 |
5 |
110% Critic Damage |
Causing the enemy to lose their target, ensuring a critical hit on the next attack. |
Sprint | Yes | None | 3 |
None | Dash a distance, and become immune to some damage during the dash. |
Arcane Endowment | Yes | Mana 75 |
10 |
Depends on Buff | Randomly select 3 (+) buffs from the Buff pool, lasting for 30 seconds |
Enhanced Arcane Missiles | Yes | Mana 150 |
2 |
30% Magic Damage |
launch arcane missiles toward the mouse pointer direction, with increased damage for each shot, castable up to 3 times, with the third shot causing AOE damage and stunning. |
- Support Stack Buff, Forever Buff.
- User could customize buff atttributes through Duration, Tick time, or pass a TMap contain internal Data.
- 3 Buff time update choices:
Add
,Replace
, andKeep
. - 2 Buff remove Stack choices:
Clear
andReduce
. - 7 Customize Buff Callback:
On Create
,On Remove
,On Tick
,On Hit
,On Be Hit
,On Kill
, andOn Be Killed
. - User could implements different Callback to customize buff behaviour.
game-save-menu-select-ui.mp4
- Use Ring Structure Double link list to manipulate player save slot and Update preview render.
- Support player create, delete, select, and switch.
- SaveGames
- save -
uuid
- LevelData.sav
- PlayerData.sav
- ProgressData.sav
- RealmData.sav
- save -
The Resource Gathering System enables players to collect various resources in the game by inheriting from ResourceEntityActor to define resource entities that appear in the game. Additionally, the game's Biome system will refresh resources within a specified area over a period of time, ensuring a certain quantity is maintained. Structure See here.
Realm - Build using blender and Unreal Cube grid tool
Pub Interior - Build using blender and Unreal Cube grid tool, Design reference γUnpackingγ
Loford - A town with houses and npcs, Build using blender and Unreal Cube grid tool
Stability: π© Stable / π¨ Unstable / β Not Test / π₯ Failed
- Implementation of chests and keys using GameTags π©
- Material highlight and glow upon impact π©
- Interactive item highlight and player obstruction glow π©
- Inventory system and item prototypes π©
- Armor forging station π©
- Rendering 3D items in 2D π©
- Item assembly mechanism, crafting items from different materials π©
- Weapon assembly, assembling different types and materials of parts for various weapon parts β
- Attack animations and ranges based on different weapon types π©
- Dota-style mouse movement attack system, including character rotation and new stationary attacks π¨
- Damage number animations based on player's attack direction π©
- Comprehensive AI system, including EQS, Behavior Trees, Decorators, and Services π©
- Buff System Include BuffData, BuffInfo, BuffHandler, and BuffModel (Callback) π©
- Game Start UI and World Select UI π©
- Game Serialization System (Json, FString) to UObject β
- Game resource system with regenerated resource π©
- Resource fracture mechanism implement by Chaos Destruction system π©
- GameMode system that support key mapping base on different ganemodes π©
- Build system and visual enhancement support place, rotate and break π©
- Chunk Based Resource Generation π©
- Level Instance streaming load levels and travel player π©
- Map Travel system combined with level loaded and unloaded π©
- Crafting system that support multiple input and output π©
Context | Priority | State |
---|---|---|
Game context serialization | Highest | β |
Complete attribute UI | Normal | β |
Per Item Ability System | Normal | β |
Quest system with related NPCs | Normal | π |
PCG Random dungeons | Normal | π |
Animals and monster iteration | Normal | π |
Crafting System and RecipeRegistry | Normal | β |
Time system: Ingame Date and Days | Normal | π |
Resource collection system, ores, trees, farmland | Normal | β |
Biome: Respawn of monsters, resources, creatures | Low | β |
Developing an engaging storyline | Lowest | π |
Reset inventory UI and drag method | Lowest | β |
- If the player cancels the interaction, ray tracing will still be performed, causing widespread resource actror damage.
- Fixing stuck and jittery issues when interacting with items on high ground (Fixed)
- Correct movement behind buildings when obstructed (Ray Tracing)
- Dynamic pathfinding improvements, refreshing available routes when players destroy blocks or interact with items (Fixed)
- Changing item dropping from generation to a throwing action
- Rendering 3D items into 2D images requires manual placement of RenderTargetActor in the world, otherwise it fails (Fixed)
- The
OnHit()
method of weapons is determined by the weapon type, consider passing in a weapon class template for the interaction component to execute the template class method for HitData transmission (Fixed) - Combind ItemAbility System to part of Build Module, allow Ability data structure contained visual enhancement object.
- Assets
- models
- textures
- Source
- Core (Game Logic and Mechanism)
- Attribute (RPG attribute system)
- Buff (RPG buff system)
- Builds (Build System and Block)
- Container (Widget and Container hold itemstack)
- Damage (RPG Damage system)
- Decoration (Decoration system)
- Craft (Craft system)
- Entity (Drop Entity and Creatures template)
- GameMode (Gamemode for different cases)
- Interact (Interact system)
- Item (Item system and Inventory)
- Log (Log system and naming)
- Save (Save system and Seriliazation)
- Skill (RPG skill system)
- UI (UI handler and UI template)
- World (World system)
- Resource (Resource System)
- Controller (Different Controller)
- Camera (Different Camera)
- Content (Content that Extend from Core Mechanism)
- Core (Game Logic and Mechanism)
The following content is written based on the technology used in the project. It does not cover all aspects of Unreal Engine. Unfinished records are not displayed on the main README but are shown in the project's Wiki.
- Principles of Melee Attack Implementation
- Rendering 3D Items in 2D
- Minecraft Item Structure
- Equipment Assembly - Armor
- Equipment Assembly - Weapons
- Skill System
- Combat Damage Transmission Chain
- Vector Multi-Damage Indicators
- Buff System
- Link is Here