1. Basic framework
AS3 Page Game Architecture analysis
1. Logical Layer
Model: Data Management layer, responsible for socket communication and data preservation, hold view, controller reference
View: View Management layer, responsible for the presentation of data on the UI and UI interaction, holding model, controller references
controller: Control management layer, responsible for each module data management, holding the model layer of reference
Protocol: Communication Protocol Management layer, responsible for the definition of the protocol, parsing and the corresponding module behavior callback method registration;
2. Auxiliary Tools
• Stage View Focus Control: Manage the current focus view
UI principal Structure Control (Structure): Defines the client hierarchy (background-body content-pop-up layer-loading layer-information hint layer-system hint layer-mouse layer, etc.)
• Pop-up form Control (popup): Controls the display and shutdown of pop-up windows according to different categories of Windows
• System Prompt (Alert): A panel that prompts for system information
• Information Tip (TIP): Tips for props in the game, UI components panel
• Resource loading progress bar (initloading): Responsible for loading game resources
• Panel load progress bar (panelloading): Responsible for the game window, panel loading
• Resource download Progress control (Loadresponder): Load progress is the display of information (load the name of the content, load progress, load quantity, load rate)
• Mouse Mouse Control: Control the mouse in the game position, display and disappear
• Form Drag Drag Control: Controls the drag of the window in the game
2. Resource Management
1. Sound sound Management Sound management class
2. Picture image Management Picture Display class
3. Animation Custommovieclip Management simulation realizes movie clip's function
4. Document file management is primarily responsible for downloading and managing files
5. Shared data cookie management is primarily responsible for the access of local data objects
6. Data Object CustomObject Management, mainly responsible for the format of data operation
3.Avatar Management
Avatar State (common attack, skill attack, defense, standing, squatting, attack, buff effect)
4. Frame animation based on bitmap data
Basic configuration of animation
Buffer pool for animated data
Motion control of animation
5. Seek algorithm BSF (breadth First search)
AS3 Page Game Architecture analysis