A little thought, war board game map Core what should have? _ Games

Source: Internet
Author: User

A day at home this weekend, thinking about and writing the core functions of the chess game map.

The so-called core function of my understanding is to abstract on the specific game, engine-level things. Before the reference to other people's code, according to their own ideas and understanding to come. The following features have now been implemented

1. The creation of logical maps

The logical map contains only the map data for the entire battlefield. Responsible for dealing with the whole battlefield logic. Each map block is abstracted to the highest level and contains only one attribute: whether the map block can be moved to it by the role. For example, a block for the wall, the role of course can not move to this block.

2. Role System

All roles on the map, the role of specific combat data (such as HP) and the role of basic data separation (such as MAXHP). Here I use bind (binding), which is when you create a specific character to bind a role basic data.

3. Time Lapse system

Traditional game board games can be understood as the time by the turn, each leg first action, then the enemy action. So repeatedly. But I designed the time lapse system includes role action CD, role buff, role skills CD, etc.

4. Skill System

Like the role system, skills are data binding skills (such as skill names, skill ranges, etc.) that are specific to the data (such as skill level).

5. Range Search

For example, role movement, calculation of the role of Action range, the role of the use of XXX skills attack, computing skills, such as the scope of attack.

6. External Operation Response Interface

Some input from the user triggers a specific change in the logic of the map.

There are also some such as NPC AI (This is a big topic ah!). , the buff system (which has been designed in half), the item system, the script trigger (this praise wkm, I have completed the design of the script Engine 1.0 version), etc. need to design and add.

In order to verify the correctness of the program I also sync wrote an ugly command line of the map Core test tool, haha.




Map interface, user input, skill search




Skill attack Range Search, role attack detection




Role Move Range detection




Time Lapse system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.