Virtual character layout method, device, computer equipment, and storage medium
By splitting the virtual plot according to the virtual plot configuration data in online games and laying out virtual characters according to preset station rules, the problem of not being able to display all characters at the same time under screen space limitations is solved, and the effect of clearly displaying the plot in a limited space is achieved, and the user's visual experience is improved.
Patent Information
- Application Number
- CN202411767338.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-08
AI Technical Summary
In online games, due to the limitation of screen size, the number and body size of characters that appear at the same time may be limited, resulting in the inability to display all related characters at the same time. In addition, the prior art highlights the characters talking through the changes in the action position of the characters and the perspective of the virtual camera, which may lead to misalignment of the character model and the game interface, bringing users a poor visual experience.
Provide a virtual character layout method. By obtaining the plot configuration data in the virtual plot, split the virtual plot into multiple sections, and selecting an idle station area in the interface according to the preset station rules to display the added virtual characters until the entire virtual plot is displayed. The method includes prioritizing the use of the left or right staging area, at most part of the intermediate staging area, and replacing the role in the current interface when the number of virtual characters exceeds a threshold.
This method can clearly display the complete plot in a limited screen space. Reasonable stance rules make it easier for users to understand the relationship between virtual characters and virtual plots, improving the user's visual experience.
Smart Images

