[MarsZ] Unity3d game development-Guide to Unity3d full planning and configuration, marszunity3d

Source: Internet
Author: User

[MarsZ] Unity3d game development-Guide to Unity3d full planning and configuration, marszunity3d

Unity3dFull planning and Configuration Guide

 

Preface... 2

Version... 2

Author... 2

Function... 2

Type... 2

Trigger type... 2

Step Type... 3

Implementation... 4

Summary... 4

Planning... 4

Procedures... 4

Flowchart... 5

Detailed technical solution... 6

Main program logic... 6

Key details... 6

 

 

 

Attachment: word version Baidu cloud disk download

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

Preface

This document describes how to plan, flexibly configure, and diversify new user guides in Unity3d. If you do not understand the design, you can log on to the game (《Maguba xiyou) Experience. If you have any technical questions, contact the author MarsZ to answer the question, qq0000491198.

July 28, 2015

Version

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

Author

MarsZ (qq0000491198)

 

Function

Triggers a corresponding guide under any conditions to instruct the player to perform operations (such as clicking, dragging, or playing a certain command ). During the guidance period, you cannot perform other unrelated operations except for the specified operation (for example, click unrelated places ). All guidance is flexibly configured by planning, including when to trigger and what guidelines to trigger.

Type trigger type

Guiding trigger conditions (the main condition is the operation that may trigger the guidance, and the secondary condition is the additional Judgment conditions when determining whether the guidance can be triggered)
Format: type, value
===== Only for the primary condition, with the backend ====
1: After a guide is completed, the main interface triggers base_guide.guide_id
2: After a level is reached, base_scene.scene_id is triggered on the main interface.
===== Only the primary condition ====
5: The conversation ends (Level id #1, victory; 2, defeat; 3, victory or defeat; 4, pre-war)
6: Click operation (interface # target # index 0 no index)
7: drag operation (interface # Target 1 # Index 1 # Target 2 # index 2 0 no index)
11: Any fairy blood volume lower than X (%) (linear only)
25: Chapter awards (Level id #0, this level; 1, except this level)
====== Can be a sub-condition ====
10: Enter the area (Level id # area 12345)
14: Battle & round (Level id #1 wins, 2 loses, 3 times out, 4 loses # n times)
15: Battle & round (except level id #1 wins, 2 loses, 3 times out, 4 loses # n times)
16: pre-war configuration, X demons (excluding the main character)
20: The 1st activation attributes of the protagonist are activated (1) (1 cannot be modified)
21: The leading role has been elevated to N (N)
===== Only the sub-condition is:
12: Check the task status (Task id #0, not completed; 1, not received; 2, completed; 3, not triggered; 4, completed)
17: Detection guide status (Guide id #0, incomplete; 1, complete)
18: Check the PVP status (page #0, not started; 1, started)
22: Check the combat status (Level id #0, not in battle; 1, in battle)
23: The total blood volume of the enemy's fairy magic is higher than the percentage (Level id # XX)
24: Check whether the module is unlocked (module id #0, unlocked; 1, unlocked ;)

......

 

Step Type

0: Pure Dialog
1: Arrows
2: Click
3: Drag your finger
4: Double Click
7: function unlock/lock
9: Pause/continue
10: Send the fairy magic location
11: error message
12: Play the unlock Animation
13: move to the main location
14: Combat interface Animation
15: Change the Avatar
16: Click to move
17: Arrow text
18: to a page
20: slide Map

......

Implementation of brief planning

Planning mainly configures two tables to set and control the guidance, respectively:

Base_guideTable andBase_guide_stepTable. The table structures are as follows:

 

Figure 1 structure of the base_guide table

 

Figure 2 structure of the base_guide_step table

Program

The program reads the configuration table. When a user performs certain types of operations, such as clicking, dragging, or receiving/finishing a task, check whether the operations meet the execution conditions of the guiding group (for example, whether the corresponding guiding object is clicked, whether the corresponding object is dragged to the corresponding position, and whether the corresponding task is accepted/completed )., whether the corresponding level is cleared ). If the implementation conditions of a guidance group are met and the current guidance can be implemented (if the interface is not loaded and the interface is not slowed down), the corresponding guidance group (Base_guideTableGuide_id). If not, the guidance will be closed temporarily.

To complete the current steps of a guidance group (Base_guide_stepTableGuide_step_idTo determine whether all the guidance steps of the current guidance group have been completed. If no guidance is completed, the next guidance steps in the Guidance Group will be executed, otherwise, determine whether the next guidance group can be triggered.

Flowchart

 

Figure 3 Flowchart

Detailed technical solution main logic of the program

1. Set the triggering type constant according to the guiding trigger type of planning configuration;

2. Set the corresponding guidance step constant according to the guiding Step Type of planning and configuration, and design the corresponding guiding step interface (for example, the UI, such as click and drag, you need to play the interface with your fingers. For example, you need to use a full screen mask to play an animation );

3. When the interface is opened:

I. check whether there are any gameobjects that can trigger guidance on the Interface Based on the planning configuration. If yes, bind these gameobjects.GuideTriggerGameObjectScripts are used to intercept operations that can trigger guidance, such as OnClick. Send a trigger guide message when an operation is intercepted. The Guidance controller checks whether the operation can trigger the guidance group. If possible, the guidance is provided.

Ii. Based on the planning configuration, check whether the interface has any GameObject that can execute instructions. If yes, bind these gameobjectsGuideGameObjectScript. When the GameObject is being executed in the bound guidance step, adjust the Layer and Depth of the GameObject so that the GameObject can accept click or other corresponding guidance operations. And other display units (if needed ).

4. After the guiding steps are completed, send a message to the Controller. After receiving the instructions, the Controller checks whether the current guiding group has another guiding step. If so, continue to the next guiding step, until all the guidance steps of the Guidance Group are completed.

5. After all the steps in the guidance group are completed, check whether the next guidance group can be triggered. If yes, execute the guidelines. Otherwise, the guidance will be suspended.

Key details

Q: When guiding, only the corresponding guided objects can be clicked, dragged, or highlighted.

A: During guidance, A full screen mask is used to mask A guide layer (level higher than the normal GameObject level). All irrelevant gameobjects are shielded, corresponding to the GameObject in the guidance step, adjust its hierarchy to the layer, and adjust its depth to meet the appropriate depth (you can use UIPanel to set depth if necessary) so that it can accept the event.

 

Q: How to trigger an object with an attribute value. For example, clicking a card with a certain ID value can trigger a specific guide.

A: When the interface is opened, bind the object that can trigger the guiding step.GuideGOInfo(Inherited fromMonoBehaviour) Script, the script attaches the relevant property values (these attributes must be updated instantly when the object information is updated ). When an object encounters a trigger condition (such as being clicked), it checks whether the attribute above meets the trigger conditions of some guidance. If all the conditions are met, the corresponding guidance can be triggered.

 

Q: How to implement the "playback Animation" guide.

A: When triggered, A message event is sent to the outside, requesting "playing an animation" or other operations. When such operations are completed, send a message event to the guide, inform the Guide that the steps are complete, and let the guide proceed.

 

Q: How to continue after reconnection.

A: The key guiding steps will send messages to the backend (seeBase_guide_stepTableTo_server

Field), request the backend to save the guidance group and the instructions. After reconnection, the ID of the backend guidance group and the guiding procedure are used to calculate and execute the currently active guidance group and guiding procedure. If this step is performed on an interface, open the corresponding interface and then perform the following steps.

 

Q: Incorrect guidance clearance.

A: You must have A global guidance mask. The guidance gap (such as step 2) serves as the mask. Remove the mask when the Guide continues or when the Guide ends.

 

Q: How does a GameObject know that it is in the current guidance step.

A: This GameObject hasGuideGameObjectScript, inherited fromMonoBehaviourAnd the script is bound with a list of guidance groups and instructions associated with this GameObject. When an Update is executed, the system determines whether there are currently executed guidance groups and guidance steps in the list of associated guidance groups and guidance steps. If yes, the system is executing its own guidance.

 

Q: How do I know how to bind a GameObject.

A: Send A re-update Binding Request during interface initialization and when the guided GameObject changes may be triggered on the interface.GuideGameObjectAndGuideTriggerGameObject. After the event is received, the system cyclically traverses all Children gameobjects on the GameObject interface to determine whether their names and indexes correspondBase_guide_stepAndBase_guide. If yes, bindGuideGameObjectOrGuideTriggerGameObjectScript, and update the list of guidelines and instructions stored in the script.

 

Related Article

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.