CN113680068A - Game development engine and Docker interaction method, device and system - Google Patents

Game development engine and Docker interaction method, device and system Download PDF

Info

Publication number
CN113680068A
CN113680068A CN202110839674.0A CN202110839674A CN113680068A CN 113680068 A CN113680068 A CN 113680068A CN 202110839674 A CN202110839674 A CN 202110839674A CN 113680068 A CN113680068 A CN 113680068A
Authority
CN
China
Prior art keywords
docker
game development
data packet
development engine
data
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.)
Pending
Application number
CN202110839674.0A
Other languages
Chinese (zh)
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.)
Guangzhou Sanqi Mutual Entertainment Technology Co ltd
Original Assignee
Guangzhou Sanqi Mutual 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 Guangzhou Sanqi Mutual Entertainment Technology Co ltd filed Critical Guangzhou Sanqi Mutual Entertainment Technology Co ltd
Priority to CN202110839674.0A priority Critical patent/CN113680068A/en
Publication of CN113680068A publication Critical patent/CN113680068A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/70Game security or game management aspects
    • A63F13/77Game security or game management aspects involving data related to game devices or game servers, e.g. configuration data, software version or amount of memory
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/20Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterised by details of the game platform
    • A63F2300/209Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterised by details of the game platform characterized by low level software layer, relating to hardware management, e.g. Operating System, Application Programming Interface

Abstract

The invention discloses an interaction method of a game development engine and a Docker, which comprises the following steps: responding to a Docker tool window starting operation, and establishing connection with a Docker server; acquiring operation information corresponding to a Docker operation in a Docker tool window; serializing the operation information according to a preset data format to generate a first data packet; sending the first data packet to a Docker server so that the Docker server analyzes the first data packet to analyze operation information and execute Docker operation corresponding to the operation information, and serializing an execution result after the Docker operation is executed to generate a second data packet to return; and updating the tool state of the Docker tool window according to the second data packet. The invention discloses a game development engine and Docker interaction device, a game development engine and Docker server. By adopting the embodiment of the invention, the Docker service operation environment can be isolated from the game development engine, the problem of environmental conflict is solved, the complicated Docker instruction operation can be reduced, the production efficiency is improved, and the error rate is reduced.

Description

