[Marsz] Unity3d Game development Unity3d Full-plan configuration Novice Guide

Source: Internet
Author: User

Unity3d Full-plan configuration Novice Guide

Objective... 2

Version... 2

Author... 2

Function... 2

Type... 2

Trigger Type ... 2

Step Type ... 3

Realize... 4

Briefly... 4

Planning aspects ... 4

Procedural aspects ... 4

Flow chart... 5

Detailed Technical Solutions ... 6

Program Main logic ... 6

Key Details FAQ ... 6

Attached: Word version of Baidu cloud disk download

Http://pan.baidu.com/s/1DbNxs

Objective

This document describes the Unity3d support for flexible configuration, rich diversity of novice guidelines, such as the design is not clear of the place, you can login to the game (" Devil's West Tour ") experience. Technical questions, can contact the author Marsz solution, QQ569491198.

July 28, 2015

Version

V1.2 (July 29, 2015 11:33:09)

Author

Marsz (QQ569491198)

Function

Under any given condition, a corresponding guideline is triggered to instruct the player to perform a related action (such as clicking, dragging, or playing an instruction). During the guideline, other unrelated actions (such as clicking irrelevant places) cannot be performed except for the specified action. All guidelines are flexibly configured, including when to trigger, what guidelines to trigger, etc.

Type Trigger type

