System analysis (1)

zhaozj2021-02-17  52

"Systematic Analysis" such a professional vocabulary may immediately scare a large piece, I was the same! However, as long as you read the following text, maybe you will say: 'System analysis' is alive!

As the name suggests 'System Analysis' is the plan for the entire game system, the top down will refine it into a module that can be implemented by the program; then refine each module into a statement. As a result, you can have a process in an orderly manner, and you will not think where to write.

I believe that everyone is very familiar with RPG. The usual rpg can be divided into: message processing system, scene display, and walking system, fighting system, upgrade system, dialog system, and event processing system. Among them, the message processing system is walking into the core module, and the remaining five parts are tight around it. My systematic analysis report is as follows:

"Hero Save" system analysis record name: Heroes save the US: Chinese RPG hardware requirements: Pentium 100 above CPU, 16M memory, SVGA, keyboard, sound card (optional). Software Platform: Windows 95/98 / NT, DirextX 5.0 or above development environment: VC 5.0, DirectX SDK Script: ((see above) Module Analysis:

Message Processing (Core) Scene Show and Walking Fight Upgrade Dialog Event Processing Flowchart: (Note: Specific implementation of each module)

Here did not write the specific implementation method of each module, because I think it is too boring to put a lot of things on a lot of details. In order not to let you lose resistance, I decided to keep these things to the specific implementation, maybe this will be more vivid and beneficial to understand.

Using the remaining time left today, I have established two very important data structures: 'Role' and 'Map' attribute class structure.

// ********* Role attribute structure **********

Typedef struct {

Char name [32]; // Role name

Int width, hight; // role size

INT X, Y; // Current coordinates

INT OLD_X, OLD_Y; // Old coordinates

INT WAY; / / Direction

Int stats; // state

INT level; // rating

INT exp; // experience

INT LIFT; // Life

Int maxlift; // life biggest

Int attact; // attack

INT Defend; // Defense

INT speed; // speed

Char Goods [10]; // Item (up to 10 pieces)

} Role_struct;

// ********* Map structure **********

Typedef struct {

Char name [32]; // Name

Int width; // wide

Int hight; // high

CHAR GROUND; // Ground Materials

CHAR RES [7]; // Reserved

UNSIGNED SHORT * DATA; / / Data

Map_struct;

To make the properties of the same thing, make the program clearly read, which facilitates our convenient management data, grasping the overall situation; more, complying with the object-oriented program design ideas.

Sunday, March 28: Message Processing System

Today's task is very clear, it is the basket frame of the game (ie, the message processing system to establish a game).

Our messaging system and Windows message processing mechanism are actually very similar, all waiting for messages, and then transfer to the corresponding function based on the received message. Different is that the news received by Windows is the system or user input, and our news is customized, such as the small flying knife touched the robber when walking in the forest, then we let the program generate 'fighting Message '(ie: message = fight), the message processing system will immediately go to the fighting module after receiving this message. Don't think about the news, make a simple bit: If you are an operator, there are many phones on your desk, then you have to do: When you have a call, you will pick up the phone, no phone Don't do anything when you rang. Is not it simple! In fact, messaging is the truth.

转载请注明原文地址:https://www.9cbs.com/read-30590.html

New Post(0)