Game development engine and Docker interaction method, device and system
Technical Field
The invention relates to the technical field of game development, in particular to an interaction method, equipment and a system of a game development engine and a Docker, the game development engine and the Docker server.
Background
Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable container (container) and then release them to any popular Linux machine. Due to the characteristic of lightweight virtualization based on LXC, Docker has the advantages of fast start and small resource occupation compared with other virtualization technologies.
In the process of game development, a Docker is generally used in a game development engine, for example, a Docker plug-in is directly used in a game development project, so that the game development engine and the Docker plug-in share one operating environment. However, part of game development engines officially use a self-modified net library, such as Unity, which is dependent on the Docker DotNet library, and the internal implementation of the net library is inconsistent, so that the Docker DotNet and the game development engines run in the same running environment and cannot run in the same running environment, thereby influencing the development of game projects. In addition, since the Docker is used in the game development project development process, a developer needs to be skilled in mastering a large number of Docker operation instructions, and the Docker operation is performed in a manner that the developer commands a line instruction, which affects the production efficiency of the game development project and causes a high error rate of a game development engine.
Disclosure of Invention
Embodiments of the present invention provide a game development engine and a Docker interaction method, device, system, game development engine, and Docker server, which can isolate a Docker service operating environment from a game development engine, solve the problem of environmental conflict between Docker and a game development engine, and reduce complex Docker instruction operations, thereby improving production efficiency and reducing error rate.
In order to achieve the above object, an embodiment of the present invention provides an interaction method between a game development engine and a Docker, including:
responding to a Docker tool window starting operation, and establishing connection with a Docker server; the Docker tool window is a pre-built UI interaction component used for providing a Docker function;
responding to a Docker operation in the Docker tool window, and acquiring operation information corresponding to the Docker operation;
serializing the operation information according to a preset data format to generate a first data packet;
sending the first data packet to the Docker server so that the Docker server analyzes the first data packet to analyze operation information and execute Docker operation corresponding to the operation information, and serializing an execution result after the Docker operation is executed to generate a second data packet to return;
and receiving a second data packet returned by the Docker server, and updating the tool state of the Docker tool window according to the second data packet.
As a modification of the above, the operation information includes an instruction type, an instruction ID, and instruction data.
As an improvement of the foregoing solution, the updating the tool state of the Docker tool window according to the second data packet includes:
performing deserialization analysis on the second data packet to analyze an execution result and an instruction ID in the second data packet;
inquiring corresponding Docker operation according to the instruction ID;
and according to the execution result, updating the state value for recording the Docker operation into a preset state representation value in the Docker tool window, and displaying preset prompt information in the Docker tool window.
As an improvement of the above, the data format includes at least one of json, ProtoBuf, and yaml.
In order to achieve the above object, an embodiment of the present invention further provides an interaction method between a game development engine and a Docker, including:
responding to the connection operation of a game development engine, and establishing connection with the game development engine;
receiving a first data packet sent by the game development engine, and performing deserialization analysis on the first data packet to analyze corresponding operation information; the first data packet is generated by acquiring a Docker operation in a Docker tool window preset by the first data packet through the game development engine and serializing operation information corresponding to the Docker operation according to a preset data format;
executing Docker operation corresponding to the operation information, and serializing an execution result according to a preset data format after the Docker operation is executed to generate a second data packet;
and calling a corresponding API (application programming interface) according to the operation information, and sending the second data packet to the game development engine through the API, so that the game development engine updates the tool state of the Docker tool window according to the second data packet.
As an improvement of the above scheme, the API interfaces include at least two, which are encapsulated according to a preset encapsulation format; then, the calling the corresponding API interface according to the operation information includes:
inquiring a corresponding API (application program interface) in a preset mapping table according to the instruction type in the operation information;
and calling the API interface by using the instruction data in the operation information as parameters.
In order to achieve the above object, an embodiment of the present invention further provides a game development engine, including:
the connection module is used for responding to Docker tool window starting operation and establishing connection with a Docker server; the Docker tool window is a pre-built UI interaction component used for providing a Docker function;
the operating information acquiring module is used for responding to a Docker operation in the Docker tool window and acquiring operating information corresponding to the Docker operation;
the first data packet generating module is used for serializing the operation information according to a preset data format to generate a first data packet;
the first data packet sending module is used for sending the first data packet to the Docker server so that the Docker server can analyze the first data packet to analyze operation information and execute Docker operation corresponding to the operation information, and serializing an execution result after the Docker operation is executed to generate a second data packet to return;
and the tool state updating module is used for receiving a second data packet returned by the Docker server and updating the tool state of the Docker tool window according to the second data packet.
In order to achieve the above object, an embodiment of the present invention further provides a Docker server, including:
the connection module is used for responding to the connection operation of a game development engine and establishing connection with the game development engine;
the first data packet receiving module is used for receiving a first data packet sent by the game development engine and performing deserialization analysis on the first data packet to analyze corresponding operation information; the first data packet is generated by acquiring a Docker operation in a Docker tool window preset by the first data packet through the game development engine and serializing operation information corresponding to the Docker operation according to a preset data format;
the second data packet generation module is used for executing Docker operation corresponding to the operation information and serializing an execution result according to a preset data format after the Docker operation is executed so as to generate a second data packet;
and the second data packet sending module is used for calling a corresponding API (application programming interface) according to the operation information and sending the second data packet to the game development engine through the API so as to enable the game development engine to update the tool state of the Docker tool window according to the second data packet.
In order to achieve the above object, an embodiment of the present invention further provides a game development engine and a Docker interaction device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor, when executing the computer program, implements the game development engine and Docker interaction method according to any of the above embodiments.
In order to achieve the above object, an embodiment of the present invention further provides a game development engine and a Docker interaction system, including the game development engine described in the above embodiment and the Docker server described in the above embodiment.
Compared with the prior art, the game development engine and Docker interaction method, the equipment, the system, the game development engine and the Docker server disclosed by the embodiment of the invention define the data format for standardizing the data transmission mode between the game development engine and the Docker server, and the game development engine and the Docker server sequentially transmit and receive data according to the serialized and deserialized data transmission modes, so that the data interaction between the game development engine and the Docker server is realized. Net executable program can isolate the running environment from the game development engine, solve the problem of conflict between Docker DotNet and game development engine environment, and reduce the intrusion influence of plug-in on game development project. In addition, developers can use various functions of Docker in a game development engine through a visual Docker tool window, and the developers do not need to master knowledge and skills related to Docker, so that the use threshold and the learning cost of Docker are greatly reduced, the complex Docker instruction operation is reduced, the production efficiency is improved, and the error rate is reduced.
Drawings
FIG. 1 is a flow chart of an interaction method of a game development engine and Docker according to an embodiment of the present invention;
FIG. 2 is a flow chart of another interaction method of a game development engine and Docker provided by an embodiment of the invention;
FIG. 3 is a block diagram of a game development engine according to an embodiment of the present invention;
fig. 4 is a block diagram of a Docker server according to an embodiment of the present invention;
FIG. 5 is a block diagram of a game development engine and a Docker interaction device according to an embodiment of the present invention;
FIG. 6 is a block diagram of another game development engine and Docker interaction device provided by embodiments of the present invention;
fig. 7 is a block diagram of a game development engine and a Docker interaction system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of an interaction method between a game development engine and a Docker according to an embodiment of the present invention, where the interaction method between the game development engine and the Docker includes:
s11, responding to the Docker tool window starting operation, and establishing connection with a Docker server;
s12, responding to a Docker operation in the Docker tool window, and acquiring operation information corresponding to the Docker operation;
s13, serializing the operation information according to a preset data format to generate a first data packet;
s14, sending the first data packet to the Docker server so that the Docker server can analyze the first data packet to analyze operation information and execute Docker operation corresponding to the operation information, and serializing an execution result after the Docker operation is executed to generate a second data packet to return;
and S15, receiving a second data packet returned by the Docker server, and updating the tool state of the Docker tool window according to the second data packet.
It is worth to be noted that the game development engine and the interaction method of the Docker according to the embodiment of the present invention are implemented by the game development engine, and the game development engine is provided at the client and performs data interaction with the Docker provided at the server. By way of example, in an embodiment of the present invention the game development Engine is Unity, but in other embodiments the game development Engine may also be a fantasy Engine, CryEngine 3, HeroEngine, Range Engine, Project Anarchy, GameSalad, GameMaker: studio, App Game Kit, Cocos2D, etc.
In the embodiment of the invention, data formats for standardizing data transmission modes are defined at two ends of the game development engine and the Docker server, and the game development engine and the Docker server sequentially transmit and receive data according to serialized and deserialized data transmission modes, so that data interaction between the game development engine and the Docker server is realized.
It should be noted that serialization refers to a process of converting variables (objects) from a memory into a storable or transmittable state, and deserialization refers to a process of re-reading the contents of the variables from the serialized objects into the memory; therefore, the data serialization is mainly for transmission convenience, the sending end serializes the object to be transmitted into byte stream data, so that the transmission efficiency is improved, and the receiving end deserializes the object when receiving the byte stream data.
Illustratively, the data format defined at both ends of the game development engine and the Docker server includes at least one of json, ProtoBuf and yaml, and it should be noted that the data format may be applicable to the embodiment of the present invention as long as the data format can be serialized and deserialized and can also be used for network transmission. Taking a json data format as an example, the json data includes: the instruction type, the instruction data and the instruction ID, and the json data format satisfies the following conditions: the juxtaposed data are separated by commas (","); the mapping is represented by a colon (":"); the set (array) of juxtaposed data is represented by square brackets ("[ ]"); the set of mappings (objects) is indicated by braces ("{ }"). As indicated as: [ { "instruction type": type 1), "instruction data": data 1, "instruction ID": ID1}, { "instruction type": type 2, "instruction data": data 2, "instruction ID": ID2} ].
In the embodiment of the invention, C # data classes for communication transmission and Json serialization and deserialization can be formulated at two ends of a game development engine and a Docker server according to Docker.
DotNet is an open source C # library of the DotNet team, which provides a collection of API interfaces that can operate on Docker, where "parameter type" refers to Class (Class) that the call interface needs to pass through. In the embodiment of the invention, a newtonsoft.json library is used, which is a library commonly used in C # and used for processing Json data, provides an API interface for serializing and deserializing Json, and can serialize a class object into a character string in a Json format or deserialize the character string in the Json format into the class object. According to the parameter type of the API interface of the Docker. The data types at both ends of the game development engine and the Docker server can directly use a Newtonsoft.
Specifically, in step S11, when the Docker tool window is started, the Docker server is started together, and at this time, the game development engine creates a Socket object to connect with the Docker server, and at the same time, the Docker server also creates a Socket object to wait for connection of the game development engine.
It should be noted that, when the game development engine needs to establish communication with the Docker server, a communication "line" needs to be established through the socket. The concrete construction method comprises the following steps: the game development engine establishes a mysocket object and sends a call request to the Docker server, the Docker server establishes an object serversocket object waiting for receiving a socket, and after the socket connection is established, the game development engine and the Docker server can communicate by respectively calling an input stream getinputstream () method and an output stream getoutputstream () method.
Illustratively, the Docker tool window is a pre-built UI interaction component for providing a Docker function. A visual Unity Docker tool window is made by using a UI Toolkit, and UI interactive components with common Docker functions are provided, such as operations of creating a Docker container, starting the Docker container, stopping the Docker container, obtaining logs and the like. It should be noted that, the process of making the visualized Unity Docker tool window using UI Toolkit may refer to the prior art, and is not described herein again.
Specifically, in step S12, a UI tool is disposed in the Docker tool window, and a user may interact with the Docker server by operating the UI tool, and at this time, obtain operation information corresponding to the Docker operation. The operation information comprises an instruction type, an instruction ID and instruction data, the instruction type represents a transmitted data type, the instruction ID defines which specific Docker operation (such as Docker container creation, Docker container start and Docker container stop) is specified, and the instruction data is the specific operation data of the Docker operation.
It should be noted that the main purpose of all operations in the UI tool is to interact with a Docker service, for example, to initiate an instruction "create Docker container" using the UI tool, the type of the instruction is "CreateContainer" (character string), the instruction data is a character string in a Json format after serialization of createcontainerparametersata (the aforementioned self-designed data type), and different operations correspond to different instructions and different data types, but are all represented in the form of character strings.
Specifically, in step S13, the instruction type, the instruction ID, and the instruction data are serialized according to the Json data format and packaged into a first data packet.
Specifically, in step S14, the first data packet is sent to the Docker server, and the Docker server performs deserialization analysis on the first data packet after receiving the first data packet, so as to analyze the instruction type, the instruction ID, and the instruction data in the first data packet. A corresponding Docker operation may be queried according to the instruction ID, and the Docker server executes the Docker operation, for example, the Docker operation is "create Docker container", and at this time, the Docker server creates a Docker container. And after the Docker server executes the Docker operation, serializing an execution result according to the data format, generating a second data packet and returning the second data packet to the game development engine.
The API interfaces in the Docker server comprise at least two interfaces which are packaged according to a preset packaging format. The encapsulation format is a docker.dotnet API parameter type, and in order to perform network transmission, the Docker API does not support the network transmission, so that an API interface needs to be encapsulated according to the encapsulation format. The method includes that a parameter type (Class) defined by a Docker API interface is required to be packaged into a set of interfaces using serializable and deserializable data types because a Function (Function) and internal logic cannot be directly serialized and squared serialization and further cannot be transmitted in a network, and then a Docker API interface parameter type object is instantiated through the data type objects in the interfaces and used as a parameter call Docker API interface.
Specifically, the Docker server queries a corresponding API interface in a preset mapping table according to the type of the instruction in the operation information, and calls the API interface using the instruction data in the operation information as a parameter.
Illustratively, the Docker server defines a mapping table of key value pairs in advance, the instruction type is a key, the API interface function is a value, and the value, that is, the API interface function, can be directly obtained through the mapping table in the case of having the key. The calling the API interface by using the instruction data in the operation information as parameters comprises: the instruction data is reversely sequenced into a data type object; obtaining values and names of all variables in the data type object in a reflection mode; instantiating a parameter type object of a Docker API interface; acquiring the names of all variables of the parameter type object in a reflection mode; assigning the value of the homonymous variable of the data type object to the variable of the parameter type object; and taking the parameter type object at the moment as a parameter, and calling the Docker API interface found above.
Specifically, in step S15, after receiving the second data packet returned by the Docker server, the game development engine needs to update the tool state of the Docker tool window according to the second data packet. The updating of the tool state of the Docker tool window according to the second data packet includes steps S151 to S153:
s151, performing deserialization analysis on the second data packet to analyze an execution result and an instruction ID in the second data packet;
s152, inquiring corresponding Docker operation according to the instruction ID;
and S153, updating the state value of the Docker operation recorded in the Docker tool window into a preset state representation value according to the execution result, and displaying preset prompt information in the Docker tool window.
Illustratively, the execution result includes "success" and "failure", and the state representation value also includes "success" and "failure", and the tool state refers to the value of the tool internal variable and the presentation of the visualization window UI, such as: and after receiving an execution result of successful creation of the Docker container of the Docker server, changing the state value of the variable for recording the container creation state in the tool into 'success', and simultaneously displaying a prompt message of 'container creation success' on the visual window UI. In addition, a specific operation can be found through the instruction ID, and the returned result of the Docker server is connected with the initiated operation in the game development engine.
Further, after the tool state of the Docker tool window is updated, and under the condition that the UI Builder tool is installed in the game development engine, double-clicking the Uxml file in the game development engine can directly open the UI Builder tool to edit the UI interface.
Compared with the prior art, the game development engine and the Docker interaction method disclosed by the embodiment of the invention define the data format for standardizing the data transmission mode between the game development engine and the Docker server, and the game development engine and the Docker server sequentially transmit and receive data according to the serialized and deserialized data transmission modes, so that the data interaction between the game development engine and the Docker server is realized. Net executable program can isolate the running environment from the game development engine, solve the problem of conflict between Docker DotNet and game development engine environment, and reduce the intrusion influence of plug-in on game development project. In addition, developers can use various functions of Docker in a game development engine through a visual Docker tool window, and the developers do not need to master knowledge and skills related to Docker, so that the use threshold and the learning cost of Docker are greatly reduced, the complex Docker instruction operation is reduced, the production efficiency is improved, and the error rate is reduced.
Referring to fig. 2, fig. 2 is a flowchart of another interaction method between a game development engine and a Docker according to an embodiment of the present invention, where the interaction method between the game development engine and the Docker includes:
s21, responding to the connection operation of the game development engine, and establishing connection with the game development engine;
s22, receiving a first data packet sent by the game development engine, and performing deserialization analysis on the first data packet to analyze corresponding operation information;
s23, executing Docker operation corresponding to the operation information, and serializing an execution result according to a preset data format after the Docker operation is executed to generate a second data packet;
and S24, calling a corresponding API (application programming interface) according to the operation information, and sending the second data packet to the game development engine through the API, so that the game development engine updates the tool state of the Docker tool window according to the second data packet.
It is worth to be noted that the game development engine and the Docker interaction method described in the embodiment of the present invention are implemented by a Docker server, and the Docker server performs data interaction with a game development engine provided at a client. By way of example, in an embodiment of the present invention the game development Engine is Unity, but in other embodiments the game development Engine may also be a fantasy Engine, CryEngine 3, HeroEngine, Range Engine, Project Anarchy, GameSalad, GameMaker: studio, App Game Kit, Cocos2D, etc.
In the embodiment of the invention, data formats for standardizing data transmission modes are defined at two ends of the game development engine and the Docker server, and the game development engine and the Docker server sequentially transmit and receive data according to serialized and deserialized data transmission modes, so that data interaction between the game development engine and the Docker server is realized.
It should be noted that serialization refers to a process of converting variables (objects) from a memory into a storable or transmittable state, and deserialization refers to a process of re-reading the contents of the variables from the serialized objects into the memory; therefore, the data serialization is mainly for transmission convenience, the sending end serializes the object to be transmitted into byte stream data, so that the transmission efficiency is improved, and the receiving end deserializes the object when receiving the byte stream data.
Illustratively, the data format defined at both ends of the game development engine and the Docker server includes at least one of json, ProtoBuf and yaml, and it should be noted that the data format may be applicable to the embodiment of the present invention as long as the data format can be serialized and deserialized and can also be used for network transmission. Taking a json data format as an example, the json data includes: the instruction type, the instruction data and the instruction ID, and the json data format satisfies the following conditions: the juxtaposed data are separated by commas (","); the mapping is represented by a colon (":"); the set (array) of juxtaposed data is represented by square brackets ("[ ]"); the set of mappings (objects) is indicated by braces ("{ }"). As indicated as: [ { "instruction type": type 1), "instruction data": data 1, "instruction ID": ID1}, { "instruction type": type 2, "instruction data": data 2, "instruction ID": ID2} ].
In the embodiment of the invention, C # data classes for communication transmission and Json serialization and deserialization can be formulated at two ends of a game development engine and a Docker server according to Docker.
DotNet is an open source C # library of the DotNet team, which provides a collection of API interfaces that can operate on Docker, where "parameter type" refers to Class (Class) that the call interface needs to pass through. In the embodiment of the invention, a newtonsoft.json library is used, which is a library commonly used in C # and used for processing Json data, provides an API interface for serializing and deserializing Json, and can serialize a class object into a character string in a Json format or deserialize the character string in the Json format into the class object. According to the parameter type of the API interface of the Docker. The data types at both ends of the game development engine and the Docker server can directly use a Newtonsoft.
Specifically, in step S21, the Docker server, after starting, creates a Socket object to wait for connection of the game development engine. And when the game development engine starts the Docker tool window, the game development engine starts the Docker server together, and at the moment, the game development engine establishes a Socket object to be connected with the Docker server.
It should be noted that, when the game development engine needs to establish communication with the Docker server, a communication "line" needs to be established through the socket. The concrete construction method comprises the following steps: the game development engine establishes a mysocket object and sends a call request to the Docker server, the Docker server establishes an object serversocket object waiting for receiving a socket, and after the socket connection is established, the game development engine and the Docker server can communicate by respectively calling an input stream getinputstream () method and an output stream getoutputstream () method.
Illustratively, the Docker tool window is a UI interaction component which is pre-built for the game development engine and is used for providing the Docker function. A visual Unity Docker tool window is made by using a UI Toolkit, and UI interactive components with common Docker functions are provided, such as operations of creating a Docker container, starting the Docker container, stopping the Docker container, obtaining logs and the like. It should be noted that, the process of making the visualized Unity Docker tool window using UI Toolkit may refer to the prior art, and is not described herein again.
Specifically, in step S22, after receiving the first data packet, the Docker server performs deserialization analysis on the first data packet.
Illustratively, the first data packet is generated by acquiring a Docker operation in a Docker tool window preset by the game development engine through the game development engine, and serializing operation information corresponding to the Docker operation according to a preset data format. And the game development engine serializes the instruction type, the instruction ID and the instruction data according to a Json data format and encapsulates the instruction type, the instruction ID and the instruction data into a first data packet. And a UI tool is arranged in the Docker tool window, and a user can interact with the Docker server by operating the UI tool, and at the moment, operation information corresponding to Docker operation is obtained. The operation information comprises an instruction type, an instruction ID and instruction data, the instruction type represents a transmitted data type, the instruction ID defines which specific Docker operation (such as Docker container creation, Docker container start and Docker container stop) is specified, and the instruction data is the specific operation data of the Docker operation.
Specifically, in step S23, the Docker server performs deserialization parsing on the first packet to parse out the instruction type, the instruction ID, and the instruction data in the first packet. The Docker server may query a corresponding Docker operation according to the instruction ID, and execute the Docker operation, for example, the Docker operation is "create a Docker container", and at this time, the Docker server creates the Docker container. And after the Docker server executes the Docker operation, serializing an execution result according to the data format, generating a second data packet and returning the second data packet to the game development engine.
Specifically, in step S24, the API interfaces in the Docker server include at least two interfaces, which are packaged according to a preset packaging format. The encapsulation format is a docker.dotnet API parameter type, and in order to perform network transmission, the Docker API does not support the network transmission, so that an API interface needs to be encapsulated according to the encapsulation format. The method includes that a parameter type (Class) defined by a Docker API interface is required to be packaged into a set of interfaces using serializable and deserializable data types because a Function (Function) and internal logic cannot be directly serialized and squared serialization and further cannot be transmitted in a network, and then a Docker API interface parameter type object is instantiated through the data type objects in the interfaces and used as a parameter call Docker API interface.
Specifically, the Docker server queries a corresponding API interface in a preset mapping table according to the type of the instruction in the operation information, and calls the API interface using the instruction data in the operation information as a parameter.
Illustratively, the Docker server defines a mapping table of key value pairs in advance, the instruction type is a key, the API interface function is a value, and the value, that is, the API interface function, can be directly obtained through the mapping table in the case of having the key. The calling the API interface by using the instruction data in the operation information as parameters comprises: the instruction data is reversely sequenced into a data type object; obtaining values and names of all variables in the data type object in a reflection mode; instantiating a parameter type object of a Docker API interface; acquiring the names of all variables of the parameter type object in a reflection mode; assigning the value of the homonymous variable of the data type object to the variable of the parameter type object; and taking the parameter type object at the moment as a parameter, and calling the Docker API interface found above.
And the Docker server sends the second data to the game starting engine through the API, and after the game starting engine receives a second data packet returned by the Docker server, the game development engine needs to update the tool state of the Docker tool window according to the second data packet. At the moment, the game development engine carries out deserialization analysis on the second data packet so as to analyze an execution result and an instruction ID in the second data packet; then inquiring corresponding Docker operation according to the instruction ID; and finally, according to the execution result, updating the state value for recording the Docker operation into a preset state representation value in the Docker tool window, and displaying preset prompt information in the Docker tool window.
Illustratively, the execution result includes "success" and "failure", and the state representation value also includes "success" and "failure", and the tool state refers to the value of the tool internal variable and the presentation of the visualization window UI, such as: and after receiving an execution result of successful creation of the Docker container of the Docker server, changing the state value of the variable for recording the container creation state in the tool into 'success', and simultaneously displaying a prompt message of 'container creation success' on the visual window UI. In addition, a specific operation can be found through the instruction ID, and the returned result of the Docker server is connected with the initiated operation in the game development engine.
Further, after the tool state of the Docker tool window is updated, and the UI Builder tool is installed in the game development engine, the game development engine may directly open the UI Builder tool to edit the UI interface by double-clicking the Uxml file in the game development engine.
Compared with the prior art, the game development engine and the Docker interaction method disclosed by the embodiment of the invention define the data format for standardizing the data transmission mode between the game development engine and the Docker server, and the game development engine and the Docker server sequentially transmit and receive data according to the serialized and deserialized data transmission modes, so that the data interaction between the game development engine and the Docker server is realized. Net executable program can isolate the running environment from the game development engine, solve the problem of conflict between Docker DotNet and game development engine environment, and reduce the intrusion influence of plug-in on game development project. In addition, developers can use various functions of Docker in a game development engine through a visual Docker tool window, and the developers do not need to master knowledge and skills related to Docker, so that the use threshold and the learning cost of Docker are greatly reduced, the complex Docker instruction operation is reduced, the production efficiency is improved, and the error rate is reduced.
Referring to fig. 3, fig. 3 is a block diagram illustrating a structure of a game development engine 10 according to an embodiment of the present invention, where the game development engine 10 includes:
the connection module 11 is used for responding to a Docker tool window starting operation and establishing connection with a Docker server; the Docker tool window is a pre-built UI interaction component used for providing a Docker function;
an operation information obtaining module 12, configured to respond to a Docker operation in the Docker tool window, and obtain operation information corresponding to the Docker operation;
a first data packet generating module 13, configured to serialize the operation information according to a preset data format to generate a first data packet;
a first data packet sending module 14, configured to send the first data packet to the Docker server, so that the Docker server analyzes the first data packet to analyze operation information and execute a Docker operation corresponding to the operation information, and after the Docker operation is executed, serialize an execution result to generate a second data packet and return the second data packet;
and the tool state updating module 15 is configured to receive a second data packet returned by the Docker server, and update the tool state of the Docker tool window according to the second data packet.
It should be noted that the game development engine 10 according to the embodiment of the present invention is disposed at the client and performs data interaction with the Docker disposed at the server. By way of example, in the present embodiment the game development Engine 10 is Unity, but in other embodiments the game development Engine may also be a fantasy Engine, CryEngine 3, HeroEngine, Rage Engine, Project Anarchy, GameSalad, GameMaker: studio, App Game Kit, Cocos2D, etc.
In the embodiment of the invention, data formats for standardizing data transmission modes are defined at two ends of the game development engine 10 and the Docker server, and the game development engine 10 and the Docker server sequentially transmit and receive data according to serialized and deserialized data transmission modes, so that data interaction between the game development engine 10 and the Docker server is realized.
It should be noted that serialization refers to a process of converting variables (objects) from a memory into a storable or transmittable state, and deserialization refers to a process of re-reading the contents of the variables from the serialized objects into the memory; therefore, the data serialization is mainly for transmission convenience, the sending end serializes the object to be transmitted into byte stream data, so that the transmission efficiency is improved, and the receiving end deserializes the object when receiving the byte stream data.
Illustratively, the data format defined at both ends of the game development engine 10 and the Docker server includes at least one of json, ProtoBuf and yaml, and it should be noted that the data format may be applicable to the embodiment of the present invention as long as the data format can be serialized and deserialized, and can also be used for network transmission. Taking a json data format as an example, the json data includes: the instruction type, the instruction data and the instruction ID, and the json data format satisfies the following conditions: the juxtaposed data are separated by commas (","); the mapping is represented by a colon (":"); the set (array) of juxtaposed data is represented by square brackets ("[ ]"); the set of mappings (objects) is indicated by braces ("{ }"). As indicated as: [ { "instruction type": type 1), "instruction data": data 1, "instruction ID": ID1}, { "instruction type": type 2, "instruction data": data 2, "instruction ID": ID2} ].
In the embodiment of the invention, C # data classes for communication transmission and Json serialization and deserialization can be formulated at two ends of the game development engine 10 and the Docker server according to Docker.
DotNet is an open source C # library of the DotNet team, which provides a collection of API interfaces that can operate on Docker, where "parameter type" refers to Class (Class) that the call interface needs to pass through. In the embodiment of the invention, a newtonsoft.json library is used, which is a library commonly used in C # and used for processing Json data, provides an API interface for serializing and deserializing Json, and can serialize a class object into a character string in a Json format or deserialize the character string in the Json format into the class object. According to the parameter type of the API interface of the Docker. The data types at both ends of the game development engine 10 and the Docker server may be serialized and deserialized for json directly using the newtonsoft.
Specifically, when the Docker tool window is started, the Docker server is started together, and at this time, the connection module 11 creates a Socket object to connect with the Docker server, and meanwhile, the Docker server also creates a Socket object to wait for connection of the game development engine.
It should be noted that, when the connection module 11 needs to establish communication with the Docker server, a communication "line" needs to be established through the socket. The concrete construction method comprises the following steps: the connection module 11 establishes a mysocket object to send a call request to the Docker server, the Docker server establishes an object serverssocket object waiting for receiving a socket, and after the socket connection is established, the connection module 11 and the Docker server can communicate by respectively calling an input stream getinputstream () method and an output stream getoutputstream () method.
Illustratively, the Docker tool window is a pre-built UI interaction component for providing a Docker function. A visual Unity Docker tool window is made by using a UI Toolkit, and UI interactive components with common Docker functions are provided, such as operations of creating a Docker container, starting the Docker container, stopping the Docker container, obtaining logs and the like. It should be noted that, the process of making the visualized Unity Docker tool window using UI Toolkit may refer to the prior art, and is not described herein again.
Specifically, a UI tool is arranged in the Docker tool window, and a user may interact with the Docker server by operating the UI tool, and at this time, the operation information obtaining module 12 obtains operation information corresponding to Docker operation. The operation information comprises an instruction type, an instruction ID and instruction data, the instruction type represents a transmitted data type, the instruction ID defines which specific Docker operation (such as Docker container creation, Docker container start and Docker container stop) is specified, and the instruction data is the specific operation data of the Docker operation.
It should be noted that the main purpose of all operations in the UI tool is to interact with a Docker service, for example, to initiate an instruction "create Docker container" using the UI tool, the type of the instruction is "CreateContainer" (character string), the instruction data is a character string in a Json format after serialization of createcontainerparametersata (the aforementioned self-designed data type), and different operations correspond to different instructions and different data types, but are all represented in the form of character strings.
Specifically, the first data packet generating module 13 serializes the instruction type, the instruction ID, and the instruction data according to a Json data format, and encapsulates the instruction type, the instruction ID, and the instruction data into the first data packet.
Specifically, the first data packet sending module 14 sends the first data packet to the Docker server, and the Docker server performs deserialization analysis on the first data packet after receiving the first data packet, so as to analyze the instruction type, the instruction ID, and the instruction data in the first data packet. A corresponding Docker operation may be queried according to the instruction ID, and the Docker server executes the Docker operation, for example, the Docker operation is "create Docker container", and at this time, the Docker server creates a Docker container. And after the Docker server executes the Docker operation, serializing an execution result according to the data format, generating a second data packet and returning the second data packet to the game development engine.
The API interfaces in the Docker server comprise at least two interfaces which are packaged according to a preset packaging format. The encapsulation format is a docker.dotnet API parameter type, and in order to perform network transmission, the Docker API does not support the network transmission, so that an API interface needs to be encapsulated according to the encapsulation format. The method includes that a parameter type (Class) defined by a Docker API interface is required to be packaged into a set of interfaces using serializable and deserializable data types because a Function (Function) and internal logic cannot be directly serialized and squared serialization and further cannot be transmitted in a network, and then a Docker API interface parameter type object is instantiated through the data type objects in the interfaces and used as a parameter call Docker API interface.
Specifically, the Docker server queries a corresponding API interface in a preset mapping table according to the type of the instruction in the operation information, and calls the API interface using the instruction data in the operation information as a parameter.
Illustratively, the Docker server defines a mapping table of key value pairs in advance, the instruction type is a key, the API interface function is a value, and the value, that is, the API interface function, can be directly obtained through the mapping table in the case of having the key. The calling the API interface by using the instruction data in the operation information as parameters comprises: the instruction data is reversely sequenced into a data type object; obtaining values and names of all variables in the data type object in a reflection mode; instantiating a parameter type object of a Docker API interface; acquiring the names of all variables of the parameter type object in a reflection mode; assigning the value of the homonymous variable of the data type object to the variable of the parameter type object; and taking the parameter type object at the moment as a parameter, and calling the Docker API interface found above.
Specifically, after the tool state updating module 15 receives a second data packet returned by the Docker server, the game development engine needs to update the tool state of the Docker tool window according to the second data packet.
The tool state update module 15 is configured to:
performing deserialization analysis on the second data packet to analyze an execution result and an instruction ID in the second data packet;
inquiring corresponding Docker operation according to the instruction ID;
and according to the execution result, updating the state value for recording the Docker operation into a preset state representation value in the Docker tool window, and displaying preset prompt information in the Docker tool window.
Illustratively, the execution result includes "success" and "failure", and the state representation value also includes "success" and "failure", and the tool state refers to the value of the tool internal variable and the presentation of the visualization window UI, such as: and after receiving an execution result of successful creation of the Docker container of the Docker server, changing the state value of the variable for recording the container creation state in the tool into 'success', and simultaneously displaying a prompt message of 'container creation success' on the visual window UI. In addition, which operation is specific can be found through the instruction ID, and the returned result of the Docker server and the initiated operation in the game development engine 10 are linked.
Further, after the tool state of the Docker tool window is updated, in a case that the UI Builder tool is installed in the game development engine 10, double-clicking the Uxml file in the game development engine 10 may directly open the UI Builder tool to edit the UI interface.
Compared with the prior art, the game development engine 10 disclosed in the embodiment of the invention defines the data format for standardizing the data transmission mode between the game development engine 10 and the Docker server, and the game development engine and the Docker server sequentially transmit and receive data according to the serialized and deserialized data transmission modes, so that the data interaction between the game development engine and the Docker server is realized. Net executable program can isolate the running environment from the game development engine, solve the problem of conflict between Docker DotNet and game development engine environment, and reduce the intrusion influence of plug-in on game development project. In addition, developers can use various functions of Docker in a game development engine through a visual Docker tool window, and the developers do not need to master knowledge and skills related to Docker, so that the use threshold and the learning cost of Docker are greatly reduced, the complex Docker instruction operation is reduced, the production efficiency is improved, and the error rate is reduced.
Referring to fig. 4, fig. 4 is a block diagram of a Docker server 20 according to an embodiment of the present invention,
the connection module 21 is used for responding to the connection operation of a game development engine and establishing connection with the game development engine;
a first data packet receiving module 22, configured to receive a first data packet sent by the game development engine, and perform deserialization analysis on the first data packet to analyze corresponding operation information; the first data packet is generated by acquiring a Docker operation in a Docker tool window preset by the first data packet through the game development engine and serializing operation information corresponding to the Docker operation according to a preset data format;
the second data packet generating module 23 is configured to execute a Docker operation corresponding to the operation information, and serialize an execution result according to a preset data format after the Docker operation is executed, so as to generate a second data packet;
and a second data packet sending module 24, configured to call a corresponding API according to the operation information, and send the second data packet to the game development engine through the API, so that the game development engine updates the tool state of the Docker tool window according to the second data packet.
It should be noted that the Docker server 20 according to the embodiment of the present invention performs data interaction with the game development engine provided at the client. By way of example, in an embodiment of the present invention the game development Engine is Unity, but in other embodiments the game development Engine may also be a fantasy Engine, CryEngine 3, HeroEngine, Range Engine, Project Anarchy, GameSalad, GameMaker: studio, App Game Kit, Cocos2D, etc.
In the embodiment of the present invention, data formats for standardizing data transmission modes are defined at two ends of the game development engine and the Docker server 20, and the game development engine and the Docker server 20 sequentially transmit and receive data according to serialized and deserialized data transmission modes, so that data interaction between the game development engine and the Docker server 20 is implemented.
It should be noted that serialization refers to a process of converting variables (objects) from a memory into a storable or transmittable state, and deserialization refers to a process of re-reading the contents of the variables from the serialized objects into the memory; therefore, the data serialization is mainly for transmission convenience, the sending end serializes the object to be transmitted into byte stream data, so that the transmission efficiency is improved, and the receiving end deserializes the object when receiving the byte stream data.
Illustratively, the data format defined at both ends of the game development engine and the Docker server 20 includes at least one of json, ProtoBuf, and yam l, and it should be noted that the data format may be applicable to the embodiment of the present invention as long as the data format can be serialized and deserialized, and can also be used for network transmission. Taking a json data format as an example, the json data includes: the instruction type, the instruction data and the instruction ID, and the json data format satisfies the following conditions: the juxtaposed data are separated by commas (","); the mapping is represented by a colon (":"); the set (array) of juxtaposed data is represented by square brackets ("[ ]"); the set of mappings (objects) is indicated by braces ("{ }"). As indicated as: [ { "instruction type": type 1), "instruction data": data 1, "instruction ID": ID1}, { "instruction type": type 2, "instruction data": data 2, "instruction ID": ID2} ].
In the embodiment of the present invention, a C # data class for communication transmission, which can perform Json serialization and deserialization, is formulated at both ends of the game development engine and the Docker server 20 according to the Docker.
DotNet is an open source C # library of the DotNet team, which provides a collection of API interfaces that can operate on Docker, where "parameter type" refers to Class (Class) that the call interface needs to pass through. In the embodiment of the invention, a newtonsoft.json library is used, which is a library commonly used in C # and used for processing Json data, provides an API interface for serializing and deserializing Json, and can serialize a class object into a character string in a Json format or deserialize the character string in the Json format into the class object. According to the parameter type of the API interface of the Docker. The game development engine and the data types at both ends of the Docker server 20 may directly use the newtonsoft.
Specifically, after the Docker server 20 is started, the connection module 21 creates a Socket object to wait for connection of the game development engine. When the game development engine starts the Docker tool window, the game development engine starts the Docker server 20 together, and at this time, the game development engine creates a Socket object to connect with the connection module 21.
It should be noted that, when the game development engine needs to establish communication with the connection module 21, a communication "line" needs to be established through the socket. The concrete construction method comprises the following steps: the game development engine establishes a mysocket object and sends a call request to the connection module 21, the Docker server establishes an object serverssocket object waiting for receiving a socket, and after the socket connection is established, the game development engine and the Docker server can communicate by respectively calling an input stream getinputstream () method and an output stream getoutputstream () method.
Illustratively, the Docker tool window is a UI interaction component which is pre-built for the game development engine and is used for providing the Docker function. A visual Unity Docker tool window is made by using a UI Toolkit, and UI interactive components with common Docker functions are provided, such as operations of creating a Docker container, starting the Docker container, stopping the Docker container, obtaining logs and the like. It should be noted that, the process of making the visualized Unity Docker tool window using UI Toolkit may refer to the prior art, and is not described herein again.
Specifically, the first packet receiving module 22 performs deserialization analysis on the first packet after receiving the first packet.
Illustratively, the first data packet is generated by acquiring a Docker operation in a Docker tool window preset by the game development engine through the game development engine, and serializing operation information corresponding to the Docker operation according to a preset data format. And the game development engine serializes the instruction type, the instruction I D and the instruction data according to a Json data format and encapsulates the instructions into a first data packet. And a UI tool is arranged in the Docker tool window, and a user can interact with the Docker server by operating the UI tool, and at the moment, operation information corresponding to Docker operation is obtained. The operation information comprises an instruction type, an instruction ID and instruction data, the instruction type represents a transmitted data type, the instruction ID defines which specific Docker operation (such as Docker container creation, Docker container start and Docker container stop) is specified, and the instruction data is the specific operation data of the Docker operation.
Specifically, the first packet receiving module 22 performs deserialization parsing on the first packet to parse out the instruction type, the instruction ID and the instruction data in the first packet. The second packet generation module 23 may query a corresponding Docker operation according to the instruction ID, and the Docker server executes the Docker operation, for example, the Docker operation is "create Docker container", and at this time, the Docker server creates a Docker container. After the second data packet generation module 23 executes the Docker operation, serializing an execution result according to the data format, generating a second data packet, and returning the second data packet to the game development engine.
Specifically, the API interfaces in the Docker server include at least two interfaces, which are encapsulated according to a preset encapsulation format. The encapsulation format is a docker.dotnet API parameter type, and in order to perform network transmission, the Docker API does not support the network transmission, so that an API interface needs to be encapsulated according to the encapsulation format. The method includes that a parameter type (Class) defined by a Docker API interface is required to be packaged into a set of interfaces using serializable and deserializable data types because a Function (Function) and internal logic cannot be directly serialized and squared serialization and further cannot be transmitted in a network, and then a Docker API interface parameter type object is instantiated through the data type objects in the interfaces and used as a parameter call Docker API interface.
Specifically, the second data packet sending module 24 queries a corresponding API interface in a preset mapping table according to the instruction type in the operation information, and calls the API interface using the instruction data in the operation information as a parameter.
Illustratively, the Docker server defines a mapping table of key value pairs in advance, the instruction type is a key, the API interface function is a value, and the value, that is, the API interface function, can be directly obtained through the mapping table in the case of having the key. The calling the API interface by using the instruction data in the operation information as parameters comprises: the instruction data is reversely sequenced into a data type object; obtaining values and names of all variables in the data type object in a reflection mode; instantiating a parameter type object of a Docker API interface; acquiring the names of all variables of the parameter type object in a reflection mode; assigning the value of the homonymous variable of the data type object to the variable of the parameter type object; and taking the parameter type object at the moment as a parameter, and calling the Docker API interface found above.
The second data packet sending module 24 sends the second data packet to the game start engine through the API interface, and after the game start engine receives the second data packet returned by the Docker server, the game development engine needs to update the tool state of the Docker tool window according to the second data packet. At the moment, the game development engine carries out deserialization analysis on the second data packet so as to analyze an execution result and an instruction ID in the second data packet; then inquiring corresponding Docker operation according to the instruction ID; and finally, according to the execution result, updating the state value for recording the Docker operation into a preset state representation value in the Docker tool window, and displaying preset prompt information in the Docker tool window.
Illustratively, the execution result includes "success" and "failure", and the state representation value also includes "success" and "failure", and the tool state refers to the value of the tool internal variable and the presentation of the visualization window UI, such as: and after receiving an execution result of successful creation of the Docker container of the Docker server, changing the state value of the variable for recording the container creation state in the tool into 'success', and simultaneously displaying a prompt message of 'container creation success' on the visual window UI. In addition, a specific operation can be found through the instruction ID, and the returned result of the Docker server is connected with the initiated operation in the game development engine.
Further, after the tool state of the Docker tool window is updated, and the UI Builder tool is installed in the game development engine, the game development engine may directly open the UI Builder tool to edit the UI interface by double-clicking the Uxml file in the game development engine.
Compared with the prior art, the Docker server 20 disclosed in the embodiment of the present invention defines a data format for standardizing a data transmission mode between the game development engine and the Docker server 20, and the game development engine and the Docker server 20 sequentially transmit and receive data according to a serialized and deserialized data transmission mode, so as to implement data interaction between the game development engine and the Docker server 20. The Docker service 20 is packaged into the Net executable program independently, the running environment of the Net executable program can be isolated from the game development engine, the problem of conflict between Docker Dotnet and the game development engine environment is solved, and the intrusion influence of the plug-in on the game development project is reduced. In addition, developers can use various functions of Docker in a game development engine through a visual Docker tool window, and the developers do not need to master knowledge and skills related to Docker, so that the use threshold and the learning cost of Docker are greatly reduced, the complex Docker instruction operation is reduced, the production efficiency is improved, and the error rate is reduced.
Referring to fig. 5, fig. 5 is a block diagram illustrating a game development engine and a Docker interaction device 30 according to an embodiment of the present invention, where the game development engine and the Docker interaction device 30 include: a processor 31, a memory 32 and a computer program stored in said memory 32 and executable on said processor 31. The processor 31 implements the steps in the interactive method embodiment of the game development engine and Docker described in the first embodiment when executing the computer program. Alternatively, the processor 31 implements the functions of the modules/units in the above device embodiments when executing the computer program.
Illustratively, the computer program may be divided into one or more modules/units, which are stored in the memory 32 and executed by the processor 31 to accomplish the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the game development engine and the interaction device 30 of Docker.
The game development engine and the Docker interaction device 30 may be a desktop computer, a notebook, a palm top computer, a cloud server, or other computing devices. The game development engine and Docker's interactive device 30 may include, but is not limited to, a processor 31, a memory 32. Those skilled in the art will appreciate that the schematic diagram is merely an example of the game development engine and the Docker interaction device 30, and does not constitute a limitation on the game development engine and the Docker interaction device 30, and may include more or less components than those shown, or combine certain components, or different components, for example, the game development engine and the Docker interaction device 30 may further include input and output devices, network access devices, buses, and the like.
The Processor 31 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, and the processor 31 is a control center of the game development engine and the interaction device 30 of Docker, and connects the whole game development engine and each part of the interaction device 30 of Docker by using various interfaces and lines.
The memory 32 may be used to store the computer program and/or module, and the processor 31 implements various functions of the game development engine and the interaction device 30 of Docker by running or executing the computer program and/or module stored in the memory 32 and calling data stored in the memory 32. The memory 32 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 32 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the module/unit integrated by the game development engine and the interaction device 30 of Docker can be stored in a computer readable storage medium if it is implemented in the form of software functional unit and sold or used as a stand-alone product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by the processor 31, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
Referring to fig. 6, fig. 6 is a block diagram of another game development engine and a Docker interaction device 40 provided in the embodiment of the present invention, where the game development engine and the Docker interaction device 40 include: a processor 41, a memory 42 and a computer program stored in said memory 42 and executable on said processor 41. The processor 41, when executing the computer program, implements the steps in the interactive method embodiment of the game development engine and Docker described in the second embodiment above. Alternatively, the processor 41 implements the functions of the modules/units in the above-described device embodiments when executing the computer program.
Illustratively, the computer program may be divided into one or more modules/units, which are stored in the memory 42 and executed by the processor 41 to accomplish the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the game development engine and the interaction device 40 of Docker.
The game development engine and Docker interaction device 40 may be a desktop computer, a laptop, a palmtop, a cloud server, or other computing device. The game development engine and Docker's interactive device 40 may include, but is not limited to, a processor 41, a memory 42. Those skilled in the art will appreciate that the schematic diagram is merely an example of the game development engine and Docker interaction device 40 and does not constitute a limitation on the game development engine and Docker interaction device 40 and may include more or fewer components than shown, or combine certain components, or different components, e.g., the game development engine and Docker interaction device 40 may also include input-output devices, network access devices, buses, etc.
The Processor 41 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and the processor 41 is a control center of the game development engine and the interaction device 40 of Docker, and various interfaces and lines are used to connect the game development engine and various parts of the interaction device 40 of Docker.
The memory 42 may be used to store the computer programs and/or modules, and the processor 41 may implement various functions of the game development engine and the interaction device 40 of the Docker by running or executing the computer programs and/or modules stored in the memory 42 and calling data stored in the memory 42. The memory 42 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory 42 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the module/unit integrated by the game development engine and the interaction device 40 of Docker can be stored in a computer readable storage medium if it is implemented in the form of software functional unit and sold or used as a stand-alone product. Based on such understanding, all or part of the flow of the method according to the above embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and used by the processor 41 to implement the steps of the above embodiments of the method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
Referring to fig. 7, fig. 7 is a block diagram illustrating a game development engine and a Docker interaction system 50 according to an embodiment of the present invention, where the game development engine and Docker interaction system 50 includes a game development engine 10 and a Docker server 20.
For details of the working process of the game development engine 10 and the Docker server 20, reference is made to the above embodiments, and the description of the present invention is omitted here.
Compared with the prior art, the game development engine and the interaction system 50 of the Docker disclosed in the embodiment of the present invention define a data format for standardizing a data transmission mode between the game development engine 10 and the Docker server 20, and the game development engine 10 and the Docker server 20 sequentially transmit and receive data according to a serialized and deserialized data transmission mode, so as to implement data interaction between the game development engine 10 and the Docker server 20. Net executable program can isolate the running environment from the game development engine, solve the problem of conflict between Docker DotNet and game development engine environment, and reduce the intrusion influence of plug-in on game development project. In addition, developers can use various functions of Docker in a game development engine through a visual Docker tool window, and the developers do not need to master knowledge and skills related to Docker, so that the use threshold and the learning cost of Docker are greatly reduced, the complex Docker instruction operation is reduced, the production efficiency is improved, and the error rate is reduced.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (11)