Guideline trigger conditions (the main condition is the action that may trigger the guide, and the condition is the additional judging condition when the guideline can be triggered)
Format: Type,value
===== only for main condition, back end with =====
1: After completing a guideline, the main interface triggers base_guide.guide_id
2: First pass a level, the main interface trigger base_scene.scene_id
===== only the main condition =====
5: End of the level Dialogue (level id#1, defeat, 2, defeated, 3, win or defeat; 4, before the war)
6: Click action (Interface # target # index 0 no index)
7: Drag operation (Interface # target # # index # target # 2 0 no index)
11: Any magical blood volume is less than x (%) (for linear only)
25: Chapter Award (Level id#0, the level; 1, except for the level)
===== can be a sub-condition =====
10: Enter the area (level id# area 12345)
14: Battles & Rounds (level ID # 1 wins; 2 defeats; 3 timeout; 4 defeated # n times)
15: Battle & Round (except level ID # 1 wins; 2 defeats; 3 timeout; 4 defeated # n times)
16: Pre-war configuration, has played X magic (not including the protagonist)
20:1th activation attribute of the protagonist activated (1) (1 not modifiable)
21: The protagonist has been promoted to n level (n)
===== only for sub-conditions:
12: Detection Task status (Task Id#0, unfinished, 1, complete without collar, 2, complete has been taken; 3, not triggered; 4, completed)
17: Detection guideline status (guideline id#0, unfinished; 1, completed)
18: Detect PVP status (interface #0, not started; 1, start)
22: Detect Combat status (level id#0, non-combat; 1, in combat)
23: Detect Enemy Demon total blood volume higher than percent (level id#xx)
24: Check whether the module is unlocked (module id#0, unlocked; 1, unlocked;)

......

Step type

0: pure Dialogue
1: Arrow indicates
2: Finger click
3: Finger Drag
4: Finger Double-click
7: Function Unlock/Lock
9: Combat Pause/Resume
10: Send the Magic location
11: Right and wrong tips
12: Play Unlocked animation
13: Move to the main boundary location
14: Animation of the battle screen
15: Switch Avatar
16: Click to move
17: Arrow Text
18: To a certain interface
20: Slide Map

......

To achieve a brief planning aspect

Planning mainly through the configuration of 2 tables to achieve the guidance of the setting and control, respectively:

base_guide table and base_guide_step table. Table structures are:

Figure 1 Base_guide Table structure

Figure 2 BASE_GUIDE_STEP Table structure

Procedural aspects

The program reads the configuration table, when the user performs certain types of actions, such as clicking, dragging or receiving/completing a task, clearing a level, and so on, detecting the execution conditions of the guidance group that the relevant operation can satisfy (such as whether or not the corresponding object is clicked, whether the corresponding objects are dragged to the corresponding position, whether the corresponding task is accepted , whether the corresponding level is cleared). If a guideline group is satisfied with the execution conditions and is currently able to perform guidelines (such as not loading the interface, the interface is not easing, etc.), then the corresponding guideline group (base_guide table's guide_id guidelines) is executed. If not, the guideline ends temporarily.

After completing the guidelines for the current steps of a guideline group (base_guide_step the guide_step_id of the table), determine whether all the guidelines of the current guideline group have been executed, and if not done, The next guideline step in the guideline group is executed, otherwise the next guideline group can be triggered.

Flow chart

Figure 3 Flowchart

Detailed Technical Program main logic

1, according to the guidance of the planned configuration trigger type, set the corresponding guidance trigger type constants;

2, according to the planning of the configuration of the Guide step type, set the corresponding guide step constants, design the corresponding guide step interface (such as the need for interface, such as click and drag, etc. need to play the finger interface. If you play an animation that requires a full screen mask, etc.);

3. When opening the interface:

I, according to the planning configuration, to detect whether the interface can trigger the guidance of the Gameobject, if any, to these gameobject binding guidetriggergameobject script, to intercept can trigger the instructions, such as Click (OnClick) and so on. When the operation is intercepted, a trigger-guided message is sent. Directs the controller to detect if the operation can trigger a guideline group, if possible, to guide it.

II, according to the planning configuration, to detect whether the interface has the ability to perform guidelines gameobject, if any, to these gameobject binding guidegameobject script. When the gameobject is in the process of binding guidelines, adjust the layer and depth of the gameobject so that the gameobject can accept clicks or other corresponding instructions. and highlighting (if needed) independently of the other display units.

4, after the guidance step is completed, send the message to the controller, after the controller receives, detects whether the current guideline group has the next guideline step, if so, proceed to the next guideline step until all the guideline steps of the guideline group are completed.

5. After all the steps of the guideline group are complete, the test can trigger the next guideline group, if it can be executed, otherwise the guideline will be suspended.

Key Details FAQ

Q: When it comes to guidelines, only the corresponding guiding objects can accept events such as clicking, dragging, or highlighting.

A: A mask that guides the layer (level above the normal gameobject), masks all extraneous gameobject, corresponds to the gameobject in the Guide step, adjusts its level to layer, Adjust its depth to fit the depth (UIPanel can be used to set the depth if necessary), allowing it to accept events.

Q: A specific guideline is triggered by clicking on an object with an attribute value. Clicking on a card of an ID value of a certain type can trigger a specific guideline.

A: When you open the interface, bind the guidegoinfo(Inherit from monobehaviour) script to the object that triggers the instruction step, and the script attaches the relevant attribute values (these properties are updated immediately when the information on the object is updated). When an object encounters a trigger condition (such as being clicked), the detection of the above attribute also satisfies the triggering conditions of certain guidelines, and if all conditions are met, the corresponding guideline can be triggered.

Q: The execution scenario for the "Play animation" type of the guide step.

A: For this type of guideline step, when triggered, send a message event to the outside, request "play animation" or other action. When this type of operation is complete, send a message event to the guide, informing the guide that the step is complete, and that the guideline continues to execute.

Q: The continuation of the guide after the wire break is connected again.

A: Key guidance steps send a message to the backend (see base_guide_step Table of to_server

field), requesting the backend to save the guideline group and the guidance steps. After the wire break is re-connected, the guideline group and the guideline steps that should be in the back end are calculated and executed by combining the guidance group ID and the guideline steps. If the step is performed in an interface, open the corresponding interface and follow the guidance steps.

Q: About the Guide clearance error operation.

A: To have a global guide mask mask, to guide the gap between the 2 steps, such as the role of masking. The guide continues to execute or the mask is removed after the guideline is finished.

Q: How does a gameobject know that he is in the current guidance step?

A: The gameobject will have a guidegameobject script that inherits from Monobehaviour, and the script is bound to have a list of guidance groups and guidance steps associated with this gameobject. When the update executes, it will determine the list of guidance groups and guidelines for which it is bound, whether there are currently executing guideline groups and guidance steps, and if so, the guidelines that are being executed in relation to itself.

Q: How to know what the guidelines are for a gameobject binding.

A: Send an event to re-update bindings guidegameobject and guidetriggergameobject when the interface is initialized and the Gameobject changes in the interface that may trigger the guideline. After receiving the event, loop through all children gameobject on the gameobject of this interface to determine if the name and index correspond to base_guide_step and base_guide , if any, Bind the guidegameobject or guidetriggergameobject script, and update the list of Guide groups and guide steps stored in the script.

[Marsz]unity3d Game development Unity3d Full-plan configuration Novice Guide

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.