Game space rendering method and device, electronic equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-21
- Publication Date
- 2026-08-11
AI Technical Summary
[0002]现有的游戏中只存在单方向的传送,即传送门只能单向的进或出,若游戏角色从传送门中走出,游戏视角只存在于传送门外部,若游戏角色从外部进入传送门,游戏角色进入传送门前观察到的传送门内的场景往往是由静态的图像生成的,与游戏角色进入传送门所处的游戏场景不一致,使得玩家的角色代入感不强,体验较差
[0034]Compared to existing technologies, the game space rendering method provided in this invention first responds to the player's input of a portal generation command and draws a portal within the game space. Then, based on the vertex coordinate range of the portal, objects in the first and second game worlds are marked, wherein the game character is teleported from the first game world to the second game world through the portal. Next, based on the marked objects in the first game world, the game space is rendered to display the scene of the first game world outside the portal; similarly, based on the marked objects in the second game world, the game space is rendered to display the scene of the second game world inside the portal. Because this invention marks objects in the first and second game worlds using the vertex coordinate range of the portal, and renders the game space based on these marks, the actual scene of the first game world is displayed outside the portal, while the scene of the second game world is displayed inside. This avoids discrepancies between the scene observed by the game character before entering the portal and the actual game scene upon entering, thereby enhancing the player's immersion and improving the player experience.
Smart Images