1. An interaction method of a game development engine and Docker is characterized by comprising the following steps:
responding to a Docker tool window starting operation, and establishing connection with a Docker server; the Docker tool window is a pre-built UI interaction component used for providing a Docker function;
responding to a Docker operation in the Docker tool window, and acquiring operation information corresponding to the Docker operation;
serializing the operation information according to a preset data format to generate a first data packet;
sending the first data packet to the Docker server so that the Docker server analyzes the first data packet to analyze operation information and execute Docker operation corresponding to the operation information, and serializing an execution result after the Docker operation is executed to generate a second data packet to return;
and receiving a second data packet returned by the Docker server, and updating the tool state of the Docker tool window according to the second data packet.
2. The game development engine and Docker interaction method of claim 1, wherein the operational information comprises an instruction type, an instruction ID, and instruction data.
3. The method for interaction between a game development engine and a Docker of claim 1, wherein the updating the tool state of the Docker tool window according to the second data packet comprises:
performing deserialization analysis on the second data packet to analyze an execution result and an instruction ID in the second data packet;
inquiring corresponding Docker operation according to the instruction ID;
and according to the execution result, updating the state value for recording the Docker operation into a preset state representation value in the Docker tool window, and displaying preset prompt information in the Docker tool window.
4. The game development engine and Docker interaction method of claim 1, wherein the data format comprises at least one of json, ProtoBuf, and yaml.
5. An interaction method of a game development engine and Docker is characterized by comprising the following steps:
responding to the connection operation of a game development engine, and establishing connection with the game development engine;
receiving a first data packet sent by the game development engine, and performing deserialization analysis on the first data packet to analyze corresponding operation information; the first data packet is generated by acquiring a Docker operation in a Docker tool window preset by the first data packet through the game development engine and serializing operation information corresponding to the Docker operation according to a preset data format;
executing Docker operation corresponding to the operation information, and serializing an execution result according to a preset data format after the Docker operation is executed to generate a second data packet;
and calling a corresponding API (application programming interface) according to the operation information, and sending the second data packet to the game development engine through the API, so that the game development engine updates the tool state of the Docker tool window according to the second data packet.
6. The interaction method of a game development engine and a Docker of claim 5, wherein the API interfaces comprise at least two, which are packaged according to a preset packaging format; then, the calling the corresponding API interface according to the first data packet according to the operation information includes:
inquiring a corresponding API (application program interface) in a preset mapping table according to the instruction type in the operation information;
and calling the API interface by using the instruction data in the operation information as parameters.
7. A game development engine, comprising:
the connection module is used for responding to Docker tool window starting operation and establishing connection with a Docker server; the Docker tool window is a pre-built UI interaction component used for providing a Docker function;
the operating information acquiring module is used for responding to a Docker operation in the Docker tool window and acquiring operating information corresponding to the Docker operation;
the first data packet generating module is used for serializing the operation information according to a preset data format to generate a first data packet;
the first data packet sending module is used for sending the first data packet to the Docker server so that the Docker server can analyze the first data packet to analyze operation information and execute Docker operation corresponding to the operation information, and serializing an execution result after the Docker operation is executed to generate a second data packet to return;
and the tool state updating module is used for receiving a second data packet returned by the Docker server and updating the tool state of the Docker tool window according to the second data packet.
8. A Docker server, comprising:
the connection module is used for responding to the connection operation of a game development engine and establishing connection with the game development engine;
the first data packet receiving module is used for receiving a first data packet sent by the game development engine and performing deserialization analysis on the first data packet to analyze corresponding operation information; the first data packet is generated by acquiring a Docker operation in a Docker tool window preset by the first data packet through the game development engine and serializing operation information corresponding to the Docker operation according to a preset data format;
the second data packet generation module is used for executing Docker operation corresponding to the operation information and serializing an execution result according to a preset data format after the Docker operation is executed so as to generate a second data packet;
and the second data packet sending module is used for calling a corresponding API (application programming interface) according to the operation information and sending the second data packet to the game development engine through the API so as to enable the game development engine to update the tool state of the Docker tool window according to the second data packet.
9. An interactive device of a game development engine and a Docker, comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the interactive method of the game development engine and the Docker as claimed in any one of claims 1 to 4 when executing the computer program.
10. A game development engine and Docker interaction device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the game development engine and Docker interaction method of claim 5 or 6 when executing the computer program.
11. An interactive system of a game development engine and a Docker, comprising the game development engine of claim 7 and the Docker server of claim 8.
CN202110839674.0A 2021-07-23 2021-07-23 Game development engine and Docker interaction method, device and system Pending CN113680068A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110839674.0A CN113680068A (en) 2021-07-23 2021-07-23 Game development engine and Docker interaction method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110839674.0A CN113680068A (en) 2021-07-23 2021-07-23 Game development engine and Docker interaction method, device and system

