The above entity-functionality is followed and to be completed.
The most current version is on the playerName branch (as of May 27 2023). We will force push it to the main branch soon.
To try this project, pnpm install
and then pnpm run dev
The final version is currently under development with more mechanisms being added.
This is a project dedicated to the AW hackathon 2023, demonstrating what can be completed using mud v2. To make a full, finalized game, published onchain, more works need to be done.
Three main features being built here:
- torus-shape map for players to crawl
- block-based battle
- reinforcement = loan
Netherscape's map is composed of 32x32 parcels, each of which is composed of 5x5 terrain types.
When deployed, a 32x32 matrix with uint8 as cell is stored in MapConfig table. The matrix is pre-computed using maze-generation code with python.
There are 10 main parcel types and 9 accessory parcel types. Parcel type is defined in accordance with its boundary types. For example, if a parcel has boundary on top and left, its type name is LEFTUP.
To make the map to appear more dynamic, more accessory parcel types can be introduced. For example, there could be many different types of LEFTUP.
CUSTOMIZED parcel type is reserved to record any change on the parcel. It means that during the game, if a player changes a terrain value on the parcel, its parcel type is changed to "CUSTOMIZED" with new terrain values being stored with key being the hash of the parcel coordinate.
There are two categoris of terrain types, 1) view, and 2) obstruction. A third type, such as buildings, can be added in future work: 3) functional.
A PC instance is spawned using its PC class as the template.
The class template for a playable character, specifying battle stats, such as maxHP. It is worth nothing that each PC class defines two attackIDs for a PC to use.
The PC instance inherits all of its class template's battle stats, but it is open for players and game mechanisms to change each stats individually. Each PC instance also has attributes such as blockstarts and currentHP to be used in battle
A player may initiates a battle against another player by calling siege(): any other playing moving on the same parcel will enter battle with player.
During battle, each PC accumulates energy to spend on attacks on opponent PCs. Some PC accumulates PP faster, some has higher max PP cap. Some attack class consumes higher PP, but they will also have higher crit chance or higher normal damage.
During battle or not, a player can always check on the loan market to find other players' offers as reinforcement to be added into his team.
For reinforcement to arrive, there is a traveling time, measured in blocks, calculated by the distance between players divided by a traveling speed constant.
More work needs to be done because the current rule sets isn't enough to support an autonmous world.
Stay tuned.