CN117531204A - Method and system for editing game interface in real time - Google Patents

Method and system for editing game interface in real time Download PDF

Info

Publication number
CN117531204A
CN117531204A CN202311491024.7A CN202311491024A CN117531204A CN 117531204 A CN117531204 A CN 117531204A CN 202311491024 A CN202311491024 A CN 202311491024A CN 117531204 A CN117531204 A CN 117531204A
Authority
CN
China
Prior art keywords
interface
game
editing
client
editor
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
CN202311491024.7A
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.)
Fujian Tianqing Online Interactive Technology Co Ltd
Original Assignee
Fujian Tianqing Online Interactive 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 Fujian Tianqing Online Interactive Technology Co Ltd filed Critical Fujian Tianqing Online Interactive Technology Co Ltd
Priority to CN202311491024.7A priority Critical patent/CN117531204A/en
Publication of CN117531204A publication Critical patent/CN117531204A/en
Pending legal-status Critical Current

Links

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
    • A63F13/63Generating 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 by the player, e.g. authoring using a 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/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a method and a system for editing a game interface in real time, wherein the method comprises the following steps: step 1, setting a game interface editor, wherein the game interface editor supports reading a project configuration file of a game client to obtain interface control configuration, picture resource configuration, font file configuration and game interface configuration of the game client; step 2, loading a game client dynamic library and starting a game client; step 3, loading project configuration of the game client by the game interface editor in the game running process, and acquiring a current interface window of the game client; step 4, selecting an interface window by the game interface editor for focusing editing; step 5, when editing on the game interface editor, the corresponding client interfaces are changed simultaneously to realize dynamic updating; and step 6, storing the game interface file at the interface position of the game client to realize the persistent storage of editing operation and realize the real-time editing in the game running process.

Description

Method and system for editing game interface in real time
Technical Field
The invention relates to the technical field of computers, in particular to a method and a system for editing a game interface in real time.
Background
In the game interface editing scheme: the prior art employs an interface editor function in the game engine. Game engines such as Unity, universal Engine, etc. provide an interface editor that allows a developer to edit elements of a game scene, character, object, etc. prior to game play. These interface editors typically provide visual interfaces and tools that enable a developer to modify and adjust various aspects of the game interface, including layout, materials, animation, effects, and the like. After editing the interface, starting the game and debugging the interface effect.
However, the interface editors in many game engines edit the interface on the editors, and then start the game to load and run the game interface. If a certain interface is required to be edited, a specific interface is required to be found according to the interface name, and then the interface is edited. However, there are often very many interfaces in a game that need to be edited, and sometimes the name of the interface to be edited is not known, which is troublesome to find. In addition, users hope to edit in the game running process, interface changes can be observed in real time, and compared with editing, reloading and starting are performed, so that a great deal of efficiency is improved. Therefore, the scheme mainly solves the problem of positioning the game interface and the problem of editing in real time in the game running process.
Disclosure of Invention
In order to overcome the problems, the invention aims to provide a method for editing a game interface in real time, which can realize real-time editing in the game running process.
The invention is realized by adopting the following scheme: a method for real-time editing of a game interface, the method comprising the steps of:
step 1, setting a game interface editor, wherein the game interface editor supports reading a project configuration file of a game client to obtain interface control configuration, picture resource configuration, font file configuration and game interface configuration of the game client;
step 2, loading a game client dynamic library and starting a game client;
step 3, loading project configuration of the game client by the game interface editor in the game running process, and acquiring a current interface window of the game client;
step 4, selecting an interface window by the game interface editor for focusing editing;
step 5, when editing on the game interface editor, the corresponding client interfaces are changed simultaneously to realize dynamic updating;
and 6, storing the game interface file at the interface position of the game client to realize the persistent storage of the editing operation.
Further, the step 1 specifically includes: setting a game interface editor, analyzing interface control configuration information to generate a control list, analyzing picture resource configuration information to generate a picture list, analyzing font file configuration information to generate a font list, and analyzing game interface configuration information to generate an interface list; and because the configuration information is the Xml file, analyzing the Xml file by a RapidXml method, and analyzing the Xml file into a list directly corresponding to the interface editor.
Providing a visual interface in a game interface editor, wherein the visual interface is used for adding and editing various elements on the game interface, generating a specific interface control by dragging from a control list to the visual interface, setting pictures and fonts through a picture list and a font list, acquiring all interface contents of a game client through the interface list, and performing secondary editing on the edited interface; the game interface editor also includes functions to drag, zoom, rotate interface elements, and adjust UI element hierarchical relationships.
Further, the step 2 specifically includes: loading a game client dynamic library and starting a game client; firstly, an executable file of a game client needs to be found and started, then a dynamic library file of the client is loaded through a dynamic library loader so that functions and data in the client can be synchronously used in a game interface editor, and the consistency of the functions and the data of the game client and the game interface editor can be ensured due to the fact that the same dynamic library file is used by the game client and the game interface editor.
Further, the step 3 of obtaining the current interface window of the game client specifically includes: the game interface editor finds the window handle of the game client by calling the function in the game client dynamic library, and obtains the interface window handle of the current game client so as to operate the interface window handle in the game interface editor and realize real-time monitoring editing operation: the game interface needs to monitor editing operation in real time and is realized through an event monitoring mechanism, and when the editing operation occurs, the game interface receives a corresponding event notification; the window handle of the found game client uses Windows API functions FindWindow or FindWindow Ex, and the functions search Windows with specific class names and window names in the running process and return the handle of the window; the function in the dynamic library of the game client is called: the addresses of the functions in the dynamic library are loaded and obtained using LoadLibrary and GetProcAddress functions.
Further, the event monitoring mechanism is used for processing user input, triggering and responding to game state change events; the method specifically comprises the following steps: s31, defining event types: first, different types of events which can occur in a game need to be defined;
step S32, registering an event monitor: where listening for events is desired, an event listener is registered with the event manager,
the event manager is responsible for managing event listeners of different types and calling corresponding listeners when an event is triggered;
s33, realizing an event monitor: implementing a corresponding event listener for each event type, the event listener being a class that contains callback functions or methods to handle the event;
step S34, triggering an event: triggering corresponding events through an event manager when the events in the game occur;
step S35, responding to an event: when an event is triggered, the event manager can call a callback function or a callback method of the corresponding event monitor to monitor.
Further, the step 4 specifically includes: providing a visual interface in a game interface editor, displaying all interface windows of a current game client, allowing a user to select one window for editing, selecting a specific control on the interface on the game client, positioning the specific control to the interface name according to the specific control, acquiring a handle of the specific interface window by the game interface editor through the interface name, editing the interface window in subsequent operation, and not editing other interfaces on the game interface editor.
Further, the step 5 specifically includes: when editing is carried out in the game interface editor, the editing result is applied to the interface of the game client in real time, and as the same dynamic operation library is used, the operation of the same interface control can be ensured; when the game state changes, the corresponding interface elements need to be updated in real time, and when the interface control is edited, the information of the interface operation is obtained through the monitoring editing operation of the game client; when the editing operation occurs, the game interface receives a corresponding event notification to synchronously change the appearance and the behavior of the game client interface; through the event monitoring mechanism, the game client interface can acquire the change on the interface editor at the first time so as to carry out synchronous interface modification.
Further, the step 6 specifically includes: after editing in the game interface editor, the editing result needs to be saved in the project configuration file of the game client so as to restore the editing state when the game client is started next time, and the game interface editor needs to serialize the configuration information in the memory into a file and save the file on a disk; meanwhile, the saved result is notified to the game client so that the client can update the interface state of the game client, meanwhile, the data of the editing operation is stored in a lasting mode, and the data of the editing operation is saved by using a database or local file mode so that the previous editing state can be loaded and restored after the game is restarted.
The invention also provides a system for editing the game interface in real time, which comprises: the device comprises an editor module, a starting module, a loading module, a focusing editing module, a real-time updating module and a storage module;
the editor module is used for setting a game interface editor, and the game interface editor supports reading a project configuration file of a game client to obtain interface control configuration, picture resource configuration, font file configuration and game interface configuration of the game client;
the starting module loads a game client dynamic library and starts the game client;
the loading module loads the project configuration of the game client in the game running process, and acquires the current interface window of the game client;
the game interface editor selects an interface window for focusing editing;
the real-time updating module is used for enabling the corresponding client interfaces to be changed simultaneously when editing on the game interface editor so as to realize dynamic updating;
and the storage module is used for storing the game interface file at the interface position of the game client to realize the persistent storage of the editing operation.
Further, the editor module specifically includes: setting a game interface editor, analyzing interface control configuration information to generate a control list, analyzing picture resource configuration information to generate a picture list, analyzing font file configuration information to generate a font list, and analyzing game interface configuration information to generate an interface list; and because the configuration information is the Xml file, analyzing the Xml file by a RapidXml method, and analyzing the Xml file into a list directly corresponding to the interface editor.
Providing a visual interface in a game interface editor, wherein the visual interface is used for adding and editing various elements on the game interface, generating a specific interface control by dragging from a control list to the visual interface, setting pictures and fonts through a picture list and a font list, acquiring all interface contents of a game client through the interface list, and performing secondary editing on the edited interface; the game interface editor also includes functions to drag, zoom, rotate interface elements, and adjust UI element hierarchical relationships.
Further, the starting module specifically comprises: loading a game client dynamic library and starting a game client; firstly, an executable file of a game client needs to be found and started, then a dynamic library file of the client is loaded through a dynamic library loader so that functions and data in the client can be synchronously used in a game interface editor, and the consistency of the functions and the data of the game client and the game interface editor can be ensured due to the fact that the same dynamic library file is used by the game client and the game interface editor.
Further, the obtaining the current interface window of the game client in the loading module specifically includes: the game interface editor finds the window handle of the game client by calling the function in the game client dynamic library, and obtains the interface window handle of the current game client so as to operate the interface window handle in the game interface editor and realize real-time monitoring editing operation: the game interface needs to monitor editing operation in real time and is realized through an event monitoring mechanism, and when the editing operation occurs, the game interface receives a corresponding event notification; the window handle of the found game client uses Windows API functions FindWindow or FindWindow Ex, and the functions search Windows with specific class names and window names in the running process and return the handle of the window; the function in the dynamic library of the game client is called: the addresses of the functions in the dynamic library are loaded and obtained using LoadLibrary and GetProcAddress functions.
Further, the event monitoring mechanism is used for processing user input, triggering and responding to game state change events; the method specifically comprises the following steps: s31, defining event types: first, different types of events which can occur in a game need to be defined;
Step S32, registering an event monitor: where listening for events is desired, an event listener is registered with the event manager,
the event manager is responsible for managing event listeners of different types and calling corresponding listeners when an event is triggered;
s33, realizing an event monitor: implementing a corresponding event listener for each event type, the event listener being a class that contains callback functions or methods to handle the event;
step S34, triggering an event: triggering corresponding events through an event manager when the events in the game occur;
step S35, responding to an event: when an event is triggered, the event manager can call a callback function or a callback method of the corresponding event monitor to monitor.
Further, the focusing editing module specifically includes: providing a visual interface in a game interface editor, displaying all interface windows of a current game client, allowing a user to select one window for editing, selecting a specific control on the interface on the game client, positioning the specific control to the interface name according to the specific control, acquiring a handle of the specific interface window by the game interface editor through the interface name, editing the interface window in subsequent operation, and not editing other interfaces on the game interface editor.
Further, the real-time updating module specifically includes: when editing is carried out in the game interface editor, the editing result is applied to the interface of the game client in real time, and as the same dynamic operation library is used, the operation of the same interface control can be ensured; when the game state changes, the corresponding interface elements need to be updated in real time, and when the interface control is edited, the information of the interface operation is obtained through the monitoring editing operation of the game client; when the editing operation occurs, the game interface receives a corresponding event notification to synchronously change the appearance and the behavior of the game client interface; through the event monitoring mechanism, the game client interface can acquire the change on the interface editor at the first time so as to carry out synchronous interface modification.
Further, the storage module specifically includes: after editing in the game interface editor, the editing result needs to be saved in the project configuration file of the game client so as to restore the editing state when the game client is started next time, and the game interface editor needs to serialize the configuration information in the memory into a file and save the file on a disk; meanwhile, the saved result is notified to the game client so that the client can update the interface state of the game client, meanwhile, the data of the editing operation is stored in a lasting mode, and the data of the editing operation is saved by using a database or local file mode so that the previous editing state can be loaded and restored after the game is restarted.
The invention has the beneficial effects that: the invention sets a game interface editor which supports to obtain interface control configuration, picture resource configuration, font file configuration and game interface configuration of the game client by reading the project configuration file of the game client; providing a visual interface on the game interface editor for adding and editing various elements on the game interface, and then starting the game client by loading a game client dynamic library; in the game running process, acquiring a project configuration file of a current game client, acquiring a game interface of the current game, selecting a specific interface for focusing editing and realizing a dynamic updating mechanism, and finally storing the game interface file at a specific interface position of the game client to realize the lasting storage of editing operation. The method can edit the interface in real time in the running process of the game, and provide a focusing editing interface mode, thereby enhancing the playability and the customizability of the game and solving the positioning problem of the game interface.
Drawings
FIG. 1 is a schematic flow chart of the method of the present invention.
Fig. 2 is a system schematic block diagram of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Referring to fig. 1, the method for editing a game interface in real time according to the present invention includes the following steps:
step 1, setting a game interface editor, wherein the game interface editor supports reading a project configuration file of a game client to obtain interface control configuration, picture resource configuration, font file configuration and game interface configuration of the game client;
step 2, loading a game client dynamic library and starting a game client;
step 3, loading project configuration of the game client by the game interface editor in the game running process, and acquiring a current interface window of the game client;
step 4, selecting an interface window by the game interface editor for focusing editing;
step 5, when editing on the game interface editor, the corresponding client interfaces are changed simultaneously to realize dynamic updating;
and 6, storing the game interface file at the interface position of the game client to realize the persistent storage of the editing operation.
The invention is further described with reference to the following specific examples:
a method for editing game interface in real time includes:
1. Setting a game interface editor;
firstly, setting a game interface editor, and obtaining interface control configuration, picture resource configuration, font file configuration and game interface configuration of a game client by reading a project configuration file of the game client. Analyzing the interface control configuration information to generate a control list, analyzing the picture resource configuration information to generate a picture list, analyzing the font file configuration information to generate a font list, and analyzing the game interface configuration information to generate an interface list.
Since the configuration files are all XML files, the XML files are parsed by a RapidXml (RapidXml refers to XML DOM parsing toolkit, which can parse XML files), and then parsed into a direct list of interface editors, for example: the font file configuration content is:
<FontSet>
<Font Name="mode_10"Filename="data/ui/font/ndyh.ttf"NativeHorzRes="1334"NativeVertRes="750"AutoScaled="True"Size="7.5"AntiAlias="True">
</Font>
<Font Name="mode_12"Filename="data/ui/font/ndyh.ttf"NativeHorzRes="1334"NativeVertRes="750"AutoScaled="True"Size="9"AntiAlias="True">
</Font>
<Font Name="mode_13"Filename="data/ui/font/ndyh.ttf"NativeHorzRes="1334"NativeVertRes="750"AutoScaled="True"Size="9.75"AntiAlias="True">
</Font>
<FontSet>。
a font list can be obtained by using RapidXml parsing, and the font list has 3 fonts, namely mode_10, mode_12 and mode_13.
A visual interface is provided in the game interface editor for the addition and editing of various elements on the game interface, such as buttons, text boxes, images, etc. Specific interface controls can be generated by dragging from the control list to the visual interface, the pictures are set through the picture list and the font list, all interface contents of the game client can be obtained through the interface list, and the edited interface can be edited for the second time. The game interface editor also includes the functionality to drag, scale, rotate interface elements, and adjust UI element hierarchical relationships. Therefore, the game interface editor has the capability of customizing the game interface and is used for editing the game interface in real time.
2. Loading a game client dynamic library and starting a game client;
next, the game client is started and the associated dynamic library file is loaded. First, it is necessary to find an executable file of the game client and start it. Then, the dynamic library file of the client is loaded by the dynamic library loader (using the LoadLibrary function on Windows) so that the functions and data in the dynamic library file can be synchronously used in the interface editor, and the consistency of the functions and data of the game client and the game interface editor can be ensured due to the same dynamic library file used by the two dynamic library files.
3. Loading a game client project configuration by a game interface editor;
after the game client is started, opening a project configuration file of the game client in a game interface editor, wherein the project configuration file comprises relevant configuration information of the game client, and interface control configuration, picture resource configuration, font file configuration and game interface configuration of the game client. The editor needs to parse the file and load the configuration information into memory for subsequent use. The method mainly comprises the steps of analyzing interface control configuration information to generate a control list, analyzing picture resource configuration information to generate a picture list, analyzing font file configuration information to generate a font list, and analyzing game interface configuration information to generate an interface list.
4. Acquiring a current interface window of a game client;
the game interface editor finds the window handle of the game client by calling the function in the game client dynamic library, and obtains the interface window handle of the current game client so as to operate the interface window handle in the game interface editor and realize real-time monitoring editing operation: the game interface needs to monitor editing operation in real time and is realized through an event monitoring mechanism, and when the editing operation occurs, the game interface receives a corresponding event notification; the window handle of the found game client uses Windows API functions FindWindow or FindWindow Ex, and the functions search Windows with specific class names and window names in the running process and return the handle of the window; the function in the dynamic library of the game client is called: the addresses of the functions in the dynamic library are loaded and obtained using LoadLibrary and GetProcAddress functions.
The event listening mechanism is a design mode for handling the triggering and response of events such as user input, game state changes, etc. The method mainly comprises the following steps:
31. defining event types: it is first necessary to define different types of events that may occur in a game. Such as a keyboard key event, a mouse click event, a game state change event, etc.
32. Registering an event listener: where listening for events is required, an event listener is registered in the event manager. The event manager is responsible for managing different types of event listeners and invoking the corresponding listeners when an event triggers.
33. Implementing an event listener: a corresponding event listener is implemented for each event type. An event listener is typically a class that contains callback functions or methods to handle events. For example, a keyboard key event listener may contain a key click method and a mouse click event listener may contain a mouse click method.
34. Triggering events: when an event in the game occurs, the corresponding event is triggered by the event manager. For example, when a user presses a Key of the keyboard, the event manager may trigger a keyboard Key event and transmit a corresponding parameter, such as pressing a Key code, e.g., pressing F of the keyboard, and transmitting a key_f corresponding to F.
35. In response to an event: when an event is triggered, the event manager can call a callback function or a callback method of the corresponding event monitor to monitor. In the callback function of the event listener, specific logic may be implemented, such as updating game state, responding to user input, etc.
5. The game interface editor selects an interface window for focusing editing;
providing a visual interface in the game interface editor, displaying all interface windows of the current game client, and allowing a user to select one window for editing. Because an interface is often composed of a large number of interfaces, and it is possible to overlap one another, if editing is troublesome and the effect is not good, it is necessary to select an interface window for focus editing, so that interference of interfaces which do not need editing can be eliminated, and attention can be paid to interfaces which need editing. By selecting a specific control on an interface on a game client, positioning the specific control to the interface name according to the control, acquiring a handle of a specific interface window by a game interface editor through the interface name, editing the interface window in subsequent operation, and editing other interfaces without editing on the game interface editor. At present, many existing interface editors edit the whole interface together, so that not only is the display effect poor, but also interface locking operation is required to be carried out on the interface which is not edited. The scheme directly uses focusing editing, so that the display effect is clearer and the editing is more convenient.
6. When the game interface is edited, the corresponding client interface is changed at the same time;
and when editing is performed in the game interface editor, the editing result is applied to the interface of the game client in real time. Because the same dynamic operation library is used, the same interface control of operation can be ensured. When the game state changes, the corresponding interface element needs to be updated in real time. When the interface control is edited, for example, when each attribute such as position, size, picture resource and the like is changed, the information of the interface operation is obtained through the monitoring editing operation of the game client. Mainly by an event listening mechanism. When the editing operation occurs, the game interface receives a corresponding event notification to synchronously change the appearance and the behavior of the game client interface. The method is a key for realizing real-time editing of the game interface, and the game client interface can acquire the change on the interface editor at the first time through an event monitoring mechanism so as to carry out synchronous interface modification. Different from the existing real-time editing, the interface editing is finished by restarting the game client to load the interface, and the scheme can edit the interface directly in the game running process without restarting the game client.
7. Saving current interface files to game clients
After editing in the game interface editor, the editing result needs to be saved in the project configuration file of the game client so as to restore the editing state when the game client is started next time. The editor needs to serialize the configuration information in the memory into a file and save it to disk. Meanwhile, the saved results need to be notified to the game client so that the client can update the interface state thereof. In order to ensure persistence of the editing operation, it is necessary to store data of the editing operation in a persistence manner. And the data of the editing operation can be saved by using a database or a local file and the like, so that the previous editing state can be loaded and restored after the game is restarted.
Referring to fig. 2, the present invention further provides a system for editing a game interface in real time, where the system includes: the device comprises an editor module, a starting module, a loading module, a focusing editing module, a real-time updating module and a storage module;
the editor module is used for setting a game interface editor, and the game interface editor supports reading a project configuration file of a game client to obtain interface control configuration, picture resource configuration, font file configuration and game interface configuration of the game client;
The starting module loads a game client dynamic library and starts the game client;
the loading module loads the project configuration of the game client in the game running process, and acquires the current interface window of the game client;
the game interface editor selects an interface window for focusing editing;
the real-time updating module is used for enabling the corresponding client interfaces to be changed simultaneously when editing on the game interface editor so as to realize dynamic updating;
and the storage module is used for storing the game interface file at the interface position of the game client to realize the persistent storage of the editing operation.
The editor module specifically comprises: setting a game interface editor, analyzing interface control configuration information to generate a control list, analyzing picture resource configuration information to generate a picture list, analyzing font file configuration information to generate a font list, and analyzing game interface configuration information to generate an interface list;
providing a visual interface in a game interface editor, wherein the visual interface is used for adding and editing various elements on the game interface, generating a specific interface control by dragging from a control list to the visual interface, setting pictures and fonts through a picture list and a font list, acquiring all interface contents of a game client through the interface list, and performing secondary editing on the edited interface; the game interface editor also includes functions to drag, zoom, rotate interface elements, and adjust UI element hierarchical relationships.
The starting module specifically comprises: loading a game client dynamic library and starting a game client; firstly, an executable file of a game client needs to be found and started, then a dynamic library file of the client is loaded through a dynamic library loader so that functions and data in the client can be synchronously used in a game interface editor, and the consistency of the functions and the data of the game client and the game interface editor can be ensured due to the fact that the same dynamic library file is used by the game client and the game interface editor.
The loading module obtains the current interface window of the game client specifically as follows: the game interface editor finds the window handle of the game client by calling the function in the game client dynamic library, and obtains the interface window handle of the current game client so as to operate the interface window handle in the game interface editor and realize real-time monitoring editing operation: the game interface needs to monitor editing operation in real time and is realized through an event monitoring mechanism, and when the editing operation occurs, the game interface receives a corresponding event notification; the window handle of the found game client uses Windows API functions FindWindow or FindWindow Ex, and the functions search Windows with specific class names and window names in the running process and return the handle of the window; the function in the dynamic library of the game client is called: the addresses of the functions in the dynamic library are loaded and obtained using LoadLibrary and GetProcAddress functions.
Further, the event monitoring mechanism is used for processing user input, triggering and responding to game state change events; the method specifically comprises the following steps: s31, defining event types: first, different types of events which can occur in a game need to be defined;
step S32, registering an event monitor: where listening for events is desired, an event listener is registered with the event manager,
the event manager is responsible for managing event listeners of different types and calling corresponding listeners when an event is triggered;
s33, realizing an event monitor: implementing a corresponding event listener for each event type, the event listener being a class that contains callback functions or methods to handle the event;
step S34, triggering an event: triggering corresponding events through an event manager when the events in the game occur;
step S35, responding to an event: when an event is triggered, the event manager can call a callback function or a callback method of the corresponding event monitor to monitor.
The focusing editing module specifically comprises: providing a visual interface in a game interface editor, displaying all interface windows of a current game client, allowing a user to select one window for editing, selecting a specific control on the interface on the game client, positioning the specific control to the interface name according to the specific control, acquiring a handle of the specific interface window by the game interface editor through the interface name, editing the interface window in subsequent operation, and not editing other interfaces on the game interface editor.
The real-time updating module specifically comprises: when editing is carried out in the game interface editor, the editing result is applied to the interface of the game client in real time, and as the same dynamic operation library is used, the operation of the same interface control can be ensured; when the game state changes, the corresponding interface elements need to be updated in real time, and when the interface control is edited, the information of the interface operation is obtained through the monitoring editing operation of the game client; when the editing operation occurs, the game interface receives a corresponding event notification to synchronously change the appearance and the behavior of the game client interface; through the event monitoring mechanism, the game client interface can acquire the change on the interface editor at the first time so as to carry out synchronous interface modification.
The storage module specifically comprises: after editing in the game interface editor, the editing result needs to be saved in the project configuration file of the game client so as to restore the editing state when the game client is started next time, and the game interface editor needs to serialize the configuration information in the memory into a file and save the file on a disk; meanwhile, the saved result is notified to the game client so that the client can update the interface state of the game client, meanwhile, the data of the editing operation is stored in a lasting mode, and the data of the editing operation is saved by using a database or local file mode so that the previous editing state can be loaded and restored after the game is restarted.
The application scene of the invention is as follows: firstly, the editor module sets a game interface editor capable of editing interfaces, then loads a game client dynamic library and starts the game client. After the game client is started, opening a project configuration file of the game client in a game interface editor, wherein the project configuration file comprises relevant configuration information of the game client, and interface control configuration, picture resource configuration, font file configuration and game interface configuration of the game client. The editor needs to parse the file and load the configuration information into memory for subsequent use. The method mainly comprises the steps of analyzing interface control configuration information to generate a control list, analyzing picture resource configuration information to generate a picture list, analyzing font file configuration information to generate a font list, and analyzing game interface configuration information to generate an interface list.
The game interface editor obtains the interface window handle of the current game client by calling the function in the game client dynamic library. The first interface is a main interface, which is mainly composed of a server selection interface, a user login interface, a help interface, a game announcement interface and the like. This is intended to add a guest login button to the user login interface. Selecting any control of the user login interface, positioning to the name of the user login interface, acquiring the handle of the window of the user login interface according to the name of the user login interface by the game interface editor, focusing on the interface for editing, and not editing the other interfaces on the game interface editor. And adding a button for guest login to the user login interface window, and then associating the realization logic of guest login. After the interface is edited, the buttons added with the game login on the user login interface are obtained through event monitoring of the game client, buttons added with the guest login are synchronously carried out on the game client, and the complete and consistent operation of the interfaces at two sides is achieved.
After editing the guest login interface, saving the specific position of the current user login interface to the game client so as to restore the editing state when the game client is started next time. The editor needs to serialize the configuration information in the memory into a file and save it to disk. And the data of the editing operation can be saved by using a database or a local file and the like, so that the previous editing state can be loaded and restored after the game is restarted.
The foregoing description is only of the preferred embodiments of the invention, and all changes and modifications that come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (16)

1. A method for editing a game interface in real time is characterized by comprising the following steps: the method comprises the following steps:
step 1, setting a game interface editor, wherein the game interface editor supports reading a project configuration file of a game client to obtain interface control configuration, picture resource configuration, font file configuration and game interface configuration of the game client;
step 2, loading a game client dynamic library and starting a game client;
step 3, loading project configuration of the game client by the game interface editor in the game running process, and acquiring a current interface window of the game client;
Step 4, selecting an interface window by the game interface editor for focusing editing;
step 5, when editing on the game interface editor, the corresponding client interfaces are changed simultaneously to realize dynamic updating;
and 6, storing the game interface file at the interface position of the game client to realize the persistent storage of the editing operation.
2. The method for real-time editing of a game interface according to claim 1, wherein: the step 1 specifically comprises the following steps: setting a game interface editor, analyzing interface control configuration information to generate a control list, analyzing picture resource configuration information to generate a picture list, analyzing font file configuration information to generate a font list, and analyzing game interface configuration information to generate an interface list; because the configuration information is the Xml file, the Xml file is analyzed by a RapidXml method and is analyzed into a list directly corresponding to the interface editor;
providing a visual interface in a game interface editor, wherein the visual interface is used for adding and editing various elements on the game interface, generating a specific interface control by dragging from a control list to the visual interface, setting pictures and fonts through a picture list and a font list, acquiring all interface contents of a game client through the interface list, and performing secondary editing on the edited interface; the game interface editor also includes functions to drag, zoom, rotate interface elements, and adjust UI element hierarchical relationships.
3. The method for real-time editing of a game interface according to claim 1, wherein: the step 2 specifically comprises the following steps: loading a game client dynamic library and starting a game client; firstly, an executable file of a game client needs to be found and started, then a dynamic library file of the client is loaded through a dynamic library loader so that functions and data in the client can be synchronously used in a game interface editor, and the consistency of the functions and the data of the game client and the game interface editor can be ensured due to the fact that the same dynamic library file is used by the game client and the game interface editor.
4. The method for real-time editing of a game interface according to claim 1, wherein: the step 3 of obtaining the current interface window of the game client specifically includes: the game interface editor finds the window handle of the game client by calling the function in the game client dynamic library, and obtains the interface window handle of the current game client so as to operate the interface window handle in the game interface editor and realize real-time monitoring editing operation: the game interface needs to monitor editing operation in real time and is realized through an event monitoring mechanism, and when the editing operation occurs, the game interface receives a corresponding event notification; the window handle of the found game client uses Windows API functions FindWindow or FindWindow Ex, and the functions search Windows with specific class names and window names in the running process and return the handle of the window; the function in the dynamic library of the game client is called: the addresses of the functions in the dynamic library are loaded and obtained using LoadLibrary and GetProcAddress functions.
5. The method for real-time editing of a game interface according to claim 4, wherein: the event monitoring mechanism is used for processing user input, triggering and responding to game state change events; the method specifically comprises the following steps: s31, defining event types: first, different types of events which can occur in a game need to be defined;
step S32, registering an event monitor: registering an event monitor in an event manager at a place where an event needs to be monitored, wherein the event manager is responsible for managing event monitors of different types and calling the corresponding monitor when the event is triggered; s33, realizing an event monitor: implementing a corresponding event listener for each event type, the event listener being a class that contains callback functions or methods to handle the event;
step S34, triggering an event: triggering corresponding events through an event manager when the events in the game occur;
step S35, responding to an event: when an event is triggered, the event manager can call a callback function or a callback method of the corresponding event monitor to monitor.
6. The method for real-time editing of a game interface according to claim 1, wherein: the step 4 specifically comprises the following steps: providing a visual interface in a game interface editor, displaying all interface windows of a current game client, allowing a user to select one window for editing, selecting a specific control on the interface on the game client, positioning the specific control to the interface name according to the specific control, acquiring a handle of the specific interface window by the game interface editor through the interface name, editing the interface window in subsequent operation, and not editing other interfaces on the game interface editor.
7. The method for real-time editing of a game interface according to claim 1, wherein: the step 5 specifically comprises the following steps: when editing is carried out in the game interface editor, the editing result is applied to the interface of the game client in real time, and as the same dynamic operation library is used, the operation of the same interface control can be ensured; when the game state changes, the corresponding interface elements need to be updated in real time, and when the interface control is edited, the information of the interface operation is obtained through the monitoring editing operation of the game client; when the editing operation occurs, the game interface receives a corresponding event notification to synchronously change the appearance and the behavior of the game client interface; through the event monitoring mechanism, the game client interface can acquire the change on the interface editor at the first time so as to carry out synchronous interface modification.
8. The method for real-time editing of a game interface according to claim 1, wherein: the step 6 specifically comprises the following steps: after editing in the game interface editor, the editing result needs to be saved in the project configuration file of the game client so as to restore the editing state when the game client is started next time, and the game interface editor needs to serialize the configuration information in the memory into a file and save the file on a disk; meanwhile, the saved result is notified to the game client so that the client can update the interface state of the game client, meanwhile, the data of the editing operation is stored in a lasting mode, and the data of the editing operation is saved by using a database or local file mode so that the previous editing state can be loaded and restored after the game is restarted.
9. A system for editing a game interface in real time is characterized in that: the system comprises: the device comprises an editor module, a starting module, a loading module, a focusing editing module, a real-time updating module and a storage module;
the editor module is used for setting a game interface editor, and the game interface editor supports reading a project configuration file of a game client to obtain interface control configuration, picture resource configuration, font file configuration and game interface configuration of the game client;
the starting module loads a game client dynamic library and starts the game client;
the loading module loads the project configuration of the game client in the game running process, and acquires the current interface window of the game client;
the game interface editor selects an interface window for focusing editing;
the real-time updating module is used for enabling the corresponding client interfaces to be changed simultaneously when editing on the game interface editor so as to realize dynamic updating;
and the storage module is used for storing the game interface file at the interface position of the game client to realize the persistent storage of the editing operation.
10. The system for real-time editing of a game interface of claim 9, wherein: the editor module specifically comprises: setting a game interface editor, analyzing interface control configuration information to generate a control list, analyzing picture resource configuration information to generate a picture list, analyzing font file configuration information to generate a font list, and analyzing game interface configuration information to generate an interface list; because the configuration information is the Xml file, the Xml file is analyzed by a RapidXml method and is analyzed into a list directly corresponding to the interface editor;
providing a visual interface in a game interface editor, wherein the visual interface is used for adding and editing various elements on the game interface, generating a specific interface control by dragging from a control list to the visual interface, setting pictures and fonts through a picture list and a font list, acquiring all interface contents of a game client through the interface list, and performing secondary editing on the edited interface; the game interface editor also includes functions to drag, zoom, rotate interface elements, and adjust UI element hierarchical relationships.
11. The system for real-time editing of a game interface of claim 9, wherein: the starting module specifically comprises: loading a game client dynamic library and starting a game client; firstly, an executable file of a game client needs to be found and started, then a dynamic library file of the client is loaded through a dynamic library loader so that functions and data in the client can be synchronously used in a game interface editor, and the consistency of the functions and the data of the game client and the game interface editor can be ensured due to the fact that the same dynamic library file is used by the game client and the game interface editor.
12. The system for real-time editing of a game interface of claim 9, wherein: the loading module obtains the current interface window of the game client specifically as follows: the game interface editor finds the window handle of the game client by calling the function in the game client dynamic library, and obtains the interface window handle of the current game client so as to operate the interface window handle in the game interface editor and realize real-time monitoring editing operation: the game interface needs to monitor editing operation in real time and is realized through an event monitoring mechanism, and when the editing operation occurs, the game interface receives a corresponding event notification; the window handle of the found game client uses Windows API functions FindWindow or FindWindow Ex, and the functions search Windows with specific class names and window names in the running process and return the handle of the window; the function in the dynamic library of the game client is called: the addresses of the functions in the dynamic library are loaded and obtained using LoadLibrary and GetProcAddress functions.
13. The system for real-time editing of a game interface of claim 12, wherein: the event monitoring mechanism is used for processing user input, triggering and responding to game state change events; the method specifically comprises the following steps:
s31, defining event types: first, different types of events which can occur in a game need to be defined;
step S32, registering an event monitor: registering an event monitor in an event manager at a place where an event needs to be monitored, wherein the event manager is responsible for managing event monitors of different types and calling the corresponding monitor when the event is triggered; s33, realizing an event monitor: implementing a corresponding event listener for each event type, the event listener being a class that contains callback functions or methods to handle the event;
step S34, triggering an event: triggering corresponding events through an event manager when the events in the game occur;
step S35, responding to an event: when an event is triggered, the event manager can call a callback function or a callback method of the corresponding event monitor to monitor.
14. The system for real-time editing of a game interface of claim 9, wherein: the focusing editing module specifically comprises: providing a visual interface in a game interface editor, displaying all interface windows of a current game client, allowing a user to select one window for editing, selecting a specific control on the interface on the game client, positioning the specific control to the interface name according to the specific control, acquiring a handle of the specific interface window by the game interface editor through the interface name, editing the interface window in subsequent operation, and not editing other interfaces on the game interface editor.
15. The system for real-time editing of a game interface of claim 9, wherein: the real-time updating module specifically comprises: when editing is carried out in the game interface editor, the editing result is applied to the interface of the game client in real time, and as the same dynamic operation library is used, the operation of the same interface control can be ensured; when the game state changes, the corresponding interface elements need to be updated in real time, and when the interface control is edited, the information of the interface operation is obtained through the monitoring editing operation of the game client; when the editing operation occurs, the game interface receives a corresponding event notification to synchronously change the appearance and the behavior of the game client interface; through the event monitoring mechanism, the game client interface can acquire the change on the interface editor at the first time so as to carry out synchronous interface modification.
16. The system for real-time editing of a game interface of claim 9, wherein: the storage module specifically comprises: after editing in the game interface editor, the editing result needs to be saved in the project configuration file of the game client so as to restore the editing state when the game client is started next time, and the game interface editor needs to serialize the configuration information in the memory into a file and save the file on a disk; meanwhile, the saved result is notified to the game client so that the client can update the interface state of the game client, meanwhile, the data of the editing operation is stored in a lasting mode, and the data of the editing operation is saved by using a database or local file mode so that the previous editing state can be loaded and restored after the game is restarted.
CN202311491024.7A 2023-11-10 2023-11-10 Method and system for editing game interface in real time Pending CN117531204A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311491024.7A CN117531204A (en) 2023-11-10 2023-11-10 Method and system for editing game interface in real time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311491024.7A CN117531204A (en) 2023-11-10 2023-11-10 Method and system for editing game interface in real time

Publications (1)

Publication Number Publication Date
CN117531204A true CN117531204A (en) 2024-02-09

Family

ID=89783427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311491024.7A Pending CN117531204A (en) 2023-11-10 2023-11-10 Method and system for editing game interface in real time

Country Status (1)

Country Link
CN (1) CN117531204A (en)

Similar Documents

Publication Publication Date Title
TWI808393B (en) Page processing method, device, apparatus and storage medium
US11258842B2 (en) Systems and methods for notifying users of changes to files in cloud-based file-storage systems
US9037974B2 (en) Creating and editing dynamic graphics via a web interface
RU2406126C2 (en) Method and machine-readable medium for previewing and performing operations on e-mail attachments
US10747952B2 (en) Automatic creation and server push of multiple distinct drafts
US7430718B2 (en) Configurable interface for template completion
JP4393558B2 (en) How the computer system performs
US6158903A (en) Apparatus and method for allowing computer systems with different input/output devices to collaboratively edit data
US7979801B2 (en) Media presentation driven by meta-data events
US20060005163A1 (en) Reusable component in a collaboration workspace
US20020087950A1 (en) Capturing snapshots of a debuggee&#39;s state during a debug session
US10002035B2 (en) Visual selection and rendering of multiple clip board formats
JPH08509825A (en) Concurrent framework system
JP2007095090A (en) Method and device for menu item display
JPH08508596A (en) Runtime loader
US11481948B2 (en) Method, device and storage medium for generating animation group by synthesizing animation layers based on tree structure relation between behavior information and sub-behavior information
US8140999B2 (en) Display process device and display process method
US7168062B1 (en) Object-oriented software system allowing live modification of an application
US20120311538A1 (en) Capturing Rich Actionable Feedback on Working Software
JPH11191062A (en) Application image development support system
CN114461205A (en) Data visualization platform and component management method suitable for data visualization platform
CN117531204A (en) Method and system for editing game interface in real time
CN116820635A (en) Document block sharing method, device, system and storage medium
CN113407183A (en) Interface generation method, device, equipment and storage medium
JP2002278759A (en) Development system of remote control software

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