Publications (1)

Publication Number Publication Date
CN113680068A true CN113680068A (en) 2021-11-23

Family

ID=78577842

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110839674.0A Pending CN113680068A (en) 2021-07-23 2021-07-23 Game development engine and Docker interaction method, device and system

Country Status (1)

Country Link
CN (1) CN113680068A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528224A (en) * 2016-11-03 2017-03-22 腾讯科技(深圳)有限公司 Content updating method and system for Docker container, and server
US20170304707A1 (en) * 2015-09-24 2017-10-26 Circadence Corporation Mission-based, game-implemented cyber training system and method
CN108654090A (en) * 2018-05-17 2018-10-16 北京奇虎科技有限公司 The method and device that operating system is interacted with game application
CN110308966A (en) * 2019-06-05 2019-10-08 广东电网有限责任公司电力调度控制中心 A kind of static security analysis method based on container technique
CN110457218A (en) * 2019-08-07 2019-11-15 Oppo广东移动通信有限公司 Game engine test method, device, storage medium and electronic equipment
CN110851284A (en) * 2019-11-18 2020-02-28 广东电网有限责任公司 Dispatcher power flow service method, device and equipment
US20210027581A1 (en) * 2019-07-22 2021-01-28 Gg Software As Electronic gaming having game state lock and result preview

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170304707A1 (en) * 2015-09-24 2017-10-26 Circadence Corporation Mission-based, game-implemented cyber training system and method
CN106528224A (en) * 2016-11-03 2017-03-22 腾讯科技(深圳)有限公司 Content updating method and system for Docker container, and server
CN108654090A (en) * 2018-05-17 2018-10-16 北京奇虎科技有限公司 The method and device that operating system is interacted with game application
CN110308966A (en) * 2019-06-05 2019-10-08 广东电网有限责任公司电力调度控制中心 A kind of static security analysis method based on container technique
US20210027581A1 (en) * 2019-07-22 2021-01-28 Gg Software As Electronic gaming having game state lock and result preview
CN110457218A (en) * 2019-08-07 2019-11-15 Oppo广东移动通信有限公司 Game engine test method, device, storage medium and electronic equipment
CN110851284A (en) * 2019-11-18 2020-02-28 广东电网有限责任公司 Dispatcher power flow service method, device and equipment