Figure CN115970277B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a game space rendering method, apparatus, electronic device, and storage medium. Background Technology
[0002] In existing games, teleportation only exists in one direction, meaning that the portal can only be used to enter or exit in one direction. If the game character walks out of the portal, the game's perspective is only outside the portal. If the game character enters the portal from the outside, the scene inside the portal that the game character observes before entering is often generated by static images, which is inconsistent with the game scene where the game character is when entering the portal. This makes the player's sense of immersion weak and the experience poor. Summary of the Invention
[0003] This invention provides a game space rendering method, apparatus, electronic device, and storage medium, which can enhance the player's sense of immersion and improve the player experience.
[0004] The technical solution of this invention can be implemented as follows:
[0005] In a first aspect, embodiments of the present invention provide a game space rendering method, the method comprising:
[0006] Responding to the player's input command to generate a portal, draw a portal within the game space;
[0007] Based on the vertex coordinate range of the portal, objects in the first game world and the second game world are marked, wherein game characters are teleported from the first game world to the second game world through the portal;
[0008] The game space is rendered based on the markings of objects within the first game world, so as to display the scene of the first game world outside the portal;
[0009] The game space is rendered based on the markings of objects within the second game world to display scenes from the second game world within the portal.
[0010] Optionally, the step of marking objects in the first and second game worlds based on the vertex coordinate range of the portal includes:
[0011] For each object in the first game world, if the object can be captured by the camera and the vertex coordinate range of the bounding box of the object does not coincide with the vertex coordinate range of the portal, then the object is marked as the first object.
[0012] If the object can be captured by the camera and the vertex coordinate range of the bounding box of the object coincides with the vertex coordinate range of the portal, then the object is marked as the second object;
[0013] For each object in the second game world, if the object can be captured by the camera and the vertex coordinate range of the bounding box of the object coincides with the vertex coordinate range of the portal, then the object is marked as a third object.
[0014] If the object can be captured by the camera and the vertex coordinate range of the object's bounding box does not coincide with the vertex coordinate range of the portal, then the object is marked as the fourth object.
[0015] Optionally, the first game world has multiple ordered rendering layers, and the step of rendering the game space based on the markings of objects in the first game world includes:
[0016] In the game space, the camera sequentially renders the first object in each rendering layer.
[0017] Optionally, the second game world has multiple ordered rendering layers, and the step of rendering the game space based on the markings of objects within the second game world includes:
[0018] In the game space, the third object in each rendering layer is rendered sequentially through the camera's extended interface.
[0019] Optionally, the method further includes:
[0020] When the game character is teleported from the first game world to the second game world through the portal, the game space is rendered according to the markings of objects in the first game world, so as to display the scene of the first game world through the portal;
[0021] The game space is rendered based on the markings of objects within the second game world to display the scene of the second game world in which the game character is located.
[0022] Optionally, the step of rendering the game space based on the markers of objects within the first game world includes:
[0023] A second object within the first game world is rendered in the game space via an extended interface of the camera, wherein the second object can be captured by the camera, and the vertex coordinate range of the bounding box of the second object coincides with the vertex coordinate range of the portal.
[0024] Optionally, the step of rendering the game space based on the markers of objects within the second game world includes:
[0025] A fourth object within the second game world is rendered in the game space using a camera, wherein the fourth object can be captured by the camera, and the vertex coordinate range of the bounding box of the fourth object does not coincide with the vertex coordinate range of the portal.
[0026] In a second aspect, the present invention provides a game space rendering device, the device comprising:
[0027] The drawing module is used to respond to the portal generation command input by the player and draw the portal within the game space;
[0028] A marking module is used to mark objects in the first game world and the second game world according to the vertex coordinate range of the portal, wherein game characters are teleported from the first game world to the second game world through the portal;
[0029] The rendering module is used for:
[0030] The game space is rendered based on the markings of objects within the first game world, so as to display the scene of the first game world outside the portal;
[0031] The game space is rendered based on the markings of objects within the second game world to display scenes from the second game world within the portal.
[0032] Thirdly, the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements the game space rendering method as described in the first aspect above.
[0033] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the game space rendering method described in the first aspect above.
[0034] Compared to existing technologies, the game space rendering method provided in this invention first responds to the player's input of a portal generation command and draws a portal within the game space. Then, based on the vertex coordinate range of the portal, objects in the first and second game worlds are marked, wherein the game character is teleported from the first game world to the second game world through the portal. Next, based on the marked objects in the first game world, the game space is rendered to display the scene of the first game world outside the portal; similarly, based on the marked objects in the second game world, the game space is rendered to display the scene of the second game world inside the portal. Because this invention marks objects in the first and second game worlds using the vertex coordinate range of the portal, and renders the game space based on these marks, the actual scene of the first game world is displayed outside the portal, while the scene of the second game world is displayed inside. This avoids discrepancies between the scene observed by the game character before entering the portal and the actual game scene upon entering, thereby enhancing the player's immersion and improving the player experience. Attached Figure Description
[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 A flowchart illustrating a game space rendering method provided in an embodiment of the present invention;
[0037] Figure 2 A schematic diagram of a game space rendering effect provided in an embodiment of the present invention. Figure 1 ;
[0038] Figure 3 A schematic diagram of a game space rendering effect provided in an embodiment of the present invention. Figure 2 ;
[0039] Figure 4 A functional unit block diagram of a game space rendering device provided in an embodiment of the present invention;
[0040] Figure 5 This is a schematic block diagram of an electronic device provided in an embodiment of the present invention.
[0041] Icons: 100 - Game space rendering device; 101 - Drawing module; 102 - Marking module; 103 - Rendering module; 200 - Electronic device; 210 - Memory; 220 - Processor. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0043] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0044] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0045] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0046] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.
[0047] To ensure that the scene inside the portal observed by the game character before entering the portal is consistent with the game scene where the character enters the portal, thereby enhancing the player's sense of immersion and improving the player experience, this invention provides a game space rendering method, which will be described in detail below.
[0048] Please refer to Figure 1 The game space rendering method includes steps S101 to S104.
[0049] S101 responds to the portal generation command input by the player and draws a portal in the game space.
[0050] The portal generation command can be generated and transmitted to the game server when the player clicks or touches the relevant controls on the graphical display interface of the game client.
[0051] As one possible implementation, portals can be drawn in game space using the stencil technique in shaders. From the player's perspective, the portals can appear out of thin air and gradually expand from nothing. The effect of the portals changing size can be achieved through vertex animation using the 3D graphics software Blender. The relevant process is as follows:
[0052] Step 1: Disable color output;
[0053] Step 2: Configure the template for testing to achieve the effect of cutting out the portal;
[0054] The template value of the portal is greater than the system default template value to ensure that the test passes, and then the shape of the portal is rendered, that is, a transparent area of a certain size is cut out on the game scene displayed in the current game space.
[0055] Step 3: Use Blender to create vertex animations of the portal scaling. As the animation plays, the portal can appear from nothing, grow from small to large, or disappear from large to small and from existence to nothing.
[0056] The relevant code example is as follows:
[0057]
[0058] S102, mark objects in the first and second game worlds based on the vertex coordinate range of the portal.
[0059] In this game, characters are transported from the first game world to the second game world through a portal.
[0060] Understandably, the game space displays the scene of the first game world before and during the creation of the portal.
[0061] As one possible implementation, step S102 may include sub-steps S102-1 to S102-4.
[0062] S102-1, For each object in the first game world, if the object can be captured by the camera and the vertex coordinate range of the object's bounding box does not coincide with the vertex coordinate range of the portal, then mark the object as the first object.
[0063] In this process, before a game character enters the portal, the object marked as the first object in the first game world needs to be rendered in the game space.
[0064] S102-2, for each object in the first game world, if the object can be captured by the camera and the vertex coordinate range of the object's bounding box coincides with the vertex coordinate range of the portal, then mark the object as the second object.
[0065] Specifically, when a game character enters a portal, the object marked as the second object in the first game world needs to be rendered in the game space.
[0066] Understandably, objects not captured by the camera within the first game world are invisible to the player, and therefore, there is no need to mark these objects.
[0067] S102-3: For each object in the second game world, if the object can be captured by the camera and the vertex coordinate range of the object's bounding box coincides with the vertex coordinate range of the portal, then the object is marked as a third object.
[0068] In this process, before the game character enters the portal, objects marked as third objects in the second game world need to be rendered in the game space.
[0069] S102-4: For each object in the second game world, if the object can be captured by the camera and the vertex coordinate range of the object's bounding box does not coincide with the vertex coordinate range of the portal, then the object is marked as the fourth object.
[0070] When a game character enters a portal, the object marked as the fourth object in the second game world needs to be rendered in the game space.
[0071] Understandably, objects not captured by the camera in the second game world are also invisible to the player, so there is no need to mark these objects.
[0072] It should be noted that the processes of steps S102-1 to S102-2 and steps S102-3 to S102-4 can be executed in parallel.
[0073] S103 renders the game space based on the markers of objects within the first game world to display the scene of the first game world outside the portal.
[0074] The first game world consists of multiple ordered rendering layers, with objects in different rendering layers corresponding to different rendering orders.
[0075] In this embodiment of the invention, step S103 is implemented as follows:
[0076] In the game space, the camera sequentially renders the first object in each rendering layer.
[0077] For example, suppose the first game world has 3 rendering layers, which are rendered layer A1, rendered layer A2 and rendered layer A3 in the rendering order. Among them, objects a2 and a5 in rendered layer A1 are marked as the first object, objects a1, a4 and a13 in rendered layer A2 are marked as the first object, and objects a3 and a6 in rendered layer A3 are marked as the first object.
[0078] CameraA renders objects a2 and a5 in rendering layer A1, then renders objects a1, a4, and a13 in rendering layer A2, and finally renders objects a3 and a6 in rendering layer A3.
[0079] S104: Render the game space based on the markers of objects within the second game world to display the scene of the second game world within the portal.
[0080] The second game world consists of multiple ordered rendering layers, with objects in different layers corresponding to different rendering orders.
[0081] In this embodiment of the invention, step S104 can be implemented as follows:
[0082] In the game space, the third object in each rendering layer is rendered sequentially through the camera's extended interface.
[0083] For example, suppose the second game world has four rendering layers, which are rendered in the following order: rendering layer B1, rendering layer B2, rendering layer B3 and rendering layer B4. Among them, objects b7 and b9 in rendering layer B1 are marked as third objects, objects b5 and b6 in rendering layer B2 are marked as third objects, objects b1, b2, b4 and b10 in rendering layer B3 are marked as third objects, and objects b3 and b17 in rendering layer B4 are marked as third objects.
[0084] The extended interface RenderFeatureB of CameraA renders objects b7 and b9 in rendering layer B1, then renders objects b5 and b6 in rendering layer B2, followed by objects b1, b2, b4, and b10 in rendering layer B3, and finally objects b3 and b17 in rendering layer B4. The implementation process can be as follows:
[0085] The object marked as a third object is input into a custom target rendering texture RF_Tex. The vertex coordinates of the portal's mesh are transformed into matrix coordinates in the vertex shader to calculate the unnormalized clipping coordinates posNDC, which are then passed to the fragment shader. In the fragment shader, posNDC is normalized to obtain the coordinates of the portal on the game client's graphical display interface, and then RF_Tex is sampled.
[0086] Since RenderFeatureB is an extension interface of CameraA, its viewpoint and position are always the same as CameraA. Therefore, when viewing the portal from any angle, the portal will also present the scene of the second game world from the corresponding angle.
[0087] like Figure 2 As shown, after completing the above steps S101 to S104, the scene of the first game world is displayed outside the portal, and the scene of the second game world is displayed inside the portal.
[0088] When a game character is teleported from the first game world to the second game world through a portal, i.e., when the game character enters the portal, the game space rendering method also includes steps S105 to S106.
[0089] S105, Render the game space according to the markings of objects in the first game world, so as to display the scene of the first game world through the portal.
[0090] In this embodiment of the invention, step S105 can be implemented as follows:
[0091] Render a second object within the first game world in the game space using the camera's extended interface.
[0092] The second object can be captured by the camera, and the vertex coordinate range of the bounding box of the second object coincides with the vertex coordinate range of the portal.
[0093] For example, suppose the first game world has 3 rendering layers, which are rendered layer A1, rendered layer A2 and rendered layer A3 in the rendering order. Among them, object a12 in rendered layer A1 is marked as the second object, objects a7 and a8 in rendered layer A2 are marked as the second object, and objects a9 and a11 in rendered layer A3 are marked as the second object.
[0094] The extended interface RenderFeatureB of CameraA renders object a12 in rendering layer A1, then renders objects a7 and a8 in rendering layer A2, and finally renders objects a9 and a11 in rendering layer A3.
[0095] S106, Render the game space according to the markings of objects in the second game world to display the scene of the second game world in which the game character is located.
[0096] In this embodiment of the invention, step S106 can be implemented as follows:
[0097] Render a fourth object within the second game world using a camera in the game space.
[0098] The fourth object can be captured by the camera, and the vertex coordinate range of the bounding box of the fourth object does not coincide with the vertex coordinate range of the portal.
[0099] For example, suppose the second game world has 4 rendering layers, which are rendered layer B1, B2, B3 and B4 in the rendering order. Among them, object b8 in rendering layer B1 is marked as the third object, objects b11, b12 and b20 in rendering layer B2 are marked as the third object, objects b14 and b16 in rendering layer B3 are marked as the third object, and object b13 in rendering layer B4 is marked as the third object.
[0100] Camera A renders object b89 in rendering layer B1, then renders objects b11, b12, and b20 in rendering layer B2, then renders objects b11, b12, and b20 in rendering layer B3, and finally renders object b13 in rendering layer B4.
[0101] like Figure 3 As shown, after completing the above steps S105 to S106, when the game character looks out from inside the portal, he can observe the scene of the first game world, and the scene of the second game world displayed inside the portal is the same as the scene observed by the game character before entering the portal.
[0102] Compared with the prior art, the beneficial effects of the embodiments of the present invention include:
[0103] (1) Mark the objects in the first game world and the second game world by the vertex coordinate range of the portal, and render the game space according to the marking of the objects in the first game world and the second game world, so that the actual scene of the first game is displayed outside the portal and the scene of the second game world is displayed inside the portal, thereby avoiding the situation that the scene inside the portal observed by the game character before entering the portal is inconsistent with the game scene where the game character enters the portal, thereby enhancing the player's sense of role immersion and improving the player experience.
[0104] (2) By using the camera and its expansion interface, the scene changes of the first game world outside the portal and the second game world inside the portal are synchronized, avoiding screen flickering and avoiding additional device performance overhead.
[0105] In order to perform the corresponding steps in the above method embodiments and various possible implementations, an implementation of the game space rendering device 100 is given below.
[0106] Please refer to Figure 4The game space rendering device 100 includes a drawing module 101, a marking module 102, and a rendering module 103.
[0107] The drawing module 101 is used to draw a portal in the game space in response to the portal generation command input by the player.
[0108] The marking module 102 is used to mark objects in the first game world and the second game world according to the vertex coordinate range of the portal, wherein the game character is teleported from the first game world to the second game world through the portal.
[0109] The rendering module 103 is used to render the game space based on the markings of objects in the first game world, so as to display the scene of the first game world outside the portal; and to render the game space based on the markings of objects in the second game world, so as to display the scene of the second game world inside the portal.
[0110] Optionally, the marking module 102 is specifically used for each object in the first game world: if the object can be captured by the camera and the vertex coordinate range of the object's bounding box does not coincide with the vertex coordinate range of the portal, then the object is marked as a first object; if the object can be captured by the camera and the vertex coordinate range of the object's bounding box coincides with the vertex coordinate range of the portal, then the object is marked as a second object; for each object in the second game world: if the object can be captured by the camera and the vertex coordinate range of the object's bounding box coincides with the vertex coordinate range of the portal, then the object is marked as a third object; if the object can be captured by the camera and the vertex coordinate range of the object's bounding box does not coincide with the vertex coordinate range of the portal, then the object is marked as a fourth object.
[0111] Optionally, the first game world has multiple ordered rendering layers, and the rendering module 103 is specifically used to render the first object in each rendering layer sequentially through the camera in the game space.
[0112] Optionally, the second game world has multiple ordered rendering layers, and the rendering module 103 is also specifically used to render the third object in each rendering layer sequentially through the camera's extended interface in the game space.
[0113] Optionally, the rendering module 103 is also used to render the game space according to the markings of objects in the first game world when the game character is teleported from the first game world to the second game world through the portal, so as to display the scene of the first game world through the portal; and to render the game space according to the markings of objects in the second game world, so as to display the scene of the second game world in which the game character is located.
[0114] Optionally, the rendering module 103 is also specifically used to render a second object within the first game world in the game space via a camera, wherein the second object can be captured by the camera, and the vertex coordinate range of the bounding box of the second object coincides with the vertex coordinate range of the portal.
[0115] Optionally, the rendering module 103 is also specifically used to render a fourth object in the second game world in the game space through the camera's extended interface, wherein the fourth object can be captured by the camera, and the vertex coordinate range of the bounding box of the fourth object does not coincide with the vertex coordinate range of the portal.
[0116] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the game space rendering device 100 described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0117] Furthermore, this embodiment of the invention also provides an electronic device 200, please refer to... Figure 5 Electronic device 200 may include memory 210 and processor 220.
[0118] The processor 220 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of a program for the game space rendering method provided in the above method embodiments.
[0119] The memory 210 may be a ROM or other type of static storage device capable of storing static information and instructions, RAM or other type of dynamic storage device capable of storing information and instructions, or an electrically erasable programmable-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 210 may exist independently and be connected to the processor 220 via a communication bus. The memory 210 may also be integrated with the processor 220. The memory 210 is used to store machine-executable instructions for executing the scheme of this application. The processor 220 is used to execute the machine-executable instructions stored in the memory 210 to implement the above-described method embodiments.
[0120] This invention also provides a computer-readable storage medium containing a computer program, which, when executed, can be used to perform related operations in the game space rendering method provided in the above-described method embodiments.
[0121] In summary, the game space rendering method, apparatus, electronic device, and storage medium provided in this invention first respond to a player's input command to generate a portal and draw a portal within the game space. Then, based on the vertex coordinate range of the portal, objects in the first and second game worlds are marked, wherein a game character is teleported from the first game world to the second game world through the portal. Next, based on the marked objects in the first game world, the game space is rendered to display the scene of the first game world outside the portal; similarly, based on the marked objects in the second game world, the game space is rendered to display the scene of the second game world inside the portal. Because this invention marks objects in the first and second game worlds using the vertex coordinate range of the portal and renders the game space based on these marks, the actual scene of the first game world is displayed outside the portal, while the scene of the second game world is displayed inside. This avoids discrepancies between the scene observed by the game character before entering the portal and the actual game scene upon entering, thereby enhancing the player's immersion and improving the player experience.
[0122] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A game space rendering method, characterized in that, The method includes: Responding to the player's input command to generate a portal, draw a portal within the game space; Based on the vertex coordinate range of the portal, objects in the first game world and the second game world are marked, wherein game characters are teleported from the first game world to the second game world through the portal; The game space is rendered based on the markings of objects within the first game world, so as to display the scene of the first game world outside the portal; The game space is rendered based on the markings of objects within the second game world, so as to display the scene of the second game world within the portal; When the game character is teleported from the first game world to the second game world through the portal, the game space is rendered according to the markings of objects in the first game world, so as to display the scene of the first game world through the portal; The game space is rendered based on the markings of objects within the second game world to display the scene of the second game world in which the game character is located; The steps for marking objects in the first and second game worlds based on the vertex coordinate range of the portal include: For each object in the first game world, if the object can be captured by the camera and the vertex coordinate range of the bounding box of the object does not coincide with the vertex coordinate range of the portal, then the object is marked as the first object. If the object can be captured by the camera and the vertex coordinate range of the bounding box of the object coincides with the vertex coordinate range of the portal, then the object is marked as the second object; For each object in the second game world, if the object can be captured by the camera and the vertex coordinate range of the bounding box of the object coincides with the vertex coordinate range of the portal, then the object is marked as a third object. If the object can be captured by the camera and the vertex coordinate range of the object's bounding box does not coincide with the vertex coordinate range of the portal, then the object is marked as the fourth object.
2. The method of claim 1, wherein, The first game world has multiple ordered rendering layers. The step of rendering the game space based on the markings of objects in the first game world includes: In the game space, the camera sequentially renders the first object in each rendering layer.
3. The method as described in claim 1, characterized in that, The second game world has multiple ordered rendering layers. The step of rendering the game space based on the markings of objects within the second game world includes: In the game space, the third object in each rendering layer is rendered sequentially through the camera's extended interface.
4. The method as described in claim 1, characterized in that, The step of rendering the game space based on the markers of objects within the first game world includes: A second object within the first game world is rendered in the game space via an extended interface of the camera, wherein the second object can be captured by the camera, and the vertex coordinate range of the bounding box of the second object coincides with the vertex coordinate range of the portal.
5. The method as described in claim 1, characterized in that, The step of rendering the game space based on the markers of objects within the second game world includes: A fourth object within the second game world is rendered in the game space using a camera, wherein the fourth object can be captured by the camera, and the vertex coordinate range of the bounding box of the fourth object does not coincide with the vertex coordinate range of the portal.
6. A game space rendering device, characterized in that, The device includes: The drawing module is used to respond to the portal generation command input by the player and draw the portal within the game space; A marking module is used to mark objects in the first game world and the second game world according to the vertex coordinate range of the portal, wherein game characters are teleported from the first game world to the second game world through the portal; The rendering module is used for: The game space is rendered based on the markings of objects within the first game world, so as to display the scene of the first game world outside the portal; The game space is rendered based on the markings of objects within the second game world, so as to display the scene of the second game world within the portal; When the game character is teleported from the first game world to the second game world through the portal, the game space is rendered according to the markings of objects in the first game world, so as to display the scene of the first game world through the portal; The game space is rendered based on the markings of objects within the second game world to display the scene of the second game world in which the game character is located; Specifically, the marking module is used to mark each object in the first game world as follows: if the object can be captured by the camera and the vertex coordinate range of the object's bounding box does not coincide with the vertex coordinate range of the portal, then the object is marked as a first object; if the object can be captured by the camera and the vertex coordinate range of the object's bounding box coincides with the vertex coordinate range of the portal, then the object is marked as a second object; for each object in the second game world, if the object can be captured by the camera and the vertex coordinate range of the object's bounding box coincides with the vertex coordinate range of the portal, then the object is marked as a third object; if the object can be captured by the camera and the vertex coordinate range of the object's bounding box does not coincide with the vertex coordinate range of the portal, then the object is marked as a fourth object.
7. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, implements the game space rendering method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the game space rendering method as described in any one of claims 1 to 5.