Figure CN119770965A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of online game technology, and in particular to a method, device, computer equipment, and storage medium for arranging virtual characters. Background Art
[0002] In the virtual plot of online games, in order to enrich the game performance, the plot can be presented through character dialogue or branching options can be provided to players. Due to the limitation of screen size, the number and size of characters that appear on the same screen at the same time may be limited, especially in a fixed space, which may make it impossible to display all relevant characters at the same time.
[0003] In the related art, when there is a combination of characters of different sizes, the speaking character can be highlighted through the character's action position and the change of the virtual camera's perspective, which may cause the character model to be misaligned with the game interface, giving the user a poor visual experience. Summary of the invention
[0004] Based on this, it is necessary to provide a virtual character layout method, device, computer equipment, and storage medium to address the above-mentioned technical problems, which can reasonably arrange the character position layout in the game interface and optimize the user's visual experience.
[0005] In a first aspect, the present application provides a method for arranging a virtual character. The method comprises:
[0006] Acquire plot configuration data in a virtual plot, and divide the virtual plot into multiple sections based on the plot configuration data;
[0007] Execute the following layout of the virtual characters in the interface of a single section:
[0008] When adding a virtual character, select an idle standing area to display the newly added virtual character according to a preset standing rule, wherein the preset standing rule includes giving priority to using the Ith standing area in the left standing area, or the Jth standing area in the right standing area, and at most using one of the Mth standing area and the Nth standing area in the middle standing area, where M, N, I, and J are positive integers greater than or equal to 1;
[0009] When the number of virtual characters in the interface exceeds a preset virtual character number threshold, one or more virtual characters in the current interface are arbitrarily replaced; until the display of the entire virtual plot is completed.
[0010] In one of the embodiments, the virtual character in the middle standing area is rotated according to the plot configuration data.
[0011] In one embodiment, selecting an idle standing area to display a newly added virtual character includes:
[0012] Determine the height category of the virtual character, determine the head display area corresponding to the height category in the interface, align the bottom edge of the head display area with the preset edge of the interface, and the adaptation parameter of the head display area is consistent with the interface;
[0013] The position height of the virtual character is adjusted so that the head of the virtual character is located in the head display area.
[0014] In one embodiment, the method further comprises:
[0015] The virtual character is scaled so that the size of the virtual character is adapted to the interface.
[0016] In one embodiment, the method further comprises:
[0017] Obtaining the adaptation parameters of the preset virtual character;
[0018] The standing area and size of the virtual character are adjusted based on the preset standing rules and the preset adaptation parameters of the virtual character.
[0019] In one embodiment, when the virtual characters include large characters, selecting an idle standing area to display a newly added virtual character includes:
[0020] When it is determined that the number of the large-sized characters is equal to two, a virtual character is displayed in the left standing area and the right standing area respectively, and the body types of the virtual characters include large body type and ordinary body type.
[0021] In one of the embodiments, when the virtual characters include large characters, the distance between a virtual camera and a standing area is controlled to increase, and the virtual camera is used to shoot interface content.
[0022] In one embodiment, when the middle standing area displays a large-sized character, the virtual character in the left standing area is shifted to the left, and the virtual character in the right standing area is shifted to the right;
[0023] In the case where a large-sized character is displayed in the left standing area, the large-sized character in the left standing area is shifted to the left;
[0024] When a large-sized character is displayed in the right standing area, the large-sized character in the right standing area is offset to the right.
[0025] In one embodiment, the offset distance is determined based on the number of large-sized characters and the positions of the standing areas of the large-sized characters.
[0026] In a second aspect, the present application further provides a virtual character layout device, the device comprising:
[0027] An acquisition module, used to acquire plot configuration data in a virtual plot, and split the virtual plot into multiple sections based on the plot configuration data;
[0028] The execution module is used to execute the layout of the virtual characters of the following single sections in the interface:
[0029] When adding a virtual character, select an idle standing area to display the newly added virtual character according to a preset standing rule, wherein the preset standing rule includes giving priority to using the Ith standing area in the left standing area, or the Jth standing area in the right standing area, and at most using one of the Mth standing area and the Nth standing area in the middle standing area, where M, N, I, and J are positive integers greater than or equal to 1;
[0030] The display module is used to replace one or more virtual characters in the current interface at will when the number of virtual characters in the interface exceeds a preset virtual character number threshold; until the display of the entire virtual plot is completed.
[0031] In a third aspect, the present disclosure further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the virtual character layout method when executing the computer program.
[0032] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the virtual character layout method are implemented.
[0033] In a fifth aspect, the present disclosure further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the virtual character layout method are implemented.
[0034] The above virtual character layout method has at least the following beneficial effects:
[0035] The embodiment scheme provided by the present disclosure divides the virtual plot based on the plot configuration data to obtain multiple sections, arranges the newly added virtual characters in each section based on the preset position rules, sets the preset virtual character number threshold in each section, and replaces one or more virtual characters in the current interface at will when the number of virtual characters in the interface exceeds the preset virtual character number threshold until the display of the entire virtual plot is completed. It can ensure that even in a limited screen space, the complete plot can be clearly displayed, and reasonable position rules can make it easier for users to understand the relationship between virtual characters and the virtual plot.
[0036] 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
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 A diagram of an application environment of a layout method for a virtual character in one embodiment;
[0039] Figure 2 is a schematic flow chart of a method for laying out a virtual character in one embodiment;
[0040] Figure 3 A schematic diagram of dividing a virtual plot into subsections in one embodiment;
[0041] Figure 4 A schematic diagram of designing the positions of virtual characters in each section according to the number of virtual characters in one embodiment;
[0042] Figure 5 is a schematic diagram of different stations in one embodiment;
[0043] Figure 6 is a schematic diagram of a head display area in one embodiment;
[0044] Figure 7 A schematic diagram of virtual character height calibration in one embodiment;
[0045] Figure 8 A schematic diagram of adjusting the size of a virtual character and adapting the interface in one embodiment;
[0046] Fig. 9 A schematic diagram of the classification of the body types of virtual characters in one embodiment;
[0047] Fig.10 A schematic diagram of a large character appearing in one embodiment;
[0048] Fig.11 A schematic diagram of two large characters appearing on the scene in one embodiment;
[0049] Fig.12 A schematic diagram of a large virtual character standing animation in one embodiment;
[0050] Fig.13A schematic diagram of an embodiment including two large virtual characters' standing animations;
[0051] Fig.14 A schematic diagram of an embodiment including three large-sized virtual characters' standing animations;
[0052] Fig.15 is a structural block diagram of a layout device for a virtual character in one embodiment;
[0053] Fig.16 is an internal structure diagram of a computer device in one embodiment;
[0054] Fig.17 The figure is a diagram of the internal structure of a server in one embodiment. DETAILED DESCRIPTION
[0055] 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.
[0056] 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 here can be implemented in an order other than those illustrated or described here. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.
[0057] The present disclosure provides a method for arranging a virtual character, which can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0058] In some embodiments of the present disclosure, Figure 2 As shown, a layout method for a virtual character is provided, and the method is applied to Figure 1 The method is described by taking the example of a server in processing the plot configuration data. It is understandable that the method can be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In a specific embodiment, the method can include the following steps:
[0059] S202: Acquire plot configuration data in a virtual plot, and divide the virtual plot into multiple sections based on the plot configuration data.
[0060] The basic components of the plot configuration data may include scenes, characters, dialogues, and events. The virtual plot may be split into multiple sections based on the plot configuration data. The splitting rules may include splitting based on the logical order of the dialogue, according to the paragraphs and theme changes of the dialogue content; splitting based on the appearance and exit of the characters; splitting based on scene changes or environmental changes; and splitting based on clear time periods or events.
[0061] Figure 3 It is a schematic diagram of dividing a virtual plot into sections in an embodiment. Section 1 is constructed based on the dialogue content, section 2 is constructed based on the appearance of the characters, section 3 is constructed based on the climax of the plot, and section 4 is constructed based on the time node.
[0062] Execute the following layout of the virtual characters in the interface of a single section:
[0063] S204: When adding a virtual character, select an idle standing area according to a preset standing rule to display the newly added virtual character, wherein the preset standing rule includes giving priority to using the Ith standing area in the left standing area, or the Jth standing area in the right standing area, and at most using one of the Mth standing area and the Nth standing area in the middle standing area, where M, N, I, and J are positive integers greater than or equal to 1.
[0064] The interface can be divided into three standing areas: the left standing area on the left side of the interface, the middle standing area in the middle of the interface, and the right standing area on the right side of the interface. Each standing area can include several standing points.
[0065] In one embodiment of the present disclosure, when the preset threshold value of the number of virtual characters is less than or equal to 3, M, N, I, and J can take the value of 1, that is, the interface position is divided into 4 position areas from left to right, numbered 1, 2, 4, and 5 respectively, and the preset position rule is that virtual characters give priority to standing at No. 1 and No. 5, and there cannot be virtual characters appearing at No. 2 and No. 4 at the same time, that is, the Ith position area in the left position area, or the Jth position area in the right position area is used preferentially, and at most one of the Mth position area and the Nth position area in the middle position area is used.
[0066] Figure 4 A schematic diagram of designing the positions of virtual characters in each section in an embodiment.
[0067] In one embodiment of the present disclosure, when the number of newly added virtual characters is 1, the virtual character can appear at any station location, such as Figure 4 As shown in Section 4 of the figure, the virtual character can be placed in the center to achieve the best visual effect, and the virtual camera perspective is also placed in the center to ensure that the virtual character occupies the main part of the interface.
[0068] In one embodiment of the present disclosure, when the number of newly added virtual characters is 2, the left standing area or the right standing area is preferentially used based on the preset standing rules, such as Figure 4 As shown in Sections 1 and 3 in the figure, a virtual character can be placed in the left standing area (No. 1) and the right standing area (No. 5) respectively. In order to ensure that the virtual camera perspective can focus on the standing position and display the model on the other side, the position and angle of the camera need to be adjusted. As shown in Section 1 in the figure, position 1 is the main body, while the virtual character in position 3 can be displayed.
[0069] In one embodiment of the present disclosure, when the number of newly added virtual characters is 3, the positions that can be combined based on the preset position rules are "No. 1, No. 2, No. 5" or "No. 1, No. 4, No. 5". On the basis of the two-person position, a third position is displayed between the two positions. The positions can be rotated according to the camp requirements of the plot characters, and can be rotated in accordance with the left and right sides or centered.
[0070] In the above embodiment, before adding a virtual character, the number of virtual characters in the interface is 0, and the virtual characters that appear in the screen are added in sequence until three people are on the same screen.
[0071] S206: When the number of virtual characters in the interface exceeds a preset threshold of the number of virtual characters, one or more virtual characters in the current interface are randomly replaced; until the display of the entire virtual plot is completed.
[0072] If there are already virtual characters in the interface before adding a new virtual character, and the number of existing virtual characters and the number of newly added virtual characters do not exceed the preset virtual character number threshold, the virtual characters are arranged based on the preset standing rules. When the number of virtual characters in the interface exceeds the preset virtual character number threshold, one or more virtual characters in the current interface are replaced at will until the entire virtual plot is displayed.
[0073] In the above virtual character layout method, the virtual plot is split based on the plot configuration data to obtain multiple sections, and the newly added virtual characters in each section are laid out based on the preset position rules, and a preset virtual character number threshold is set in each section. When the number of virtual characters in the interface exceeds the preset virtual character number threshold, one or more virtual characters in the current interface are arbitrarily replaced until the display of the entire virtual plot is completed. It can ensure that even in a limited screen space, the complete plot can be clearly displayed, and reasonable position rules can make it easier for users to understand the relationship between virtual characters and the virtual plot.
[0074] In some embodiments of the present disclosure, the virtual character in the middle standing area performs a rotation operation according to the plot configuration data.
[0075] When No. 2 or No. 4 is a neutral character, you can use the 2.1 or 4.1 position. The 2.1 and 4.1 positions support free coordinate rotation to display neutral characters in the plot while avoiding models from penetrating each other. Figure 5 5-1 is a schematic diagram of different positions in an embodiment, 5-2 is a schematic diagram of position 2, and 5-1 is a schematic diagram of position 2.1. According to the camp requirements of the plot characters, the angle of position 2.1 can be rotated, rotated in accordance with the left and right sides, or centered. All camera positions are appropriately stretched to show more views. The positions and camera angles of the three virtual characters in the same scene can be effectively managed to ensure good visual effects and meet the plot requirements.
[0076] In some embodiments of the present disclosure, selecting an idle standing area to display a newly added virtual character includes:
[0077] Determine the height category of the virtual character, determine the head display area corresponding to the height category in the interface, align the bottom edge of the head display area with the preset edge of the interface, and the adaptation parameters of the head display area are consistent with the interface; adjust the position height of the virtual character so that the head of the virtual character is located in the head display area.
[0078] Determine a reference coordinate point. All models will be placed at this point when loaded to determine the height category of the virtual character. The reference coordinate is the center point of the ground in the scene, or it can be an arbitrarily set point. Keep the basic coordinates of all virtual characters in the scene consistent, that is, they are all located at the same initial coordinates. At this coordinate, according to the height of the model, they are divided into three categories: tall height, medium height, and short height.
[0079] Designate a fixed area in the interface as the head display area, which can be a rectangular area, to display the character's head, to ensure that all model heads can be correctly displayed in this area. Ensure that the bottom edge of the head display area is aligned with the preset edge of the interface, which can be set as the bottom edge. The adaptation parameters of the head display area can include position, width, height, etc. Setting the adaptation parameters of the head display area to be consistent with the interface can ensure that the position and size of the head display area can adapt to different screen resolutions and be consistent with other elements in the interface, such as buildings, props, etc.
[0080] Adjust the position height of the avatar so that the avatar's head is located in the head display area. The position height is the height of the avatar as a whole in the interface, and set the bottom edge of the head display area to align with the preset edge of the interface. The adaptation parameters of the head display area are consistent with the interface, which can ensure that on different devices, even if the screen resolution is different, a consistent display effect can be achieved on multiple platforms. The head display area can be divided into three areas: low, medium and high, corresponding to the three types of height. Figure 6 A schematic diagram of a head display area in an embodiment.
[0081] In one of the embodiments, when a virtual character model is loaded into the interface, its height needs to be measured and classified according to the height, and the virtual character is placed in an area corresponding to the height category in the head display area. Figure 7 7-1 is a schematic diagram of height calibration of a virtual character in an embodiment, wherein 7-1 is a schematic diagram before height calibration, the virtual character is of short stature, and the virtual character is placed in the area corresponding to the short stature in the head display area, 7-2 is a schematic diagram after height calibration, and 7-3 is a schematic diagram in which the bottom edge of the head display area is aligned with the preset edge of the interface.
[0082] In some embodiments of the present disclosure, the virtual character is scaled so that the size of the virtual character is adapted to the interface.
[0083] Get the width and height of the current interface. You can calculate the scaling ratio based on the interface width, height, and the space that needs to be reserved. This ensures that models with larger widths can flexibly adapt to different interfaces and will not block other UI elements, providing a consistent visual experience. Figure 88-1 is a schematic diagram of adjusting the position height of the virtual character so that the head of the virtual character is located at the bottom of the head display area, and 8-2 is a schematic diagram of scaling the virtual character and the head display area on a narrow screen so that the size of the virtual character is adapted to the interface.
[0084] In some embodiments of the present disclosure, the method further includes:
[0085] Acquire preset adaptation parameters of the virtual character; and adjust the standing area and size of the virtual character based on the preset standing rules and the preset adaptation parameters of the virtual character.
[0086] The preset adaptation parameters of the virtual character may include the height and scaling parameters of the virtual character, which may refer to key parameters that are pre-calculated and stored to ensure that the virtual character is in interfaces of different sizes. By pre-calculating and storing the preset adaptation parameters of the virtual character, the amount of calculation at runtime can be reduced. When there are multiple station layouts, the layout that matches the final station of the virtual character can be selected to avoid the sudden appearance and disappearance of the character, and different types of terminal devices can be better adapted.
[0087] In some embodiments of the present disclosure, when the virtual characters include large characters, selecting an idle standing area to display a newly added virtual character includes:
[0088] When it is determined that the number of the large-sized characters is equal to two, a virtual character is displayed in the left standing area and the right standing area respectively.
[0089] Fig. 9 FIG. 1 is a schematic diagram of the classification of the body types of virtual characters in one embodiment. The body types of virtual characters may include large body type and ordinary body type, and the ordinary body type may include standard body type, small body type, medium body type, and tall body type.
[0090] Fig.10 The schematic diagram of a large character appearing in one embodiment is shown in FIG. The large character can be in the No. 1 standing area, the No. 2 standing area, the No. 4 standing area or the No. 5 standing area.
[0091] Fig.11 Schematic diagram of two large characters appearing in one embodiment. When there are two large characters, the two large characters cannot stand on the same side, that is, one large character stands in the left standing area and one large character stands in the right standing area. Figure 11-1 As shown, there are the following standing situations: large characters are in standing area 1 and standing area 4, and ordinary characters are in standing area 5; large characters are in standing area 1 and standing area 5, and ordinary characters may be in standing area 2 or standing area 4, such as Figure 11-2As shown in the figure, large characters are in the No. 2 and No. 4 standing areas, while ordinary characters may be in the No. 1 or No. 5 standing areas; large characters are in the No. 2 and No. 5 standing areas, while ordinary characters must stand in the No. 1 standing area. In order to ensure that players can see all virtual characters on the field at once, if two large characters stand on the same side, the ordinary characters on the other side will not be visible, so when there are two large characters, the two large characters cannot stand on the same side.
[0092] Large characters are in standing area 1, 2 and 4; large characters are in standing area 1, 2 and 5; large characters are in standing area 1, 4 and 5; large characters are in standing area 2, 4 and 5.
[0093] In some embodiments of the present disclosure, when the virtual character includes a large-sized character, the distance between the virtual camera and the standing area is controlled to increase, and the virtual camera is used to shoot interface content.
[0094] If a large character appears, you need to adjust the position of the virtual camera and increase the distance between the virtual camera and the standing area to capture more interface content.
[0095] In some embodiments of the present disclosure, when the middle standing area displays a large-sized character, the virtual character in the left standing area is shifted to the left, and the virtual character in the right standing area is shifted to the right;
[0096] In the case where a large-sized character is displayed in the left standing area, the large-sized character in the left standing area is shifted to the left;
[0097] When a large-sized character is displayed in the right standing area, the large-sized character in the right standing area is offset to the right.
[0098] Fig.12 The following is a schematic diagram of a large virtual character standing animation in one embodiment. When a large character appears in the No. 1 standing area and the No. 5 standing area, the spatial coordinates of the standing area will be triggered to play the offset animation, with the No. 1 standing area offset to the left and the No. 5 standing area offset to the right. Figure 12-1 The No. 1 station area is for large-sized characters, the No. 5 station area is for normal-sized characters, the No. 1 dotted line station area is the initial position, the No. 1 solid line station area is the station area after displacement n→x1, and the No. 1 station area is offset to the left by X1; Figure 12-2 The No. 1 station area is for large characters, the No. 2 or No. 4 station areas are for normal characters, and the No. 1 station area is offset to the left by X1; Figure 12-3 The No. 1 standing area is for large characters, the No. 2 or No. 4 standing area is for normal-sized characters, the No. 5 standing area is for normal-sized characters, and the No. 1 standing area is offset to the left by X1. Figure 12-4 The No. 5 station area is for large-sized characters, the No. 2 or No. 4 station area is for normal-sized characters, the No. 5 dotted-line station area is the initial position, the No. 5 solid-line station area is the station area after displacement n→x1, and the No. 5 station area is offset to the right by X1; Figure 12-5 The No. 5 standing area is for large characters, the No. 2 or No. 4 standing area is for normal-sized characters, the No. 1 standing area is for normal-sized characters, and the No. 5 standing area is offset to the right by X1. Figure 12-6 The No. 2 or No. 4 standing area is for large characters, the No. 1 standing area is for normal-sized characters, and the No. 1 standing area is offset to the left by X1. Figure 12-7 The No. 2 or No. 4 position is for large characters, and the No. 5 position is for normal characters. The No. 5 position is offset to the right by X1. Figure 12-8 The No. 2 or No. 4 standing area is for large characters, the No. 5 standing area is for normal-sized characters, the No. 1 standing area is for normal-sized characters, the No. 1 standing area is offset to the left by X1, and the No. 5 standing area is offset to the right by X1.
[0099] In some embodiments of the present disclosure, the offset distance is determined according to the number of large-sized characters and the positions of the standing areas of the large-sized characters.
[0100] Fig.13 13-1 is a schematic diagram of an animation of two large virtual characters standing. In 13-1, the No. 1 standing area is for a large character, the No. 5 standing area is for a large character, the No. 1 standing area is offset to the left by X1, and the No. 5 standing area is offset to the right by X1; in 13-2, the No. 1 standing area is for a large character, the No. 2 or No. 4 standing area is for a large character, the No. 1 standing area is offset to the left by X2, and X2 is greater than X1; in 13-3, the No. 2 or No. 4 standing area is for a large character, the No. 5 standing area is for a large character, and the No. 5 standing area is offset to the left by X2; in 13-4, the No. 1 standing area is for a large character, and the No. 2 or No. 4 standing area is for a normal character For characters, the No. 5 standing area is for large characters, the No. 1 standing area is offset to the left by X2, and the No. 5 standing area is offset to the left by X2; for 13-5, the No. 1 standing area is for normal-sized characters, the No. 2 or No. 4 standing area is for normal-sized characters, and the No. 5 standing area is for large characters, the No. 1 standing area is offset to the left by X1, and the No. 5 standing area is offset to the left by X2; for 13-6, the No. 1 standing area is for large characters, the No. 2 or No. 4 standing area is for large characters, and the No. 5 standing area is for normal-sized characters, the No. 1 standing area is offset to the left by X2, and the No. 5 standing area is offset to the left by X1.
[0101] Fig.14 The figure is a schematic diagram of three large virtual character position animations in one embodiment. Position area No. 1 is for large characters, position area No. 2 or No. 4 is for large characters, and position area No. 5 is for large characters. Position area No. 1 is offset to the left by X2, and position area No. 5 is offset to the left by X2.
[0102] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0103] Based on the same inventive concept, the embodiment of the present disclosure also provides a virtual character layout device for implementing the above-mentioned layout method for virtual characters. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the virtual character layout device embodiment provided below can refer to the limitations of the virtual character layout method above, and will not be repeated here.
[0104] The device may include a system (including a distributed system), software (application), module, component, server, client, etc. that uses the method described in the embodiments of this specification and is combined with necessary implementation hardware. Based on the same innovative concept, the device in one or more embodiments provided in the embodiments of the present disclosure is as described in the following embodiments. Since the implementation scheme and method of the device to solve the problem are similar, the implementation of the specific device in the embodiments of this specification can refer to the implementation of the aforementioned method, and the repetitions will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0105] In one embodiment, Fig.15 As shown, a virtual character layout device 1500 is provided, and the device may be the aforementioned server, or a module, component, device, unit, etc. integrated in the server. The device 1500 may include:
[0106] An acquisition module 1502 is used to acquire plot configuration data in a virtual plot, and divide the virtual plot into multiple sections based on the plot configuration data;
[0107] The execution module 1504 is used to execute the following layout of the virtual characters of the single section in the interface:
[0108] When adding a virtual character, select an idle standing area to display the newly added virtual character according to a preset standing rule, wherein the preset standing rule includes giving priority to using the Ith standing area in the left standing area, or the Jth standing area in the right standing area, and at most using one of the Mth standing area and the Nth standing area in the middle standing area, where M, N, I, and J are positive integers greater than or equal to 1;
[0109] The display module 1506 is used to replace one or more virtual characters in the current interface at will when the number of virtual characters in the interface exceeds a preset virtual character number threshold, until the display of the entire virtual plot is completed.
[0110] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0111] Each module in the above-mentioned layout device for virtual characters can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0112] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.16 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store plot configuration data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for arranging a virtual character is implemented.
[0113] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.17As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a layout method of a virtual character is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.
[0114] Those skilled in the art will understand that Fig.16 , Fig.17 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0115] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any embodiment of the present disclosure is implemented.
[0116] In one embodiment, a computer program product is provided, including a computer program, which implements the method described in any embodiment of the present disclosure when executed by a processor.
[0117] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided by the present disclosure may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but are not limited to this.
[0118] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0119] The above-described embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the attached claims.
Claims
1. A method for layout of a virtual character, characterized in that: The method comprises: Acquire plot configuration data in a virtual plot, and divide the virtual plot into multiple sections based on the plot configuration data; Execute the following layout of the virtual characters in the interface of a single section: When adding a virtual character, select an idle standing area to display the newly added virtual character according to a preset standing rule, wherein the preset standing rule includes giving priority to using the Ith standing area in the left standing area, or the Jth standing area in the right standing area, and at most using one of the Mth standing area and the Nth standing area in the middle standing area, where M, N, I, and J are positive integers greater than or equal to 1; When the number of virtual characters in the interface exceeds a preset virtual character number threshold, one or more virtual characters in the current interface are arbitrarily replaced; until the display of the entire virtual plot is completed.
2. The method according to claim 1, characterized in that: The virtual character in the middle standing area performs a rotation operation according to the plot configuration data.
3. The method according to claim 1, characterized in that: The selecting of the free standing area to display the newly added virtual character comprises: Determine the height category of the virtual character, determine the head display area corresponding to the height category in the interface, align the bottom edge of the head display area with the preset edge of the interface, and the adaptation parameter of the head display area is consistent with the interface; The position height of the virtual character is adjusted so that the head of the virtual character is located in the head display area.
4. The method according to claim 3, characterized in that The method further comprises: The virtual character is scaled so that the size of the virtual character is adapted to the interface.
5. The method according to claim 4, characterized in that The method further comprises: Obtaining the adaptation parameters of the preset virtual character; The standing area and size of the virtual character are adjusted based on the preset standing rules and the preset adaptation parameters of the virtual character.
6. The method according to claim 1, characterized in that In the case where the virtual characters include large characters, the selecting of an idle standing area to display a newly added virtual character includes: When it is determined that the number of the large-sized characters is equal to two, a virtual character is displayed in the left standing area and the right standing area respectively, and the body types of the virtual characters include large body type and ordinary body type.
7. The method according to claim 1, characterized in that In the case where the virtual characters include large-sized characters, the distance between a virtual camera and a standing area is controlled to increase, and the virtual camera is used to shoot interface content.
8. The method according to claim 7, characterized in that When a large-sized character is displayed in the middle standing area, the virtual character in the left standing area is shifted to the left, and the virtual character in the right standing area is shifted to the right; In the case where a large-sized character is displayed in the left standing area, the large-sized character in the left standing area is shifted to the left; When a large-sized character is displayed in the right standing area, the large-sized character in the right standing area is offset to the right.
9. The method according to claim 8, characterized in that The distance of the offset is determined by the number of large characters and the location of the large characters' standing areas.
10. A virtual character layout device, characterized in that: The device comprises: An acquisition module, used to acquire plot configuration data in a virtual plot, and split the virtual plot into multiple sections based on the plot configuration data; The execution module is used to execute the layout of the virtual characters of the following single sections in the interface: When adding a virtual character, select an idle standing area to display the newly added virtual character according to a preset standing rule, wherein the preset standing rule includes giving priority to using the Ith standing area in the left standing area, or the Jth standing area in the right standing area, and at most using one of the Mth standing area and the Nth standing area in the middle standing area, where M, N, I, and J are positive integers greater than or equal to 1; The display module is used to replace one or more virtual characters in the current interface at will when the number of virtual characters in the interface exceeds a preset virtual character number threshold; until the display of the entire virtual plot is completed.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.