CN111552458A - Game system architecture construction method, realization method, device and system - Google Patents

Game system architecture construction method, realization method, device and system Download PDF

Info

Publication number
CN111552458A
CN111552458A CN202010239681.2A CN202010239681A CN111552458A CN 111552458 A CN111552458 A CN 111552458A CN 202010239681 A CN202010239681 A CN 202010239681A CN 111552458 A CN111552458 A CN 111552458A
Authority
CN
China
Prior art keywords
entity
controller
function
entity object
game system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010239681.2A
Other languages
Chinese (zh)
Other versions
CN111552458B (en
Inventor
陈瑽
田吉亮
寇京博
王朔
庄涛
杨凯允
陈嘉伟
殷宏亮
张峰
姚逸宁
徐丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Chijinzhi Entertainment Technology Co ltd
Original Assignee
Beijing Chijinzhi Entertainment Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Chijinzhi Entertainment Technology Co ltd filed Critical Beijing Chijinzhi Entertainment Technology Co ltd
Priority to CN202010239681.2A priority Critical patent/CN111552458B/en
Publication of CN111552458A publication Critical patent/CN111552458A/en
Application granted granted Critical
Publication of CN111552458B publication Critical patent/CN111552458B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Stored Programmes (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a construction method, an implementation method, a device and a system of a game system architecture, wherein the construction method comprises the steps of defining an initial function and a logic function of a game system through a controller, defining a context object of the game system in the initial function, controlling the context object to create a plurality of entity objects containing entity attributes through the controller, controlling the context object to create a plurality of different function subsystems through the controller, receiving the calling of the controller by the function subsystems to execute the logic function on the entity object quoted by the controller according to the logic function, and constructing the game system architecture based on the context object, the entity object and the different function subsystems. The embodiment of the invention can effectively realize the decoupling of the data and the logic function, improve the multiplexing rate of the data and the logic function and save the development resources of the game.

Description

Game system architecture construction method, realization method, device and system
Technical Field
The invention relates to the technical field of game system architecture, in particular to a construction method, an implementation method, a device and a system of game system architecture.
Background
In the prior art, an ECS (Entity-Component-System) in a game architecture is very powerful in data decoupling, logic multiplexing, and the like, and can improve game efficiency and reduce the size of memory and transmission data, and an MVC (Model View Controller) architecture used in a conventional game architecture is divided into three layers of data, View, and control, where generally one View layer corresponds to one control layer, part of codes of the control layer are repeated, and a database has a large amount of logic processing contents.
Unity has a very good realization on the front-end architecture of ECS, which can be well combined with Unity, but the combination is very complicated, and much extra work is needed to do data decoupling (EC part) and solve the multiplexing problem of logic (S part). In the use of the architecture, there is also a certain requirement on the architecture understanding level of the programmer itself to achieve an effective separation of entity E and component C.
Applying the architecture ECS to the backend can cause a number of problems. Because the backend does not have as many objects as the frontend need to be decoupled and does not need to do too much work of decomposing the objects, in the development of the backend system, if the ECS architecture is used, many problems occur to the splitting of the entity E and the component C, and many contents may be frequently reconstructed according to the change of the requirements. In order to achieve the original purpose of decoupling the architecture, the complexity of the architecture is improved to a certain extent, and the execution efficiency is reduced.
Disclosure of Invention
In view of the above, the present invention is proposed to provide a construction method, an implementation method, an apparatus and a system of a game system architecture that overcome the above problems or at least partially solve the above problems.
According to an aspect of the embodiments of the present invention, there is provided a method for constructing a game system architecture, including:
defining, by a controller, an initial function and a logical function of a game system, a context object of the game system being defined in the initial function;
controlling, by the controller, the context object to create a plurality of entity objects containing entity attributes;
creating, by the controller control context object, a plurality of different function subsystems for receiving calls of the controller to perform logical functions on entity objects referenced by the controller in accordance with the logical function functions;
and constructing a game system architecture based on the context object, the entity object and the different functional subsystems.
Optionally, the entity object includes an identity attribute, and the controller controls the context object to create a plurality of entity objects including an entity attribute, including:
controlling the context object to create a plurality of entity objects through the controller, forming an entity object array by the entity objects and storing the entity object array in the context object;
and respectively allocating unique identifiers for each entity object in the entity object array so as to identify the identity of the entity object.
Optionally, the entity object includes a grouping attribute, and the controlling the context object by the controller to create a plurality of entity objects including an entity attribute includes:
and controlling the context object to create a plurality of entity objects through the controller, dividing the entity objects into different groups according to a preset rule, and recording the groups to which the entity objects belong.
Optionally, the entity object includes a feature attribute, and the controller controls the context object to create a plurality of entity objects including an entity attribute, including:
and controlling the context object to create a plurality of entity objects through the controller, configuring corresponding object characteristics for the entity objects respectively, and recording the object characteristics in a key-value form.
Optionally, the logic function includes an update function, and the function subsystem is configured to update the state of the characteristic attribute of the entity object referenced by the controller according to the update function.
Optionally, the object characteristics of the entity object include at least one of entity speed, entity location, and entity orientation.
According to another aspect of the embodiments of the present invention, there is also provided a method for implementing a game system architecture, including:
determining an entity object to be controlled, a function subsystem to be called and an entity object control mode according to a control instruction received by a controller;
searching and referencing the entity object to be controlled from an entity object array containing a plurality of entity objects stored in a context object through the controller;
and calling the functional subsystem through the controller, and controlling the referenced entity object to be controlled by using the called functional subsystem according to an entity object control mode.
Optionally, each entity object in the entity object array has a unique identifier, and the controller searches and refers to the entity object to be controlled from an entity object array containing a plurality of entity objects stored in a context object, including:
acquiring the unique identification of the entity object to be controlled through the controller;
and searching and referencing the entity object corresponding to the acquired unique identifier from an entity object array containing a plurality of entity objects stored in the context object.
Optionally, the controller defines an initial function and a logical function of the game system in advance, calls the function subsystem through the controller, and controls the referenced entity object to be controlled according to an entity object control manner by using the called function subsystem, including:
calling the functional subsystem through the controller, and configuring control parameters for the logic function according to the entity control mode;
and the called functional subsystem initializes the referenced entity object to be controlled based on the initial function and controls the initialized entity object according to the logic function configured with the control parameter.
Optionally, each entity object in the entity object array is preconfigured with object features, and the called functional subsystem initializes the referenced entity object to be controlled based on the initial function, including:
the called functional subsystem reads the object characteristics of the entity object to be controlled;
initializing the referenced entity object to be controlled based on the initial function and according to the read object characteristics.
Optionally, the object characteristics of the entity object include at least one of entity speed, entity location, and entity orientation.
Optionally, the logic function includes an update function, and controlling the initialized entity object according to the logic function configured with the control parameter includes:
and updating the object characteristic state of the initialized entity object according to an updating function configured with the control parameters.
Optionally, the referenced entity object to be controlled includes at least two groups of entity objects, the control parameter includes different control parameters configured for the update function for each group of entity objects, and the updating the object feature state of the initialized entity object according to the update function configured with the control parameter includes:
determining control parameters corresponding to each group of entity objects respectively;
and updating the object characteristic states of the initialized various groups of entity objects according to the updating function of the configuration control parameters.
According to another aspect of the embodiments of the present invention, there is also provided a game system architecture construction apparatus, including:
the game system comprises a definition module, a logic function module and a control module, wherein the definition module is suitable for defining an initial function and a logic function of the game system through a controller, and a context object of the game system is defined in the initial function;
a creation module adapted to control the context object to create a plurality of entity objects containing entity attributes through the controller;
the creating module is further adapted to create a plurality of different functional subsystems through the controller control context object, wherein the functional subsystems are used for receiving the call of the controller to execute the logic function on the entity object referenced by the controller according to the logic function;
and the construction module is suitable for constructing a game system architecture based on the context object, the entity object and different functional subsystems.
Optionally, the entity object contains an identity attribute, and the creation module is further adapted to:
controlling the context object to create a plurality of entity objects through the controller, forming an entity object array by the entity objects and storing the entity object array in the context object;
and respectively allocating unique identifiers for each entity object in the entity object array so as to identify the identity of the entity object.
Optionally, the entity object contains a grouping attribute, and the creation module is further adapted to:
and controlling the context object to create a plurality of entity objects through the controller, dividing the entity objects into different groups according to a preset rule, and recording the groups to which the entity objects belong.
Optionally, the entity object contains a characteristic attribute, and the creation module is further adapted to:
and controlling the context object to create a plurality of entity objects through the controller, configuring corresponding object characteristics for the entity objects respectively, and recording the object characteristics in a key-value form.
Optionally, the logic function includes an update function, and the function subsystem is configured to update the state of the characteristic attribute of the entity object referenced by the controller according to the update function.
Optionally, the object characteristics of the entity object include at least one of entity speed, entity location, and entity orientation.
According to another aspect of the embodiments of the present invention, there is also provided an implementation apparatus of a game system architecture, including:
the determining module is suitable for determining an entity object to be controlled, a function subsystem to be called and an entity object control mode according to a control instruction received by the controller;
the reference module is suitable for searching and referencing the entity object to be controlled from an entity object array containing a plurality of entity objects stored in a context object through the controller;
and the control module is suitable for calling the functional subsystem through the controller and controlling the referenced entity object to be controlled by using the called functional subsystem according to an entity object control mode.
Optionally, each entity object in the entity object array has a unique identifier, and the reference module is further adapted to:
acquiring the unique identification of the entity object to be controlled through the controller;
and searching and referencing the entity object corresponding to the acquired unique identifier from an entity object array containing a plurality of entity objects stored in the context object.
Optionally, the controller is predefined with an initial function and a logical function of the game system, and the control module is further adapted to:
calling the functional subsystem through the controller, and configuring control parameters for the logic function according to the entity control mode;
and the called functional subsystem initializes the referenced entity object to be controlled based on the initial function and controls the initialized entity object according to the logic function configured with the control parameter.
Optionally, each entity object in the entity object array is configured with an object feature in advance, and the control module is further adapted to:
the called functional subsystem reads the object characteristics of the entity object to be controlled;
initializing the referenced entity object to be controlled based on the initial function and according to the read object characteristics.
The object characteristics of the entity object include at least one of entity speed, entity location, and entity orientation.
Optionally, the logic function comprises an update function, the control module being further adapted to:
and updating the object characteristic state of the initialized entity object according to an updating function configured with the control parameters.
Optionally, the referenced entity object to be controlled includes at least two groups of entity objects, the control parameters include different control parameters configured for the update function for the respective groups of entity objects, and the control module is further adapted to:
determining control parameters corresponding to each group of entity objects respectively;
and updating the object characteristic states of the initialized various groups of entity objects according to the updating function of the configuration control parameters.
According to another aspect of the embodiments of the present invention, there is also provided a game system including:
a controller for defining an initial function and a logical function of the game system, defining a context object in the initial function, and controlling the context object to create a plurality of entity objects and different function subsystems;
the storage unit is used for storing the context object and a plurality of entity objects created by the context object;
and different functional subsystems are used for executing the logic function to the entity object quoted by the controller according to the logic function after being called by the controller.
Optionally, the plurality of entity objects in the storage unit respectively include an identity attribute for identifying an identity of the entity object, a grouping attribute for distinguishing a group to which each entity object belongs, and a feature attribute for identifying an object feature of each entity object.
Optionally, a plurality of entity objects in the storage unit are stored in an entity array form, and an attribute value corresponding to an identity attribute of each entity object in the entity array is a unique identifier of the entity object;
the controller is also used for searching and quoting the entity object to be controlled according to the unique identifier of the entity object, and controlling the quoted entity object to be controlled by utilizing the called functional subsystem according to the logic function.
Optionally, the controller is further configured to read a feature attribute of the entity object to be controlled before controlling the referenced entity object to be controlled, and initialize the referenced entity object to be controlled based on the initial function and according to the read object feature.
Optionally, the context object includes groups attribute and idxs attribute, and is used for distinguishing and managing entity objects and attributes in the entity array.
According to still another aspect of embodiments of the present invention, there is also provided a computer storage medium storing computer program code which, when run on a computing device, causes the computing device to execute the method for constructing a game system architecture in any of the above embodiments and the method for implementing a game system architecture in any of the above embodiments.
According to still another aspect of the embodiments of the present invention, there is also provided a computing device including: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform a method of constructing a game system architecture of any of the embodiments above and a method of implementing a game system architecture of any of the embodiments above.
The embodiment of the invention defines the context object of the game system through the controller, creates the entity object and the different functional subsystems by utilizing the context object, and then can refer to the entity object and the different functional subsystems through the controller, and the different functional subsystems execute the logic function on the entity object referred by the controller by utilizing the logic function defined by the controller. The embodiment of the invention adopts a relatively simple process to construct the game system architecture, can effectively realize effective decoupling of the entity object and the different functional subsystems, and effectively realizes decoupling of data and logic functions because the entity object is data which does not contain logic and the different functional subsystems can execute the logic functions, and also effectively improves the reuse rate of the data and the logic functions and saves development resources of games.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 shows a flow diagram of a method of building a gaming system architecture according to an embodiment of the invention;
FIG. 2 is a block diagram of a controller and gaming system architecture according to an embodiment of the present invention;
FIG. 3 shows a flow diagram of a method of implementing a gaming system architecture according to an embodiment of the invention;
FIG. 4 is a block diagram of a building apparatus of a game system architecture according to an embodiment of the present invention;
FIG. 5 shows a schematic structural diagram of an implementation apparatus of a gaming system architecture according to an embodiment of the invention;
fig. 6 shows a schematic configuration diagram of a game system according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
To solve the above technical problem, an embodiment of the present invention provides a method for constructing a game system architecture, and fig. 1 is a flowchart illustrating a method for constructing a game system architecture according to an embodiment of the present invention. Referring to fig. 1, the method for constructing the game system architecture at least includes the following steps S102 to S108.
Step S102, an initial function and a logic function of the game system are defined through the controller, and a context object of the game system is defined in the initial function.
In the embodiment of the invention, the context object can be used as a unified strong life cycle management and control type object of the game system, and a plurality of context objects can be defined aiming at one game system.
Step S104, the context object is controlled by the controller to create a plurality of entity objects containing entity attributes.
The entity object in the embodiment of the present invention may include various types, for example, the entity object created for the battle system includes a Player, a organ, an interactive object, an enemy, an NPC (Non-Player Character), and the like.
And step S106, controlling the context object through the controller to create a plurality of different functional subsystems, wherein the functional subsystems are used for receiving the call of the controller so as to execute the logic function on the entity object quoted by the controller according to the logic function.
Different functional subsystems of the embodiment of the invention comprise subsystem service logic, and the context object can be created based on the entity object when the functional subsystem is created. The different functional subsystems may include a network system, a BUFF system, a navigation system, a single player logic system, a single enemy logic system, a mobile system, a smart system, an attack system, a skill system, a flight prop system, a hit system, a pet system, an interactive object system, a time system, a win-loss determination system, and the like, which are not particularly limited in this embodiment of the present invention.
And step S108, constructing a game system architecture based on the context object, the entity object and different functional subsystems.
The embodiment of the invention defines the context object of the game system through the controller, creates the entity object and the different functional subsystems by utilizing the context object, and then can refer to the entity object and the different functional subsystems through the controller, and the different functional subsystems execute the logic function on the entity object referred by the controller by utilizing the logic function defined by the controller. The embodiment of the invention adopts a relatively simple process to construct the game system architecture, can effectively realize effective decoupling of the entity object and the different functional subsystems, and effectively realizes decoupling of data and logic functions because the entity object is data which does not contain logic and the different functional subsystems can execute the logic functions, and also effectively improves the reuse rate of the data and the logic functions and saves development resources of games.
In the embodiment of the present invention, the entity object may include an identity attribute uid, a grouping attribute comp, and a feature attribute content, and the following describes a process of creating a plurality of entity objects including the entity attributes for a context object with respect to different entity attributes.
In an optional embodiment of the present invention, the entity object includes an identity attribute uid, and when the entity object is created, the controller controls the context object to create a plurality of entity objects, and the plurality of entity objects form an entity object array and are stored in the context object. And then, respectively allocating unique identifiers for each entity object in the entity object array so as to identify the identity of the entity object. The unique identifier assigned to the entity object may be a globally unique ID, and the globally unique ID may be used as an index when the entity object is searched from the entity object array.
In the embodiment of the invention, the plurality of entity objects contained in the entity object array stored by the context object are actually data without logic, and the data storage can be optimized by taking the entity objects as units, so that the subsequent reference to the entity objects is facilitated, and the operation efficiency of the game system is improved.
In an optional embodiment of the present invention, the entity object includes a grouping attribute comp, when the entity object is created, the context object may be controlled by the controller to create a plurality of entity objects, and the plurality of entity objects are divided into different groups according to a preset rule, and the group to which each entity object belongs is recorded.
In an optional embodiment of the present invention, the preset rule may be a random number generation rule, that is, a plurality of entity objects are randomly grouped, and the plurality of entity objects are divided into different groups by generating a random number for each entity object. For example, grouping physical objects of different player character types among the physical objects, a plurality of different player characters may be divided into two groups of a sense group and a nefarious group by generating random numbers.
In alternative embodiments of the present invention, an entity object may correspond to multiple different groups, for example, the entity object is a player character, which may belong to a sense group or to another group. Therefore, the object grouping attribute comp of the entity object may be an array to record grouping information of the plurality of groups to which the multi-entity object belongs.
In an optional embodiment of the present invention, the entity object includes a feature attribute content, and when creating the entity object, config configuration needs to be performed to create the entity object content. For example, the controller controls the context object to create a plurality of entity objects, respectively configures corresponding object characteristics for the plurality of entity objects, and records the object characteristics in the context object in the form of key-value. Since an entity object may be configured with a plurality of object features, such as the features of entity speed, entity position, entity orientation, etc., the feature attribute content may be an array, that is, configure the config as a KV-type array corresponding to the attribute structure of an entity object.
The configuration config of the embodiment of the invention can be used for initializing the entity object in the subsequent process and can also be used for network transmission. In the embodiment of the present invention, when configuring the entity object, it may further configure a server id and an ip, for example, content [ entityid ] [ server ] is 100, and content [ entityid ] [ ip ] is 127.0.0.0.1.
In an optional embodiment of the present invention, the logic function may include an update function, and after the subsequent controller calls the function subsystem, the called function subsystem is used to update the state of the feature attribute of the entity object referenced by the controller according to the update function. For example, the feature attribute of the referenced entity object includes a location attribute, the called function subsystem is a mobile system, and the location state of the referenced entity object can be updated by the mobile system, so as to implement the movement of the corresponding entity object.
In one embodiment of the present invention, the logic function may also include other functions, for example, the main logic of various battles is similar in the battle system of the game, but may be divided into various PVP (Player rsus Player) systems. The controller Control is used as an entrance of a combat system to define logic functions related to the system. For example, a general PVE (Player VS environment) system may define various functions of passing success, passing failure, fighting initiation, and sweeping, and the embodiment of the present invention is not limited in this respect.
In the embodiment of the present invention, before the state of the feature attribute of the entity object referenced by the controller is updated by the called functional subsystem according to the update function, the called functional subsystem may further initialize the entity object referenced by the controller based on the defined initial function. And further updating the state of the characteristic attribute of the entity object referenced by the controller according to the updating function. For example, the initial function defined in the combat system of the game is a combat initial function, and the physical objects referenced by the controller may be initialized based on the defined combat initial function.
The game System architecture including the Context, the Entity, and the function subsystem System in fig. 2 can be obtained based on the above construction process of the game System architecture.
Fig. 2 schematically shows one functional subsystem System, and actually a plurality of functional subsystems systems may be included in the game System architecture. The entities stored in the Context are Entity object arrays, the Entity object array entities include a plurality of Entity entitlements, and the Entity entitlements include attributes but do not include logical methods. The Context can divide the entity objects of different types into a plurality of groups when the entity objects are created, the Context contains group attributes and idxs attributes, and the entity objects and the attributes contained in the entities array can be distinguished and managed by adopting the group attributes and the idxs attributes.
Each Entity contains an identity attribute uid, a grouping attribute comp, and a feature attribute content, and object features are recorded in the form of key-value. The initial function defined by the controller is an init function and the update function contained by the logic function is an update function, the controller is used as a main entry in the System architecture, inherits from the Context, can Control the Context to generate the Entity, and can reference the Entity, in addition, the controller can also call a function subsystem System, and the called function subsystem System updates the state of the characteristic attribute of the referenced Entity by using the update function.
Based on the same inventive concept, an implementation method of a game system architecture is also provided, and fig. 3 shows a flow diagram of the implementation method of the game system architecture according to an embodiment of the present invention. Referring to fig. 3, the implementation method of the game system architecture at least includes steps S302 to S306.
Step S302, determining the entity object to be controlled, the function subsystem to be called and the control mode of the entity object according to the control instruction received by the controller.
In step S304, the controller searches and refers to the entity object to be controlled from the entity object array containing a plurality of entity objects stored in the context object.
And step S306, calling a function subsystem through the controller, and controlling the referenced entity object to be controlled by using the called function subsystem according to the entity object control mode.
In an embodiment of the present invention, each entity object in the entity object array has a unique identifier, and the unique identifier can be used as an index of the entity object in the entity object array. The unique identification of the entity object may be a globally unique ID to identify the entity.
When the controller searches the entity object to be controlled from the entity object array containing the plurality of entity objects stored in the context object in step S304, the controller first obtains the unique identifier of the entity object to be controlled. And then, according to the obtained unique identifier, indexing from an entity object array stored in the context object to obtain an entity object corresponding to the obtained unique identifier.
In an embodiment of the present invention, the controller is predefined with an initial function init and a logic function of the game system. When the called functional subsystem in step S306 is used to control the referenced entity object to be controlled according to the entity object control manner, the controller may first configure control parameters for the logic function according to the entity control manner. Then, the referenced entity object to be controlled is initialized based on the initial function init by the called functional subsystem. And finally, controlling the initialized entity object through the called functional subsystem according to the logic function configured with the control parameter. Of course, before the entity object is controlled by the called functional subsystem, the functional subsystem may also be initialized, which is not described in detail in the embodiments of the present invention.
In this embodiment, each entity object in the entity object array is configured with an object feature in advance, and when the called functional subsystem initializes the referenced entity object to be controlled based on the initial function init, the object feature of the entity object to be controlled may be read first. And then, initializing the referenced entity object to be controlled based on the initial function and according to the read object characteristics.
The object feature in this embodiment may include an entity position, an entity speed, an entity orientation, and the like of the entity object, which is not specifically limited in this embodiment of the present invention.
The logic function may include an update function update, such that, after the function subsystem is called, the object feature state of the initialized entity object may be updated by the called function subsystem according to the update function configured with the control parameter.
In an embodiment of the present invention, the referenced entity objects to be controlled may include at least two groups of entity objects, such as two groups of entity objects, which are a sense role of the sense group and a nefarious role of the nefarious group, respectively. The control parameters may include different control parameters configured for the update function for each set of entity objects, such as different control parameters configured for a sense role for a sense group and a nefarious role for a nefarious group. Therefore, when the object feature state of the initialized entity object is updated according to the update function configured with the control parameters, the control parameters respectively corresponding to each group of entity objects may be determined first, and then the object feature state of each group of initialized entity objects may be updated according to the update function configured with the control parameters.
For example, the entity object to be controlled determined according to the control instruction is a positive role belonging to a positive group and a nefarious role belonging to a nefarious group, the functional subsystem to be invoked is a mobile system movesystem, and the entity object is controlled in a manner of controlling the position movement of the positive role and the nefarious role.
After the controller refers to an entity object to be controlled and calls a mobile system movesystem, when configuring control parameters for an update function according to an entity control mode, configuring a random value of the position + (1-3) of a character in each evil group every 10 milliseconds, and configuring a random value of the position- (1-3) of a character in each sense group every 10 milliseconds. The mobile system movesystem reads the position of the entity object to be controlled, initializes the referenced entity object to be controlled based on the initial function and according to the read position, and updates the object characteristic state of the initialized entity object according to the update function configured with the control parameters. Since the update function update is a continuous and cyclic function, the mobile system movesystem updates the location state of the entity object by the update function after the control parameter is configured, and the update is performed every 10 milliseconds.
After the entity object to be controlled, the function subsystem to be called and the entity object control mode are determined according to the control instruction received by the controller, the entity object to be controlled is searched from the entity object array through the controller, the entity object to be controlled is quoted, and the function subsystem is called through the controller, so that the quoted entity object to be controlled can be controlled by the called function subsystem according to the entity object control mode.
The plurality of entity objects contained in the entity object array stored by the context object are actually data without logic, and data storage can be optimized by taking the entity objects as units, so that subsequent reference to the entity objects is facilitated, and the operating efficiency of the game system is improved.
Based on the same inventive concept, a construction device of a game system architecture is also provided, and fig. 4 shows a schematic structural diagram of the construction device of the game system architecture according to an embodiment of the present invention. Referring to fig. 4, the construction means of the game system architecture includes a definition module 410, a creation module 420, and a construction module 430.
The defining module 410 is adapted to define an initial function and a logical function of the game system through the controller, wherein a context object of the game system is defined in the initial function.
A creation module 420 adapted to create a plurality of entity objects containing entity attributes by the controller-controlled context object.
The creation module 420 is further adapted to create a plurality of different functional subsystems by the controller control context object, the functional subsystems for receiving calls by the controller to perform logical functions on the entity objects referenced by the controller in accordance with the logical function functions.
The building module 430 is adapted to build a game system architecture based on the context object, the entity object, and the different functional subsystems.
In an optional embodiment of the present invention, the entity object includes an identity attribute, and the creating module 420 is further adapted to create a plurality of entity objects by controlling the context object through the controller, and form an entity object array from the plurality of entity objects and store the entity object array in the context object. And respectively allocating unique identifiers for each entity object in the entity object array so as to identify the identity of the entity object.
In an optional embodiment of the present invention, the entity object includes a grouping attribute, and the creating module 420 is further adapted to create a plurality of entity objects by controlling the context object through the controller, divide the plurality of entity objects into different groups according to a preset rule, and record a group to which each entity object belongs.
In an optional embodiment of the present invention, the entity object includes a feature attribute, and the creating module 420 is further adapted to control the context object to create a plurality of entity objects through the controller, configure corresponding object features for the plurality of entity objects, and record the object features in a key-value form.
In an optional embodiment of the invention, the logical function comprises an update function, and the function subsystem is configured to update the state of the characteristic attribute of the entity object referenced by the controller according to the update function.
In an optional embodiment of the invention, the object characteristics of the entity object comprise at least one of entity speed, entity position, entity orientation, and the like.
Based on the same inventive concept, an implementation apparatus of a game system architecture is also provided, and fig. 5 shows a schematic structural diagram of the implementation apparatus of the game system architecture according to an embodiment of the present invention. Referring to fig. 5, the implementation device of the game system architecture includes a determination module 510, a reference module 520, and a control module 530.
The determining module 510 is adapted to determine an entity object to be controlled, a function subsystem to be called, and an entity object control manner according to a control instruction received by the controller.
And the reference module 520 is suitable for searching and referencing the entity object to be controlled from the entity object array containing the plurality of entity objects stored in the context object by the controller.
The control module 530 is adapted to invoke the function subsystem through the controller, and control the referenced entity object to be controlled according to the entity object control manner by using the invoked function subsystem.
In an optional embodiment of the present invention, each entity object in the entity object array has a unique identifier, and the reference module 520 is further adapted to obtain, through the controller, the unique identifier of the entity object to be controlled, and search and reference the entity object corresponding to the obtained unique identifier from the entity object array containing the plurality of entity objects stored in the context object.
In an optional embodiment of the present invention, the controller is predefined with an initial function and a logical function of the game system, and the control module 530 is further adapted to invoke a function subsystem through the controller, configure control parameters for the logical function according to an entity control manner, initialize the referenced entity object to be controlled based on the initial function by the invoked function subsystem, and control the initialized entity object according to the logical function configured with the control parameters.
In an optional embodiment of the present invention, each entity object in the entity object array is configured with an object feature in advance, and the control module 530 is further adapted to read the object feature of the entity object to be controlled by the called function subsystem. And initializing the referenced entity object to be controlled based on the initial function and according to the read object characteristics.
In an optional embodiment of the invention, the object characteristics of the entity object comprise at least one of entity speed, entity position, entity orientation, and the like.
In an optional embodiment of the present invention, the logic function includes an update function, and the control module 530 is further adapted to update the object feature state of the initialized entity object according to the update function configured with the control parameter.
In an optional embodiment of the present invention, the referenced entity objects to be controlled include at least two groups of entity objects, the control parameters include different control parameters configured for the update function and specific to each group of entity objects, and the control module 530 is further adapted to determine the control parameters respectively corresponding to each group of entity objects, and then update the object feature states of the initialized groups of entity objects according to the update function configured with the control parameters.
Based on the same inventive concept, a game system is also provided, and fig. 6 shows a schematic structural diagram of the game system according to an embodiment of the present invention. Referring to fig. 6, the game system includes a controller 610, a storage unit 620, and different functional subsystems, and fig. 6 shows three functional subsystems, namely a functional subsystem 631, a functional subsystem 632, and a functional subsystem 633, and the number of functional subsystems is not particularly limited in the embodiment of the present invention.
A controller 610 for defining an initial function and a logical function of the game system, defining a context object in the initial function, and controlling the context object to create a plurality of physical objects and different function subsystems.
The storage unit 620 is configured to store the context object and the plurality of entity objects created by the context object.
And different functional subsystems are used for executing the logic function on the entity object quoted by the controller 610 according to the logic function after being called by the controller 610.
In an optional embodiment of the present invention, the plurality of entity objects in the storage unit 620 respectively include an identity attribute for identifying an identity of the entity object, a grouping attribute for distinguishing a group to which each entity object belongs, and a feature attribute for identifying an object feature of each entity object.
In an optional embodiment of the present invention, the plurality of entity objects in the storage unit 620 are stored in an entity array form, and an attribute value corresponding to the identity attribute of each entity object in the entity array is a unique identifier of the entity object. The controller 610 is further configured to search and reference the entity object to be controlled according to the unique identifier of the entity object, and control the referenced entity object to be controlled by using the called functional subsystem according to the logical function.
In an optional embodiment of the present invention, the controller 610 is further configured to read a feature attribute of the entity object to be controlled before controlling the referenced entity object to be controlled, and initialize the referenced entity object to be controlled based on the initial function and according to the read object feature.
In an optional embodiment of the present invention, the context object includes a groups attribute and an idxs attribute, and is used for distinguishing and managing the entity objects and attributes in the entity array.
In the game system of the embodiment of the invention, the initial function and the logic function of the game system are defined through the controller, the context object is defined in the initial function, and the context object is controlled to create a plurality of entity objects and different function subsystems. And subsequently, the controller can be used for calling different functional subsystems and quoting the entity object, and the called functional subsystems execute a logic function on the entity object quoted by the controller according to the logic function. The embodiment of the invention can effectively realize the effective decoupling of the entity object and different functional subsystems, namely effectively realize the decoupling of the data and the logic function, effectively improve the reuse rate of the data and the logic function and save the development resources of games.
The plurality of entity objects stored in the storage unit are actually data without logic, and data storage is performed by taking the entity objects as units, so that data storage can be optimized, subsequent reference to the entity objects is facilitated, and the running efficiency of the game system is improved.
An embodiment of the present invention further provides a computer storage medium, where a computer program code is stored, and when the computer program code runs on a computing device, the computer storage medium causes the computing device to execute the method for constructing a game system architecture in any of the above embodiments and the method for implementing the game system architecture in any of the above embodiments.
An embodiment of the present invention further provides a computing device, including: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the method of constructing a game system architecture of any of the embodiments above and the method of implementing a game system architecture of any of the embodiments above.
It is clear to those skilled in the art that the specific working processes of the above-described systems, devices, modules and units may refer to the corresponding processes in the foregoing method embodiments, and for the sake of brevity, further description is omitted here.
In addition, the functional units in the embodiments of the present invention may be physically independent of each other, two or more functional units may be integrated together, or all the functional units may be integrated in one processing unit. The integrated functional units may be implemented in the form of hardware, or in the form of software or firmware.
Those of ordinary skill in the art will understand that: the integrated functional units, if implemented in software and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions, so that a computing device (for example, a personal computer, a server, or a network device) executes all or part of the steps of the method according to the embodiments of the present invention when the instructions are executed. And the aforementioned storage medium includes: u disk, removable hard disk, Read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disk, and other various media capable of storing program code.
Alternatively, all or part of the steps of implementing the foregoing method embodiments may be implemented by hardware (such as a computing device, e.g., a personal computer, a server, or a network device) associated with program instructions, which may be stored in a computer-readable storage medium, and when the program instructions are executed by a processor of the computing device, the computing device executes all or part of the steps of the method according to the embodiments of the present invention.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments can be modified or some or all of the technical features can be equivalently replaced within the spirit and principle of the present invention; such modifications or substitutions do not depart from the scope of the present invention.

Claims (10)

1. A method of constructing a gaming system architecture, comprising:
defining, by a controller, an initial function and a logical function of a game system, a context object of the game system being defined in the initial function;
controlling, by the controller, the context object to create a plurality of entity objects containing entity attributes;
creating, by the controller control context object, a plurality of different function subsystems for receiving calls of the controller to perform logical functions on entity objects referenced by the controller in accordance with the logical function functions;
and constructing a game system architecture based on the context object, the entity object and the different functional subsystems.
2. The method of claim 1, wherein the entity object contains an identity attribute, and wherein controlling the context object by the controller to create a plurality of entity objects containing entity attributes comprises:
controlling the context object to create a plurality of entity objects through the controller, forming an entity object array by the entity objects and storing the entity object array in the context object;
and respectively allocating unique identifiers for each entity object in the entity object array so as to identify the identity of the entity object.
3. The method of claim 1 or 2, wherein the entity object contains a grouping attribute, and wherein controlling the context object by the controller to create a plurality of entity objects containing an entity attribute comprises:
and controlling the context object to create a plurality of entity objects through the controller, dividing the entity objects into different groups according to a preset rule, and recording the groups to which the entity objects belong.
4. The method of claim 1 or 2, wherein the entity object contains a feature attribute, and wherein controlling the context object by the controller to create a plurality of entity objects containing entity attributes comprises:
and controlling the context object to create a plurality of entity objects through the controller, configuring corresponding object characteristics for the entity objects respectively, and recording the object characteristics in a key-value form.
5. A method for implementing a game system architecture, comprising:
determining an entity object to be controlled, a function subsystem to be called and an entity object control mode according to a control instruction received by a controller;
searching and referencing the entity object to be controlled from an entity object array containing a plurality of entity objects stored in a context object through the controller;
and calling the functional subsystem through the controller, and controlling the referenced entity object to be controlled by using the called functional subsystem according to an entity object control mode.
6. An apparatus for constructing a game system architecture, comprising:
the game system comprises a definition module, a logic function module and a control module, wherein the definition module is suitable for defining an initial function and a logic function of the game system through a controller, and a context object of the game system is defined in the initial function;
a creation module adapted to control the context object to create a plurality of entity objects containing entity attributes through the controller;
the creating module is further adapted to create a plurality of different functional subsystems through the controller control context object, wherein the functional subsystems are used for receiving the call of the controller to execute the logic function on the entity object referenced by the controller according to the logic function;
and the construction module is suitable for constructing a game system architecture based on the context object, the entity object and different functional subsystems.
7. An apparatus for implementing a gaming system architecture, comprising:
the determining module is suitable for determining an entity object to be controlled, a function subsystem to be called and an entity object control mode according to a control instruction received by the controller;
the reference module is suitable for searching and referencing the entity object to be controlled from an entity object array containing a plurality of entity objects stored in a context object through the controller;
and the control module is suitable for calling the functional subsystem through the controller and controlling the referenced entity object to be controlled by using the called functional subsystem according to an entity object control mode.
8. A gaming system, comprising:
a controller for defining an initial function and a logical function of the game system, defining a context object in the initial function, and controlling the context object to create a plurality of entity objects and different function subsystems;
the storage unit is used for storing the context object and a plurality of entity objects created by the context object;
and different functional subsystems are used for executing the logic function to the entity object quoted by the controller according to the logic function after being called by the controller.
9. Computer storage medium, computer storage
The storage medium stores computer program code which, when run on a computing device, causes the computing device to perform the method of constructing a gaming system architecture of any of claims 1-4 and the method of implementing a gaming system architecture of claim 5.
10. A computing device, comprising: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform a method of constructing a gaming system architecture of any of claims 1-4 and a method of implementing a gaming system architecture of claim 5.
CN202010239681.2A 2020-03-30 2020-03-30 Construction method, implementation method, device and system of game system architecture Active CN111552458B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010239681.2A CN111552458B (en) 2020-03-30 2020-03-30 Construction method, implementation method, device and system of game system architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010239681.2A CN111552458B (en) 2020-03-30 2020-03-30 Construction method, implementation method, device and system of game system architecture

Publications (2)

Publication Number Publication Date
CN111552458A true CN111552458A (en) 2020-08-18
CN111552458B CN111552458B (en) 2023-11-17

Family

ID=72000067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010239681.2A Active CN111552458B (en) 2020-03-30 2020-03-30 Construction method, implementation method, device and system of game system architecture

Country Status (1)

Country Link
CN (1) CN111552458B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112216178A (en) * 2020-10-21 2021-01-12 北京高途云集教育科技有限公司 Experiment phenomenon simulation method, device and system and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040198479A1 (en) * 2000-03-08 2004-10-07 Igt Computerized gaming system, method and apparatus
CN102054121A (en) * 2009-11-04 2011-05-11 沈阳隆惠科技有限公司 Method for building 3D (three-dimensional) panoramic live-action online game platform
CN106326113A (en) * 2016-08-16 2017-01-11 腾讯科技(深圳)有限公司 Game data monitoring method and device
US20170357489A1 (en) * 2016-06-09 2017-12-14 Jeff Fleurimond System and method for developing applications
CN108595172A (en) * 2018-04-27 2018-09-28 武汉斗鱼网络科技有限公司 A kind of method, terminal installation and storage medium improving game identification code durability
CN109240674A (en) * 2018-08-21 2019-01-18 珠海沙盒网络科技有限公司 A kind of game developing system
CN109966740A (en) * 2019-03-18 2019-07-05 腾讯科技(上海)有限公司 A kind of Scene realization method, device and equipment
CN110639207A (en) * 2019-09-20 2020-01-03 北京代码乾坤科技有限公司 Game data synchronization method, device, storage medium and processor

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040198479A1 (en) * 2000-03-08 2004-10-07 Igt Computerized gaming system, method and apparatus
CN102054121A (en) * 2009-11-04 2011-05-11 沈阳隆惠科技有限公司 Method for building 3D (three-dimensional) panoramic live-action online game platform
US20170357489A1 (en) * 2016-06-09 2017-12-14 Jeff Fleurimond System and method for developing applications
CN106326113A (en) * 2016-08-16 2017-01-11 腾讯科技(深圳)有限公司 Game data monitoring method and device
CN108595172A (en) * 2018-04-27 2018-09-28 武汉斗鱼网络科技有限公司 A kind of method, terminal installation and storage medium improving game identification code durability
CN109240674A (en) * 2018-08-21 2019-01-18 珠海沙盒网络科技有限公司 A kind of game developing system
CN109966740A (en) * 2019-03-18 2019-07-05 腾讯科技(上海)有限公司 A kind of Scene realization method, device and equipment
CN110639207A (en) * 2019-09-20 2020-01-03 北京代码乾坤科技有限公司 Game data synchronization method, device, storage medium and processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112216178A (en) * 2020-10-21 2021-01-12 北京高途云集教育科技有限公司 Experiment phenomenon simulation method, device and system and electronic equipment

Also Published As

Publication number Publication date
CN111552458B (en) 2023-11-17

Similar Documents

Publication Publication Date Title
CN110537169B (en) Cluster resource management in a distributed computing system
US9898700B2 (en) Method, apparatus, and artificial intelligence server for determining artificial intelligence behavior
CN114949861A (en) Artificial Intelligence (AI) model training using cloud gaming networks
US10769147B2 (en) Batch data query method and apparatus
JP6755527B2 (en) Data processing methods and equipment for mobile games
CN108564164B (en) Parallel deep learning method based on SPARK platform
US11269902B2 (en) Time series data management method, device, and apparatus
US20090248597A1 (en) Method and apparatus for computing a change plan
CN1755651A (en) Model and system for reasoning with N-step lookahead in policy-based system management
US20160117196A1 (en) Log analysis
CN109731334B (en) State switching method and device, storage medium and electronic device
CN107526682B (en) Method, device and equipment for generating AI (Artificial Intelligence) behavior tree of test robot
CN110766090A (en) Model training method, device, equipment, system and storage medium
CN111552458A (en) Game system architecture construction method, realization method, device and system
US10769153B2 (en) Computer system and method for setting a stream data processing system
CN111737166B (en) Data object processing method, device and equipment
CN109343913A (en) A kind of game behavior tree control method
CN112190945B (en) Game data processing method and device, computer readable storage medium and electronic equipment
CN114676140A (en) Scene data storage method, device, equipment and medium
CN111737347B (en) Method and device for sequentially segmenting data on Spark platform
CN111290855B (en) GPU card management method, system and storage medium for multiple GPU servers in distributed environment
CN113656508A (en) Method and device for executing transaction in blockchain system
CN105407075B (en) The method and system of service logic
CN116011257B (en) Flow simulation method and device for multi-level task
CN113350800B (en) Physical engine data processing system based on cloud computing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 701-25, floor 7, building 5, yard 1, Shangdi East Road, Haidian District, Beijing 100085

Applicant after: Beijing perfect Chijin Technology Co.,Ltd.

Address before: 701-25, floor 7, building 5, yard 1, Shangdi East Road, Haidian District, Beijing 100085

Applicant before: Beijing chijinzhi Entertainment Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant