Progress bar loading method and system for loading multiple levels at one time

By monitoring the level loading progress and refreshing the progress bar, the game pause and high memory usage caused by traditional level loading methods are solved, and efficient level loading and user experience improvements are achieved in Unreal Engine UE4.

CN118892648APending Publication Date: 2024-11-05SICHUAN JIANSHAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310495856.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-05
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

Traditional level loading methods lead to game pauses, high memory usage, poor user experience, and Unreal Engine UE4 lacks an official progress bar solution, making it difficult for developers to achieve effective level loading progress prompts.

Method used

Provides a progress bar loading method and system for loading multiple levels at once. By monitoring the level loading progress, refreshing the progress bar, closing the loading interface in time, and using UE4's module loading mechanism and asynchronous tasks, smooth updates and polling of the progress bar are achieved.

Benefits of technology

Improve the efficiency and user experience of level loading, especially in UE projects that use the World Construct Level Organization Method, it effectively solves the level loading problem and provides a user-friendly loading progress prompt.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118892648A_ABST
    Figure CN118892648A_ABST
Patent Text Reader

Abstract

The invention provides a progress bar loading method and system for loading multiple levels at a time. The method comprises the steps that when a preset item starts to run, a display displays a loading interface of the preset item, the loading interface comprises a progress bar, and the preset item comprises a plurality of levels; monitoring the loading progress of the predetermined item; refreshing the progress of the displayed progress bar according to the loading progress of the predetermined item; when the predetermined item is loaded, monitoring whether the progress of the progress bar is refreshed or not; and when the progress of the progress bar is refreshed, closing the loading interface of the predetermined item. Therefore, a plurality of checkpoints can be loaded at one time, and the loading efficiency and the user experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of computer technology, and more specifically, relates to a progress bar loading method and system for loading multiple levels at one time, an electronic device, and a computer-readable storage medium. Background Art

[0002] Traditional level loading solutions are usually implemented by loading a single level. When loading a level, the game will pause until the level is fully loaded into memory. Although this method is simple, it has some problems. For example, for large levels in large games, this method takes a lot of time to load the level, resulting in long waiting times and poor user experience. When loading a single level, the game will pause until the level is fully loaded into memory. During this process, the game will freeze, affecting the user experience. When the level is loaded into memory, it will take up a lot of memory space, resulting in excessive game memory usage and affecting game performance. To solve these problems, Unreal Engine UE4 introduced WorldComposition technology. World Composition is a technology for processing large levels that breaks down large levels into multiple small levels and loads and unloads them separately to improve game performance and user experience.

[0003] However, when using World Composition technology, level loading is still a time-consuming process, so an effective progress bar solution is needed to prompt users of the progress of level loading. However, there is no official progress bar solution in UE4, which makes it difficult for developers to solve this problem. Some developers try to use some third-party progress bar components, but because UE4 does not allow non-game threads to operate the UI interface, this method is not feasible. Other developers try to use the progress bar component that comes with UE4, but because there is no official documentation and examples, they encounter difficulties in implementation. Summary of the invention

[0004] The present disclosure provides a progress bar loading method and system, an electronic device, and a computer-readable storage medium for loading multiple levels at one time, so as to at least solve the problems in the above-mentioned related technologies, or may not solve any of the above-mentioned problems.

[0005] According to a first aspect of an embodiment of the present disclosure, a method for loading a progress bar is provided, and the method may include: when a scheduled project starts to run, causing a display to display a loading interface of the scheduled project, wherein the loading interface includes a progress bar, and the scheduled project includes multiple levels; monitoring the loading progress of the scheduled project; refreshing the progress of the displayed progress bar according to the loading progress of the scheduled project; when the loading of the scheduled project is completed, monitoring whether the progress of the progress bar has been refreshed; when the progress of the progress bar has been refreshed, closing the loading interface of the scheduled project.

[0006] Optionally, monitoring the loading progress of the scheduled project may include: monitoring the total number of levels and the number of stream levels of the scheduled project; determining the loading progress of the scheduled project based on the total number of levels and the number of stream levels, wherein the number of stream levels may be the number of levels that have been loaded for the scheduled project.

[0007] Optionally, refreshing the progress of the displayed progress bar according to the loading progress of the predetermined item may include: when the number of flow levels changes from a first number to a second number, changing the progress of the displayed progress bar from a first progress to a second progress.

[0008] Optionally, when the number of flow levels changes from the first number to the second number, changing the progress of the displayed progress bar from the first progress to the second progress may include: changing the progress of the displayed progress bar from the first progress to the second progress by accumulating the first progress by a preset progress at a preset time interval, wherein the preset progress may be a value obtained by dividing the difference between the first progress and the second progress by a preset parameter, and the preset parameter is greater than 1.

[0009] Optionally, when the predetermined item is loaded, monitoring whether the progress of the progress bar has been refreshed may include: starting a thread for polling the refresh status of the progress bar to monitor whether the progress of the progress bar has been refreshed.

[0010] Optionally, the predetermined project may be an Unreal Engine UE project.

[0011] Optionally, when the progress of the progress bar has been refreshed, closing the loading interface of the predetermined project may include: starting an asynchronous task of the UE and setting the execution thread of the asynchronous task as the main thread; when the execution time of the asynchronous task reaches the time slice of the main thread, executing the asynchronous task to close the loading interface.

[0012] Optionally, the UE project may be a UE project that uses a world composer level organization method and a game mode.

[0013] According to a second aspect of an embodiment of the present disclosure, a system for loading a progress bar is provided, and the system may include: an interface display module, configured to cause a display to display a loading interface of a predetermined project when the predetermined project starts to run, wherein the loading interface may include a progress bar, and the predetermined project includes multiple levels; a project monitoring module, configured to monitor the loading progress of the predetermined project; a progress bar refresh module, configured to refresh the progress of the displayed progress bar according to the loading progress of the predetermined project; a progress bar monitoring module, configured to monitor whether the progress of the progress bar has been refreshed when the loading of the predetermined project is complete; and an interface closing module, configured to close the loading interface of the predetermined project when the progress of the progress bar has been refreshed.

[0014] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, which may include: at least one processor; at least one memory storing computer-executable instructions, wherein the computer-executable instructions, when executed by at least one of the processors, prompt at least one of the processors to execute the method of loading a progress bar.

[0015] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium storing instructions is provided, wherein when the instructions are executed by at least one processor, the at least one processor is prompted to execute the method of loading a progress bar.

[0016] According to the embodiments of the present disclosure, by monitoring the loading progress of a predetermined project, refreshing the progress of the displayed progress bar according to the loading progress of the predetermined project, and monitoring whether the progress of the progress bar has been refreshed when the loading of the predetermined project is completed, and closing the loading interface of the predetermined project when the progress of the progress bar has been refreshed, multiple levels can be loaded at one time, thereby improving loading efficiency and user experience. In particular, for UE projects that use the world composer level organization method and use game mode, it can well solve the level loading problem in UE development.

[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a flowchart illustrating a progress bar loading method for loading multiple levels at one time according to an exemplary embodiment of the present disclosure;

[0019] Figure 2 is a schematic block diagram showing a progress bar loading system for loading multiple levels at one time according to an exemplary embodiment of the present disclosure; and

[0020] Figure 3is a schematic block diagram illustrating an electronic device according to an example embodiment of the present disclosure. DETAILED DESCRIPTION

[0021] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation methods described in the following examples do not represent all implementation methods consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims.

[0023] It should be noted that “at least one of the several items” appearing in the present disclosure refers to three types of parallel situations: “any one of the several items”, “a combination of any multiple of the several items”, and “all of the several items”. For example, “including at least one of A and B” includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is “executing at least one of step one and step two”, which means the following three parallel situations: (1) executing step one; (2) executing step two; (3) executing step one and step two. “A and / or B” and “A and / or B” appearing in the present disclosure refer to the following three parallel situations: only A; only B; both A and B.

[0024] Figure 1 Detailed description is a flowchart illustrating a progress bar loading method for loading multiple levels at one time according to an exemplary embodiment of the present disclosure.

[0025] In step 110, it can be determined whether the predetermined project has started running. Here, the predetermined project can be a UE project (such as UE4, UE5, UE5+ project), or a UE project that uses a world composer level organization method and a game mode.

[0026] When the scheduled project starts running ("Yes" in step 110), in step 120, the display may display the loading interface of the scheduled project, wherein the loading interface includes a progress bar, and the scheduled project includes multiple levels. As an example only, in the case where the scheduled project is a UE4 project that uses the world composer level organization method and the game mode, opening the loading interface utilizes the Module loading mechanism of UE4. When the UE4 project starts running, the StartupModule function of the module is called, in which the function callbacks PreLoadMap (called when the level is preloaded) and LevelAddedToWorld (called whenever a level is loaded) are registered. The PreLoadMap function can be used to create a loading interface and open a progress bar.

[0027] Here, the progress bar can be in various forms, for example, a horizontal progress bar, a circular progress bar, a progress bar with text, or a progress bar with animation. The horizontal progress bar is one of the most common forms of progress bars, which is usually displayed during the loading of the project and displays the percentage of the loading progress of the project. The circular progress bar can display the loading progress as a circle, and the loading progress changes as the circle is filled. The progress bar with text can combine the loading progress percentage with a paragraph of text to allow players to better understand the loading progress. The progress bar with animation can add some animation effects when loading to increase the fun of the game.

[0028] When loading a project, you can also add some backgrounds. For example, you can use static images as loading backgrounds, such as project covers or scene images in the project. You can use sequence frames during loading to make a set of static background images into sequence frames, and then play the sequence frames in a loop at certain time intervals during the loading process. For example, you can use a dynamic background as a loading background, such as a looping video or a dynamic scene. In addition, you can use UE's real-time rendering function to make a dynamic background, such as a simple animation or scene, and display the scene as the background during the loading process. For example, you can add some elements that interact with the user, such as buttons or simple mini-games, so that users have something to do while waiting for loading. During the loading process, use the UI interface function provided by UE to design a UI interface with a progress bar, text, and animation, and display it as the background.

[0029] After the loading interface is displayed, the loading progress of the predetermined project may be monitored in step 130. According to an exemplary embodiment of the present disclosure, the total number of levels and the number of stream levels of the predetermined project may be monitored, and the loading progress of the predetermined project may be determined based on the total number of levels and the number of stream levels. The number of stream levels may be the number of levels that have been loaded for the predetermined project.

[0030] In step 140, the progress of the displayed progress bar may be refreshed according to the loading progress of the predetermined project. According to an exemplary embodiment of the present disclosure, when the number of stream levels changes from the first number to the second number, the progress of the displayed progress bar may be changed from the first progress to the second progress. Specifically, the progress of the displayed progress bar may be changed from the first progress to the second progress by accumulating the first progress by the preset progress at a preset time interval. The preset progress may be a value obtained by dividing the difference between the first progress and the second progress by a preset parameter, and the preset parameter may be greater than 1. As an example only, in the case where the predetermined project is a UE4 project that uses a world composer level organization method and a game mode, the progress bar may use a lerp function, whereby the progress bar moves smoothly according to the interpolation method for each frame. The LevelAddedToWorld callback may be used to update the value to the progress bar whenever a level is loaded, and smoothly update the progress bar refresh position.

[0031] In step 150, it can be determined whether the predetermined item has been loaded. If the predetermined item has not been loaded ("No" in step 150), the process returns to step 130 to continue monitoring the loading progress.

[0032] When the loading of the predetermined project is completed ("Yes" in step 150), in step 160, it is possible to monitor whether the progress of the progress bar has been refreshed. When it is found that the level loaded at this time is the last level, a thread is started to monitor whether the progress bar has been refreshed to 100%, and the thread will continuously poll the status of the progress bar. According to an exemplary embodiment of the present disclosure, a thread for polling the refresh status of the progress bar can be started to monitor whether the progress of the progress bar has been refreshed. When the progress of the progress bar has been refreshed ("Yes" in step 160), in step 170, the loading interface of the predetermined project can be closed. Just as an example, in the case where the predetermined project is an Unreal Engine UE project, the asynchronous task of the UE (for example, TaskGraph) can be started, and the execution thread of the asynchronous task can be set as the main thread. When the execution time of the asynchronous task reaches the time slice of the main thread, the asynchronous task is executed to close the loading interface. In this way, the loading progress can be displayed in the UE project. When the UE project starts to load the level, the loading interface is displayed to cover up the long resource loading process.

[0033] Figure 2 is a schematic block diagram showing a progress bar loading system 200 for loading multiple levels at one time according to an exemplary embodiment of the present disclosure.

[0034] The system 200 may include an interface display module 210, an item monitoring module 120, a progress bar refresh module 230, a progress bar monitoring module 240, and an interface closing module 250. The system 200 may be installed in various electronic devices to load the progress bars of multiple levels at one time, or various modules in the system 200 may implement corresponding functions in a separate manner, or the system 200 may be distributed on the Internet or in the cloud for use by users.

[0035] According to an example embodiment of the present disclosure, the interface display module 210 may be configured to cause the display to display a loading interface of the predetermined project when the predetermined project starts to run, wherein the loading interface includes a progress bar, and the predetermined project includes multiple levels. The project monitoring module 220 may be configured to monitor the loading progress of the predetermined project. The progress bar refresh module 230 may be configured to refresh the progress of the displayed progress bar according to the loading progress of the predetermined project. The progress bar monitoring module 240 may be configured to monitor whether the progress of the progress bar has been refreshed when the loading of the predetermined project is completed. The interface closing module 250 may be configured to close the loading interface of the predetermined project when the progress of the progress bar has been refreshed.

[0036] According to an example embodiment of the present disclosure, the project monitoring module 220 may be configured to monitor the total number of levels and the number of stream levels of the predetermined project; based on the total number of levels and the number of stream levels, determine the loading progress of the predetermined project, wherein the number of stream levels is the number of levels that have been loaded for the predetermined project.

[0037] According to an exemplary embodiment of the present disclosure, the progress bar refresh module 230 may be configured to change the progress of the displayed progress bar from a first progress to a second progress when the number of flow levels changes from a first number to a second number.

[0038] According to an example embodiment of the present disclosure, the progress bar refresh module 230 may be configured to change the progress of the displayed progress bar from a first progress to a second progress by accumulating the first progress by a preset progress at a preset time interval, wherein the preset progress may be a value obtained by dividing the difference between the first progress and the second progress by a preset parameter, and the preset parameter is greater than 1.

[0039] According to an exemplary embodiment of the present disclosure, the progress bar monitoring module 240 may be configured to start a thread for polling the refresh status of the progress bar to monitor whether the progress of the progress bar has been refreshed.

[0040] According to an exemplary embodiment of the present disclosure, the predetermined project may be an Unreal Engine UE project.

[0041] According to an example embodiment of the present disclosure, the interface closing module 250 can be configured to start an asynchronous task of the UE and set the execution thread of the asynchronous task as the main thread; when the execution time of the asynchronous task reaches the time slice of the main thread, the asynchronous task is executed to close the loading interface.

[0042] According to an exemplary embodiment of the present disclosure, the UE project may be a UE project that uses a world composer level organization method and a game mode.

[0043] Various modules according to example embodiments of the present disclosure may be integrated into a single module that performs its functions, or at least one of the various modules may be divided into a plurality of smaller modules.

[0044] Figure 3 is a schematic block diagram illustrating an electronic device 300 according to an example embodiment of the present disclosure.

[0045] According to an exemplary embodiment of the present disclosure, an electronic device 300 may also be provided, and the electronic device 300 may include a processor 310 and a memory 320 storing computer executable instructions. When the computer executable instructions are executed by the processor 310, the processor 310 is prompted to perform the method of loading a progress bar according to the exemplary embodiment of the present disclosure.

[0046] According to an embodiment of the present disclosure, a computer-readable storage medium storing instructions may also be provided, wherein when the instructions are executed by at least one processor, the at least one processor is prompted to perform a method according to an exemplary embodiment of the present disclosure. Examples of computer-readable storage media here include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device is configured to store computer programs and any associated data, data files and data structures in a non-transitory manner and provide the computer programs and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system, so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.

[0047] According to an embodiment of the present disclosure, a computer program product may also be provided. Instructions in the computer program product may be executed by at least one processor in an electronic device to perform the method according to the exemplary embodiment of the present disclosure.

[0048] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0049] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the claims.