Similar Documents

Publication Publication Date Title
CN107766126B (en) Container mirror image construction method, system and device and storage medium
US7240328B2 (en) System and method for visual application development without programming
US7337436B2 (en) System and method for cross platform and configuration build system
US20160292137A1 (en) Methods and Systems for the Provisioning and Execution of a Mobile Software Application
US20190114165A1 (en) Using semantic annotations to control compatibility behaviors
WO2019090994A1 (en) Script testing automated execution method, apparatus, equipment and storage medium
CN108958843A (en) Plug-in unit construction method, system, equipment and medium based on lightweight script
US20230214243A1 (en) One-machine multi-control method, apparatus, system and electronic device
CN112328229A (en) Method for quickly creating Jenkins assembly line
CN111026439A (en) Application program compatibility method, device, equipment and computer storage medium
CN110727429A (en) Front-end page generation method, device and equipment
CN111949491A (en) SQL extraction method and device for MyBatis application program
CN112363694A (en) Integration method of FMU file, solver running environment and industrial software
CN110221840B (en) Function implementation method and device of application program, equipment and storage medium
CN110045997B (en) Object initialization method, device, equipment and storage medium of basic function module
CN113680068A (en) Game development engine and Docker interaction method, device and system
CN108595160B (en) Method and storage medium for calling native object by JS
EP4102361A2 (en) Method and apparatus for managing functions of a query engine
CN109542437A (en) A kind of HMI development approach based on Linux built-in browser
CN115964042A (en) Menu generation method and device, storage medium and electronic equipment
CN116149639A (en) Method and device for developing components, electronic equipment and storage medium
CN111258970A (en) Method, device, equipment and storage medium for displaying log at client
CN112612474A (en) Product transplanting method and device, storage medium and electronic equipment
CN111290746A (en) Object access method, device, equipment and storage medium
CN112181401A (en) Application construction method and application construction platform

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