Claims

1. The method of loading the progress bar includes: When the scheduled project starts to run, the display displays a loading interface of the scheduled project, wherein the loading interface includes a progress bar, and the scheduled project includes multiple levels; Monitor the loading progress of the scheduled item; Refresh the progress of the displayed progress bar according to the loading progress of the predetermined item; When the predetermined item is loaded, monitoring whether the progress of the progress bar has been refreshed; When the progress of the progress bar has been refreshed, the loading interface of the predetermined item is closed.

2. The method of claim 1, wherein: The monitoring the loading progress of the predetermined item includes: Monitor the total number of levels and the number of flow levels of the levels of the predetermined project; Determine the loading progress of the predetermined item based on the total number of levels and the number of stream levels, The number of stream levels is the number of levels that have been loaded for the predetermined project.

3. The method of claim 2, wherein: The refreshing of the progress of the displayed progress bar according to the loading progress of the predetermined item includes: When the number of the stream levels changes from the first number to the second number, the progress of the displayed progress bar is changed from the first progress to the second progress.

4. The method of claim 3, wherein: When the number of the flow levels changes from the first number to the second number, changing the progress of the displayed progress bar from the first progress to the second progress, comprises: The progress of the displayed progress bar is changed from the first progress to the second progress by accumulating the preset progress at a preset time interval. The preset progress is a value obtained by dividing the difference between the first progress and the second progress by a preset parameter, and the preset parameter is greater than 1.

5. The method of claim 1, wherein: When the predetermined item is loaded, monitoring whether the progress of the progress bar has been refreshed includes: A thread for polling the refresh status of the progress bar is started to monitor whether the progress of the progress bar has been refreshed.

6. The method of claim 1, wherein: The predetermined project is an Unreal Engine UE project.

7. The method of claim 6, wherein: When the progress of the progress bar has been refreshed, closing the loading interface of the predetermined item includes: Start the asynchronous task of the UE and set the execution thread of the asynchronous task as the main thread; When the execution time of the asynchronous task reaches the time slice of the main thread, the asynchronous task is executed to close the loading interface.

8. The method of claim 6, wherein: The UE project is a UE project that uses the world composer level organization method and the game mode.

9. The system for loading progress bar includes: An interface display module is configured to enable a display to display a loading interface of a predetermined project when the predetermined project starts to run, wherein the loading interface includes a progress bar; A project monitoring module, configured to monitor the loading progress of the predetermined project; A progress bar refresh module, configured to refresh the progress of the displayed progress bar according to the loading progress of the predetermined item; A progress bar monitoring module is configured to monitor whether the progress of the progress bar has been refreshed when the predetermined item has been loaded; The interface closing module is configured to close the loading interface of the predetermined item when the progress of the progress bar has been refreshed.

10. Electronic equipment, including: at least one processor; at least one memory storing computer executable instructions, Wherein, when the computer executable instructions are executed by at least one of the processors, the at least one processor is prompted to perform the method as claimed in any one of claims 1 to 8.

11. A computer-readable storage medium storing instructions, characterized in that: When the instructions are executed by at least one processor, the at least one processor is prompted to perform the method according to any one of claims 1 to 8.