CN113069761A - Method and device for displaying virtual character in game scene and electronic equipment - Google Patents

Method and device for displaying virtual character in game scene and electronic equipment Download PDF

Info

Publication number
CN113069761A
CN113069761A CN202110278182.9A CN202110278182A CN113069761A CN 113069761 A CN113069761 A CN 113069761A CN 202110278182 A CN202110278182 A CN 202110278182A CN 113069761 A CN113069761 A CN 113069761A
Authority
CN
China
Prior art keywords
position information
target
character
role
virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110278182.9A
Other languages
Chinese (zh)
Other versions
CN113069761B (en
Inventor
刘舟
袁尧
沈琳焘
施坤省
黎煌达
张志稳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Sanqi Mutual Entertainment Technology Co ltd
Original Assignee
Guangzhou Sanqi Mutual Entertainment Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Sanqi Mutual Entertainment Technology Co ltd filed Critical Guangzhou Sanqi Mutual Entertainment Technology Co ltd
Priority to CN202110278182.9A priority Critical patent/CN113069761B/en
Publication of CN113069761A publication Critical patent/CN113069761A/en
Application granted granted Critical
Publication of CN113069761B publication Critical patent/CN113069761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/30Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses a method and a device for displaying virtual characters in a game scene and electronic equipment, wherein the method comprises the following steps: acquiring first position information of a first virtual character in a current game scene, wherein the first virtual character is a player character responding to the operation of a target terminal; sequentially selecting a plurality of pieces of second position information from a character list in which second position information of each second virtual character in the current game scene is recorded according to the position distance between the first position information and each piece of second position information until the number of the selected second position information meets a preset condition, wherein the second virtual characters are player characters responding to the operation of a non-target terminal; determining a plurality of target roles to be displayed from each second virtual role according to the selected plurality of second position information; and drawing and displaying each target role.

Description

Method and device for displaying virtual character in game scene and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for displaying a virtual character in a game scene, and an electronic device.
Background
When the existing game displays the virtual character, the terminal display card is generally required to draw the virtual character independently, and after the whole virtual character is drawn, the drawn virtual character is displayed on the terminal screen. In an actual game, each game character drawn by the method has the same configuration parameters. However, if a large number of virtual characters exist in a Game scene, for example, in a massively Multiplayer Online Role-Playing Game (mmoptg), hundreds of virtual characters may need to be displayed on a terminal screen at the same time, and at this time, a display card needs to perform a virtual character drawing process hundreds of times, which may exceed an upper limit of a GPU of the display card, cause a phenomenon that a picture displayed on the screen of the Game is delayed, and may cause a Game flash back and a damage to the display card.
Disclosure of Invention
The present application is directed to solve at least one of the technical problems in the prior art, and provides a method and an apparatus for displaying virtual characters in a game scene, and an electronic device, which reduce the amount of calculation of a display card when displaying a plurality of virtual characters, and increase the display speed of a terminal screen for game characters.
The embodiment of the application provides a method for displaying virtual characters in a game scene, which comprises the following steps:
acquiring first position information of a first virtual character in a current game scene, wherein the first virtual character is a player character responding to the operation of a target terminal;
sequentially selecting a plurality of pieces of second position information from a character list in which second position information of each second virtual character in the current game scene is recorded according to the position distance between the first position information and each piece of second position information until the number of the selected second position information meets a preset condition, wherein the second virtual characters are player characters responding to the operation of a non-target terminal;
determining a plurality of target roles to be displayed from each second virtual role according to the selected plurality of second position information;
and drawing and displaying each target role.
Further, the character list records the corresponding second position information when the second virtual character enters the current game scene.
Further, the character list deletes the corresponding second location information when the second virtual character exits from the current game scene.
Further, drawing and displaying each target character includes:
acquiring configuration parameters of each target role according to the position distance between the first virtual role and each target role, wherein the configuration parameters are used for drawing the target roles, and the numerical values of the configuration parameters are in inverse proportion to the position distance;
and drawing and displaying each target role according to the configuration parameters of each target role.
Further, the configuration parameter includes at least one of chroma, brightness and definition.
Further, drawing and displaying each target character includes:
acquiring various components for forming the target role;
performing component merging processing on the adjacent components in each component;
and drawing and displaying the target role after the part is combined.
Further, the method also comprises the following steps:
acquiring an interaction request initiated to a designated role in the target roles;
and according to the interaction request, suspending the drawing and displaying process of each non-specified role except the specified role in each target role.
Further, after obtaining the first position information of the first virtual character in the current game scene, the method further includes:
determining a target area in the current scene according to the first position information;
and displaying a third virtual character in the target area, wherein the third virtual character is a non-player character.
Further, drawing and displaying a third virtual character in the target area, including:
and loading a scene image corresponding to the target area to display a third virtual character in the target area based on the scene image.
Further, in an embodiment of the present application, there is provided a display device for a virtual character in a game scene, including:
the information acquisition module is used for acquiring first position information of a first virtual character in a current game scene, wherein the first virtual character is a player character responding to the operation of a target terminal;
the information selection module is used for sequentially selecting a plurality of pieces of second position information from a character list in which the second position information of each second virtual character under the current game scene is recorded according to the position distance between the first position information and each piece of second position information until the number of the selected plurality of pieces of second position information meets a preset condition, wherein the second virtual characters are player characters responding to the operation of a non-target terminal;
the role determination module is used for determining a plurality of target roles to be displayed from each second virtual role according to the selected plurality of second position information;
and the role display module is used for drawing and displaying each target role.
Further, an embodiment of the present application provides an electronic device, including: the game scene display method comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the display method of the virtual character in the game scene according to the embodiment.
Further, an embodiment of the present application provides a computer-readable storage medium, where computer-executable instructions are stored, and the computer-executable instructions are configured to enable a computer to execute the method for displaying virtual characters in a game scene according to the embodiment.
Compared with the prior art, in the embodiment, the first position information of the first virtual character is acquired, the plurality of second position information is sequentially selected from the position distances between the first position information and the second position information in the character list in which the second position information of the second virtual characters is recorded until the selected number meets the preset condition, the target character to be displayed is determined according to the selected plurality of second position information, and the target character is drawn and displayed. In the embodiment, according to the position distance between the second position information of each second virtual character in the current game scene and the first position information of the first virtual character, a plurality of target characters corresponding to a plurality of second position information meeting the preset condition number are selected for drawing and displaying, so that in the game scene with a large number of virtual characters, all the characters do not need to be displayed at the same time, the burden of a display card GPU can be reduced, and the display speed of a terminal screen on the game characters is improved.
In the above embodiment, the character list records the corresponding second position information when the second virtual character enters the current game scene, so that the character list can be updated in time, and the target characters meeting the requirements can be accurately drawn and displayed at different times.
In the above embodiment, the character list deletes the corresponding second location information when the second virtual character exits from the current game scene, so that the character list can be updated in time, and the target characters meeting the requirements can be accurately drawn and displayed at different times.
In the above embodiment, the configuration parameter inversely proportional to the position distance of each target character is obtained according to the position distance between the first virtual character and each target character, and each target character is drawn and displayed according to the configuration parameter, so that each target character in the current game scene can be reasonably and clearly displayed.
In the above embodiment, at least one of the chromaticity, the brightness, and the definition is used as a basis for drawing and displaying each target character, so that each target character in the current game scene can be more reasonably and clearly displayed.
In the above embodiment, after the obtained components constituting the target role are obtained, the target role after the component merging processing is drawn and displayed by performing the component merging processing on the adjacent components in the components, so that the target role after the component merging processing is formed by fewer components, and therefore, the display card can perform the drawing process for fewer times on the target role order after the component merging processing, thereby greatly reducing the amount of operation of the display card GPU in the drawing process, and improving the drawing speed of the display card GPU on the target role.
In the embodiment, the interaction request initiated to the designated role is obtained, and the drawing and displaying processes of other target roles except the designated role are suspended according to the interaction request, so that other target roles do not need to be displayed in the interaction process with the designated role, the interaction effect of the designated role is better displayed, other unnecessary operations are stopped at the same time, and the operation amount of the GPU of the display card is reduced.
In the embodiment, the target area in the current game scene is determined according to the first position information, the third virtual character in the target area is displayed, part of non-player characters can be displayed, the game playability is improved, and the calculation amount of the display card GPU is reduced as much as possible.
In the above-described embodiment, the third virtual character in the target area is displayed based on the loaded scene image corresponding to the target area, enabling the non-player character to display in the scene image, further increasing the playability of the game.
Drawings
The present application is further described with reference to the following figures and examples;
FIG. 1 is a diagram of an exemplary environment in which a method for displaying virtual characters in a game scene may be implemented;
FIG. 2 is a flowchart illustrating a method for displaying virtual characters in a game scene according to an embodiment;
FIG. 3 is a schematic diagram of an embodiment of a display device for displaying virtual characters in a game scene;
FIG. 4 is a schematic diagram of another embodiment of a display device for virtual characters in a game scene;
FIG. 5 is a block diagram of a computer device in one embodiment.
Detailed Description
Reference will now be made in detail to the present embodiments of the present application, preferred embodiments of which are illustrated in the accompanying drawings, which are for the purpose of visually supplementing the description with figures and detailed description, so as to enable a person skilled in the art to visually and visually understand each and every feature and technical solution of the present application, but not to limit the scope of the present application.
When the existing game displays the virtual character, the terminal display card is generally required to draw the virtual character independently, and after the whole virtual character is drawn, the drawn virtual character is displayed on the terminal screen. In an actual game, each game character drawn by the method has the same configuration parameters. However, if a large number of virtual characters exist in a Game scene, for example, in a massively Multiplayer Online Role-Playing Game (mmoptg), hundreds of virtual characters may need to be displayed on a terminal screen at the same time, and at this time, a display card needs to perform a virtual character drawing process hundreds of times, which may exceed an upper limit of a GPU of the display card, cause a phenomenon that a picture displayed on the screen of the Game is delayed, and may cause a Game flash back and a damage to the display card. In this case, a massively multiplayer online role-playing game refers to a virtual world in which each player plays a virtual role and controls many activities of the role. The operation of the large-scale multi-player online role-playing game is divided into a user terminal and a server, a user can log in the server from the user terminal through internet connection to play the game as much as possible, and the data of the user is stored in the server. The game process is that the virtual role played by the player interacts with the virtual role controlled by other players or the role played by a non-player (NPC) in real time in a game scene.
To solve the above technical problem, as shown in fig. 1, it is an application environment diagram of a display method of a virtual character in a game scene in one embodiment. In the application environment, the user terminal 110 is connected to the server 120 through a network, the terminal 110 may be specifically a desktop terminal 110 or a mobile terminal 110, and the mobile terminal may be one of a mobile phone, a tablet computer, a notebook computer, a wearable device, and the like. The server 120 may be implemented by an independent server 120 or a server cluster composed of a plurality of servers 120, and may also be a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform. In this embodiment, the user terminal 110 may be used as a front end of a game client running a game, and the server 120 may be used as a background of the game client, so that after the server 120 obtains a data call request sent by a game user in the user terminal 110 through the game client, a long connection may be quickly established with the user terminal 110.
The method for displaying virtual characters in a game scene provided by the embodiments of the present application will be described and explained in detail through several specific embodiments.
As shown in FIG. 2, in one embodiment, a method for displaying a virtual character in a game scene is provided. The embodiment is mainly illustrated by applying the method to computer equipment. The computer device may specifically be the user terminal 110 in fig. 1 described above.
Referring to fig. 2, the method for displaying virtual characters in a game scene specifically includes the following steps:
and S11, acquiring first position information of a first virtual character in the current game scene, wherein the first virtual character is a player character responding to the operation of the target terminal.
In the present embodiment, the first virtual character is a player character in response to the operation of the target terminal, that is, a virtual character played and controlled by a player in a massively multiplayer online role-playing game. A player can input operation into a user terminal through an input device such as a keyboard, a game pad and the like, and the user terminal generates operation of a target terminal according to the operation input by the user, wherein the target terminal refers to the user terminal to which the user inputs the input operation, namely one or more user terminals used by the user in a massively multiplayer online role playing game. The user terminal acquires the first position information of the first virtual character in the current game scene, and can acquire the first position information of the first virtual character in the current game scene by calling the map information of the current game scene. The map information of the game scene comprises the coordinates of a plurality of points forming the game scene. The game scene map information can be called by responding to the detected instruction for acquiring the first position information, and the instruction can be generated according to user input or in real time; the map information of the current game scene may also be called up in real time or at intervals. The first position information of the first virtual character refers to coordinates corresponding to a point of the first virtual character in the current game scene when the position of the first virtual character is acquired. The map information of the current game scene may be stored in the server, and when stored in the server, the user terminal may retrieve the game scene map information from the server by transmitting an instruction to retrieve the first location information, which may be generated in real time according to a user input or the user terminal.
And S12, sequentially selecting a plurality of pieces of second position information from the character list recorded with the second position information of each second virtual character in the current game scene according to the position distance between the first position information and each piece of second position information until the number of the selected second position information meets a preset condition, wherein the second virtual character is a player character responding to the operation of the non-target terminal.
In this embodiment, the character list refers to a data set, a folder, or a data package in which second position information of each second virtual character in the current game scene is recorded. The second virtual character refers to a player character responding to a non-target terminal, which refers to a user terminal other than the user terminal to which the user inputs an input operation, i.e., other than one or more user terminals used by the user in the massively multiplayer online role-playing game. The user terminal first obtains or calls a character list recorded with second position information of each second virtual character in the current game scene, wherein the character list can be stored in the server. When the role list is stored in the server, the user terminal may obtain or invoke the role list from the server by sending a relevant instruction, the relevant instruction may be automatically generated by the user terminal, and the content and form of the relevant instruction are not specifically limited. And after the user terminal acquires or calls the role list, sequentially selecting a plurality of second position information from the role list according to the position distance between the first position information and each second position information. The position distance between the first position information and each second position information refers to a distance between the first virtual character and each second virtual character in the current game scene, for example, there are 3 second virtual characters in the current game scene, and the position distances between the first virtual character and the 3 second virtual characters are 2m, 3m, and 1m, where m is a distance unit in the game scene, and m below is the same. The user terminal sequentially selects the second location information according to the location distance, and generally selects the second location information according to the order of the location distance from the first location information, for example, the second location information of the second virtual character with the location distance of 1m is selected first, then the second location information of the second virtual character with the location distance of 2m is selected, and finally the second location information of the second virtual character with the location distance of 3m is selected.
In this embodiment, the number of the second location information selected by the user terminal from the role list needs to satisfy a preset condition. The preset condition refers to the number of the second position information to be selected by the set user terminal, namely the number of the target roles to be drawn and displayed finally by the set user terminal. When the number of the second location information of the second virtual character recorded in the character list is greater than or equal to the number in the preset condition, the user terminal sequentially selects the second location information of the number limited by the preset condition from small to large according to the location distance between each piece of the second location information and the first location information, for example, the second location information of 13 second virtual characters is recorded in the character list, and the number of the second location information to be selected limited in the preset condition is 10, at this time, the user terminal sequentially selects 10 pieces of the second location information from the character list according to the order of the location information from small to large. When the position distances between the second position information of the second virtual roles are the same as the first position information, and if the number of the second position information with the same position distance is all selected to exceed the number limited by the preset condition, the user terminal may randomly select one or more second position information from the second position information with the same position distance until the preset condition is met, for example, 13 second position information are recorded in the role list, the number of the second position information to be selected limited by the preset condition is 10, and after 9 second position information are sequentially selected from the position information from small to large, the remaining 4 second position information are all 10m, and at this time, the user terminal may randomly select one second position information from the 4 second position information to meet the number requirement of 10 limited by the preset condition; the user terminal may also stop selecting 9 second location information. And when the number of the second position information of the second virtual role recorded in the role list is smaller than that in the preset condition, the user terminal sequentially selects the second position information recorded in the role list from small to large according to the position distance between each second position information and the first position information and then stops selecting.
In one embodiment, the character list records corresponding second position information when the second virtual character enters the current game scene.
In this embodiment, the character list may be stored in the server, and when the character list is stored in the user terminal and the server detects that the online second virtual character enters the current game scene, the server obtains second position information of the second virtual character in the current game scene according to the map information corresponding to the current game scene, and further records the second position information corresponding to the second virtual character entering the current game scene.
In this embodiment, a character list stored in the server records position information of each virtual character, where the virtual character includes a first virtual character and a second virtual character, and the position information includes first position information and second position information. The server determines the virtual role logged in by the user terminal as a first virtual role according to the virtual role logged in by the user terminal calling the role list, the current game scene of the first virtual role is the current game scene, and at the moment, the server sends second position information of other virtual roles except the first virtual role in the role list, namely a second virtual role, to the user terminal calling the role list. At this time, when a second virtual character enters the game scene of the first virtual character, the server records the second position information of the second virtual character entering the game scene into the character list called by the user terminal for updating.
In this embodiment, the character list records corresponding second position information when the second virtual character enters the current game scene, so that the character list can be updated in time, and target characters meeting requirements can be accurately drawn and displayed at different times.
In one embodiment, the character list deletes the corresponding second location information when the second virtual character exits the current game scenario.
In this embodiment, the character list may be stored in the server, and when the character list is stored in the user terminal, and the server detects that the online second virtual character exits from the current game scene, the server obtains second position information of the second virtual character in the current game scene according to the map information corresponding to the current game scene, and further deletes the second position information corresponding to the second virtual character exiting from the current game scene.
In this embodiment, a character list stored in the server records position information of each virtual character, where the virtual character includes a first virtual character and a second virtual character, and the position information includes first position information and second position information. The server determines the virtual role logged in by the user terminal as a first virtual role according to the virtual role logged in by the user terminal calling the role list, the current game scene of the first virtual role is the current game scene, and at the moment, the server sends second position information of other virtual roles except the first virtual role in the role list, namely a second virtual role, to the user terminal calling the role list. At this time, when the second virtual character exits from the game scene of the first virtual character, the server deletes the second position information of the exiting second virtual character from the character list called by the user terminal.
In this embodiment, the character list deletes the corresponding second location information when the second virtual character exits from the current game scene, so that the character list can be updated in time, and the target characters meeting the requirements can be accurately drawn and displayed at different times.
And S13, determining a plurality of target characters to be displayed from the second virtual characters according to the selected plurality of second position information.
In the present embodiment, the target character refers to a second virtual character to be displayed on the screen of the user terminal. And the user terminal determines second virtual roles corresponding to the second position information according to the second position information selected from the role list, and then determines a plurality of target roles to be displayed from the second virtual roles. The second virtual role is bound with the second position information and recorded in the role list, the second virtual role can be obtained according to the second position information in the role list, and the binding mode of the second virtual role and the second position information is not specifically limited. Therefore, the user terminal can determine the selected plurality of second virtual characters, namely the target characters, to be displayed on the screen of the user terminal according to the selected plurality of second position information.
And S14, drawing and displaying the target characters.
In this embodiment, the user terminal draws and displays each target character, where the second virtual character includes parameters to be configured by the character, that is, data, such as color, size, and shape of the character, according to which the character is drawn and displayed. Therefore, after the target role, namely the selected second virtual role to be displayed on the screen of the user terminal is determined, the user terminal draws and displays the target role according to the contents to be drawn and displayed, which are contained in the target role.
In one embodiment, drawing and displaying target characters comprises:
acquiring configuration parameters of each target role according to the position distance between the first virtual role and each target role, wherein the configuration parameters are used for drawing the target roles, and the numerical values of the configuration parameters are in inverse proportion to the position distance;
and drawing and displaying each target role according to the configuration parameters of each target role.
In this embodiment, the user terminal obtains the configuration parameters of each target role according to the position distance between the first virtual role and each target role, where a value of the configuration parameter in the target role is inversely proportional to the position distance, that is, the larger the position distance between the second position information of the target role and the first position information of the first virtual role is, the smaller the value of the configuration parameter of the target role is. Each target role has an initial configuration parameter at an initial time, that is, before the position distance between the first virtual role and each target role is obtained, the initial configuration parameter of the target role has a value when the position distance between the first virtual role and each target role is 0. And the user terminal obtains the value of the configuration parameter at the current position distance according to the inverse relation between the position distance of the user terminal and the target role and the value of the configuration parameter of the target role. And drawing and displaying each target role according to the value of the configuration parameter of each target role. The configuration parameters may include a color, a size, a shape, or the like of the target character, which is not limited in this embodiment.
In this embodiment, a configuration parameter in inverse proportion to the position distance of each target character is obtained according to the position distance between the first virtual character and each target character, and each target character is drawn and displayed according to the configuration parameter, so that each target character in the current game scene can be reasonably and clearly displayed.
In one embodiment, the configuration parameters include at least one of chrominance, luminance, and sharpness.
In this embodiment, the chrominance, the luminance and the definition are all used to help the user identify the character, and the aesthetic feeling and the user experience of the game and the character are improved by adjusting the configuration parameters. The chroma can be adjusted by changing three values of the intensity of each component of red, green and blue, the brightness can be adjusted by changing the brightness in the HSV model, and the definition can be adjusted by changing the character resolution. The configuration parameters may include one or more of chrominance, luminance, and sharpness.
In this embodiment, at least one of the chromaticity, the brightness, and the definition is used as a basis for drawing and displaying each target character, so that each target character in the current game scene can be more reasonably and clearly displayed.
In one embodiment, drawing and displaying target characters comprises:
acquiring various components for forming a target role;
carrying out component merging treatment on adjacent components in each component;
and drawing and displaying the target role after the part is combined.
In the embodiment, each target character is composed of a plurality of components, each component has a plurality of modes, and the total number of the components and the number of the modes of each component can be set according to the actual needs of the game. Because the kinds of characters in the game and the image of each kind of characters are fixed in the game, such as hair, face, upper body, lower body, and shoes of the character of the magician. Therefore, a plurality of components forming each target role can be cached in the user terminal or stored in the server for downloading and calling by the user terminal. Therefore, the user terminal can specify the components of each target character after each target character is specified based on the second position information.
In this embodiment, a part merging process is further performed on the parts constituting the character, and all m parts constituting the character can be merged into k integral parts by the part merging process, so that the character after the part merging process is formed by the k integral parts. Wherein, the integral component is formed by combining adjacent components in each component, k is an integer and satisfies the following conditions: k is more than or equal to 1 and less than m, and k can be set by self according to the actual requirement of the game. After the part merging process, the m parts in the constituent roles can be merged into k integral parts, so that the display card can draw the roles after the part merging process in the subsequent steps.
In this embodiment, k may be 1, that is, all m components constituting the role are combined into one integral component. At the moment, the role after the merging processing of the components is an integral part and only consists of one integral component, so that the calculation amount of the display card in the drawing process is greatly reduced, and the drawing speed of the display card on the role is improved. In the above-described part merging process, it is necessary to select adjacent parts necessary for constituting a certain integral part from the m parts constituting the role, and then merge the selected adjacent parts into the integral part. For example, when k > 1, m1(m1 < m) parts are selected from the m parts according to the setting or requirement of the game, the m1 parts are combined into a whole part, then m2(m2 is less than or equal to m-m1) parts are selected from the rest (m-m1) parts, the m2 parts are combined into a whole part, and the like until the m parts are combined into k whole parts; and when k is 1, all m components can be selected and combined into one integral component.
In this embodiment, the grids of the selected components may be merged into a new grid according to the grids of the selected components. Specifically, the vertex and triangle information of the meshes of all the selected parts may be counted and obtained, and then the meshes of the selected parts may be merged into a new mesh by modifying the texture coordinates (i.e., UV coordinates) and the triangle information of the obtained vertices.
And the user terminal performs component merging processing on each component forming the target role, and draws and displays the target role after the component merging processing.
In this embodiment, after the obtained components forming the target role are obtained, the target role after the component merging processing is drawn and displayed by performing the component merging processing on the adjacent components in the components, so that the target role after the component merging processing is formed by fewer components, and therefore, the display card can perform the drawing process for fewer times on the target role order after the component merging processing, thereby greatly reducing the operation amount of the display card GPU in the drawing process, and improving the drawing speed of the display card GPU on the target role.
In one embodiment, the method for displaying the virtual character in the game scene further includes:
obtaining an interaction request initiated to a designated role in each target role;
and according to the interaction request, suspending the drawing and displaying process of each non-specified role except the specified role in each target role.
In this embodiment, the interaction request initiated to the designated role in the target roles may be input by the user through an external device, and the user terminal receives the request. The designated character may be one or more characters, and the interactive request may be content of initiating a challenge, initiating a chat or initiating a transaction in the game, and the form of the interactive request is not particularly limited. The designated role needs to be one or more of the target roles, namely the virtual role which is displayed in the screen and is not manipulated by the user, otherwise, the interaction request cannot be initiated. And the user terminal suspends the drawing and displaying process of each non-specified role according to the received interaction request input by the user and the specified role. The non-designated roles are target roles displayed on the screen, and other target roles except the designated role which initiates the interaction request are excluded, because the requirement for displaying the non-designated roles is low after the user initiates the interaction request to the designated role, namely the non-designated roles do not need to be displayed when the first virtual role interacts with the designated role. The user terminal suspends the process of drawing and displaying the respective non-designated characters. And after the interaction between the first virtual character and the designated character is finished, continuing the drawing and displaying process of each non-designated character.
In the embodiment, the interaction request initiated to the designated role is obtained, and the drawing and displaying processes of other target roles except the designated role are suspended according to the interaction request, so that other target roles do not need to be displayed in the interaction process with the designated role, the interaction effect of the designated role is better displayed, other unnecessary operations are stopped at the same time, and the operation amount of the display card GPU is reduced.
There are many non-player characters (NPCs), i.e. characters that cannot be operated by the player, and the non-player characters are displayed to improve the function of the game and increase the fun of the game, and the first virtual character wants to initiate the interaction with the non-player characters, and usually needs to be located at a short distance from the non-player characters, so that the non-player characters need to be displayed in the screen terminal, but displaying all the non-player characters increases the burden of the display card.
In order to solve the above problem, in one embodiment, after acquiring the first position information of the first virtual character in the current game scene, the method further includes:
determining a target area in the current scene according to the first position information;
and displaying a third virtual character in the target area, wherein the third virtual character is a non-player character.
In this embodiment, the user terminal determines a target area in the current game scene according to the first position information, where the target area refers to an area that is set to have a distance from the position of the first virtual character within a certain range, such as a circular area of 10m centered on the first virtual character, a square area of 20m side length centered on the first virtual character, or a sector area of 10m radius centered on the first virtual character and 90 degrees angle, and so on. The size and shape of the target area may be set by the user or the requirements of the current game scene.
And the user terminal displays a third virtual character in the target area, wherein the third virtual character refers to a non-player character, and the position information of the third virtual character in the current game scene and the content of the character can be cached in the user terminal or stored in a server.
In this embodiment, a target area in the current game scene is determined according to the first position information, and a third virtual character in the target area is displayed, so that part of non-player characters can be displayed, and the operation amount of the display card GPU is reduced as much as possible while the game playability is increased.
In one embodiment, drawing and displaying the third virtual character in the target area includes:
and loading the scene image corresponding to the target area to display the third virtual character in the target area based on the scene image.
In this embodiment, the user terminal loads the scene image corresponding to the target area to display the third virtual character in the target area based on the scene image, that is, the third virtual character in the target area is displayed in the scene image corresponding to the target area, and the third virtual character in the target area is combined with the scene image corresponding to the target area. The image of the current game scene may be cached in the user terminal or stored in the server, and the user terminal loads a portion corresponding to the target area from the image of the current game scene according to the shape and size of the target area. The display of the third avatar in the target area may be performed while the scene image corresponding to the target area is loaded, may be performed before the scene image corresponding to the target area is loaded, or may be performed after the scene image corresponding to the target area is loaded.
In this embodiment, the third virtual character in the target area is displayed based on the loaded scene image corresponding to the target area, so that the non-player character can display in the scene image, and the playability of the game is further increased.
In the above embodiment, the first position information of the first virtual character is acquired, a plurality of pieces of second position information are sequentially selected from the position distance between each piece of second position information and the first position information in the character list in which the second position information of each piece of second virtual character is recorded until the selected number meets a preset condition, and the target character to be displayed is determined according to the selected plurality of pieces of second position information, and is drawn and displayed. In the embodiment, according to the position distance between the second position information of each second virtual character in the current game scene and the first position information of the first virtual character, a plurality of target characters corresponding to a plurality of second position information meeting the preset condition number are selected for drawing and displaying, so that in the game scene with a large number of virtual characters, all the characters do not need to be displayed at the same time, the burden of a display card GPU can be reduced, and the display speed of a terminal screen on the game characters is improved.
In one embodiment, as shown in fig. 3, there is provided a display apparatus for a virtual character in a game scene, including:
the information obtaining module 101 is configured to obtain first position information of a first virtual character in a current game scene, where the first virtual character is a player character that responds to an operation of a target terminal.
The information selecting module 102 is configured to sequentially select a plurality of pieces of second location information from a character list in which second location information of each second virtual character in a current game scene is recorded, according to a location distance between the first location information and each piece of second location information, until the number of the selected plurality of pieces of second location information satisfies a preset condition, where the second virtual character is a player character responding to a non-target terminal operation.
And the role determination module 103 is configured to determine a plurality of target roles to be displayed from the second virtual roles according to the selected plurality of second location information.
And a character display module 104, configured to draw and display each target character.
In one embodiment, the information selecting module 102 is further configured to:
and enabling the character list to record corresponding second position information when the second virtual character enters the current game scene.
In one embodiment, the information selecting module 102 is further configured to:
and enabling the character list to delete the corresponding second position information when the second virtual character exits the current game scene.
In one embodiment, the character display module 104 is further configured to:
acquiring configuration parameters of each target role according to the position distance between the first virtual role and each target role, wherein the configuration parameters are used for drawing the target roles, and the numerical values of the configuration parameters are in inverse proportion to the position distance;
and drawing and displaying each target role according to the configuration parameters of each target role.
In one embodiment, the configuration parameters include at least one of chrominance, luminance, and sharpness.
In one embodiment, the character display module 104 is further configured to:
acquiring various components for forming a target role;
carrying out component merging treatment on adjacent components in each component;
and drawing and displaying the target role after the part is combined.
In one embodiment, the information obtaining module 101 is further configured to:
determining a target area in the current scene according to the first position information;
and displaying a third virtual character in the target area, wherein the third virtual character is a non-player character.
In one embodiment, the information obtaining module 101 is further configured to:
and loading the scene image corresponding to the target area to display the third virtual character in the target area based on the scene image.
In another embodiment, as shown in fig. 4, there is provided a display apparatus of a virtual character in a game scene, including:
the information obtaining module 101 is configured to obtain first position information of a first virtual character in a current game scene, where the first virtual character is a player character that responds to an operation of a target terminal.
The information selecting module 102 is configured to sequentially select a plurality of pieces of second location information from a character list in which second location information of each second virtual character in a current game scene is recorded, according to a location distance between the first location information and each piece of second location information, until the number of the selected plurality of pieces of second location information satisfies a preset condition, where the second virtual character is a player character responding to a non-target terminal operation.
And the role determination module 103 is configured to determine a plurality of target roles to be displayed from the second virtual roles according to the selected plurality of second location information.
And a character display module 104, configured to draw and display each target character.
And the role interaction module 105 is used for acquiring an interaction request initiated to a designated role in each target role, and suspending the drawing and displaying process of each non-designated role except the designated role in each target role according to the interaction request.
In one embodiment, a computer apparatus is provided, as shown in fig. 5, comprising a processor, a memory, a network interface, an input device, and a display screen connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may further store a computer program, which, when executed by the processor, causes the processor to implement a method of displaying a virtual character in a game scene. The internal memory may also store a computer program, and the computer program, when executed by the processor, may cause the processor to perform a method of displaying virtual characters in a game scene. Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the display device of the virtual character in the game scene provided by the present application can be implemented in a form of a computer program, and the computer program can be run on a computer device as shown in fig. 5. The memory of the computer device may store therein various program modules constituting the display means of the virtual character in the game scene. The computer program constituted by the respective program modules causes the processor to execute the steps in the display method of a virtual character in a game scene of the embodiments of the present application described in the present specification.
In one embodiment, a computer-readable storage medium is provided, which stores computer-executable instructions for causing a computer to perform the steps of the method for displaying virtual characters in a game scene as described above. Here, the steps of the display method of the virtual character in the game scene may be the steps in the display method of the virtual character in the game scene of the above embodiments.
The foregoing is a preferred embodiment of the present application, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations are also regarded as the protection scope of the present application.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.

Claims (12)

1. A method for displaying virtual characters in a game scene is characterized by comprising the following steps:
acquiring first position information of a first virtual character in a current game scene, wherein the first virtual character is a player character responding to the operation of a target terminal;
sequentially selecting a plurality of pieces of second position information from a character list in which second position information of each second virtual character in the current game scene is recorded according to the position distance between the first position information and each piece of second position information until the number of the selected second position information meets a preset condition, wherein the second virtual characters are player characters responding to the operation of a non-target terminal;
determining a plurality of target roles to be displayed from each second virtual role according to the selected plurality of second position information;
and drawing and displaying each target role.
2. The method of claim 1, wherein the character list records the corresponding second position information when the second virtual character enters the current game scene.
3. The method of claim 1 or 2, wherein the character list deletes the corresponding second position information when the second virtual character exits from the current game scene.
4. The method of claim 1, wherein the drawing and displaying of each of the target characters comprises:
acquiring configuration parameters of each target role according to the position distance between the first virtual role and each target role, wherein the configuration parameters are used for drawing the target roles, and the numerical values of the configuration parameters are in inverse proportion to the position distance;
and drawing and displaying each target role according to the configuration parameters of each target role.
5. The method of claim 1, wherein the configuration parameters include at least one of chrominance, luminance, and sharpness.
6. The method of claim 1, wherein the drawing and displaying of each of the target characters comprises:
acquiring various components for forming the target role;
performing component merging processing on the adjacent components in each component;
and drawing and displaying the target role after the part is combined.
7. The method of claim 1, further comprising:
acquiring an interaction request initiated to a designated role in the target roles;
and according to the interaction request, suspending the drawing and displaying process of each non-specified role except the specified role in each target role.
8. The method for displaying virtual characters in a game scene according to claim 1, further comprising, after acquiring the first position information of the first virtual character in the current game scene:
determining a target area in the current scene according to the first position information;
and displaying a third virtual character in the target area, wherein the third virtual character is a non-player character.
9. The method for displaying virtual characters in a game scene according to claim 8, wherein drawing and displaying a third virtual character in the target area comprises:
and loading a scene image corresponding to the target area to display a third virtual character in the target area based on the scene image.
10. A display device for a virtual character in a game scene, comprising:
the information acquisition module is used for acquiring first position information of a first virtual character in a current game scene, wherein the first virtual character is a player character responding to the operation of a target terminal;
the information selection module is used for sequentially selecting a plurality of pieces of second position information from a character list in which the second position information of each second virtual character under the current game scene is recorded according to the position distance between the first position information and each piece of second position information until the number of the selected plurality of pieces of second position information meets a preset condition, wherein the second virtual characters are player characters responding to the operation of a non-target terminal;
the role determination module is used for determining a plurality of target roles to be displayed from each second virtual role according to the selected plurality of second position information;
and the role display module is used for drawing and displaying each target role.
11. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the program, implements a method of displaying a virtual character in a game scene according to any one of claims 1 to 9.
12. A computer-readable storage medium, in which a computer program is stored which is adapted to be loaded and executed by a processor to cause a computer device having said processor to carry out the method of any one of claims 1 to 9.
CN202110278182.9A 2021-03-15 2021-03-15 Method and device for displaying virtual characters in game scene and electronic equipment Active CN113069761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110278182.9A CN113069761B (en) 2021-03-15 2021-03-15 Method and device for displaying virtual characters in game scene and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110278182.9A CN113069761B (en) 2021-03-15 2021-03-15 Method and device for displaying virtual characters in game scene and electronic equipment

Publications (2)

Publication Number Publication Date
CN113069761A true CN113069761A (en) 2021-07-06
CN113069761B CN113069761B (en) 2024-03-15

Family

ID=76612720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110278182.9A Active CN113069761B (en) 2021-03-15 2021-03-15 Method and device for displaying virtual characters in game scene and electronic equipment

Country Status (1)

Country Link
CN (1) CN113069761B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113559517A (en) * 2021-07-30 2021-10-29 腾讯科技(深圳)有限公司 Method and device for controlling non-player virtual character, storage medium and electronic equipment
CN113713388A (en) * 2021-09-01 2021-11-30 网易(杭州)网络有限公司 Game data processing method, device, equipment and storage medium
CN113713388B (en) * 2021-09-01 2024-06-04 网易(杭州)网络有限公司 Game data processing method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070206003A1 (en) * 2006-03-01 2007-09-06 Kabushiki Kaisha Square Enix (Also Trading As Square Enix Co., Ltd.) Method, an apparatus and a computer program product for generating an image
CN110404262A (en) * 2019-09-03 2019-11-05 网易(杭州)网络有限公司 Display control method, device, electronic equipment and storage medium in game
CN111741060A (en) * 2020-05-08 2020-10-02 广州三七互娱科技有限公司 Message pushing method and device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070206003A1 (en) * 2006-03-01 2007-09-06 Kabushiki Kaisha Square Enix (Also Trading As Square Enix Co., Ltd.) Method, an apparatus and a computer program product for generating an image
CN110404262A (en) * 2019-09-03 2019-11-05 网易(杭州)网络有限公司 Display control method, device, electronic equipment and storage medium in game
CN111741060A (en) * 2020-05-08 2020-10-02 广州三七互娱科技有限公司 Message pushing method and device, computer equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113559517A (en) * 2021-07-30 2021-10-29 腾讯科技(深圳)有限公司 Method and device for controlling non-player virtual character, storage medium and electronic equipment
CN113559517B (en) * 2021-07-30 2023-07-14 腾讯科技(深圳)有限公司 Control method and device for non-player virtual character, storage medium and electronic equipment
CN113713388A (en) * 2021-09-01 2021-11-30 网易(杭州)网络有限公司 Game data processing method, device, equipment and storage medium
CN113713388B (en) * 2021-09-01 2024-06-04 网易(杭州)网络有限公司 Game data processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113069761B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
WO2022151946A1 (en) Virtual character control method and apparatus, and electronic device, computer-readable storage medium and computer program product
CN110898428A (en) Multi-virtual object interaction method, device, server and storage medium
CN111672111A (en) Interface display method, device, equipment and storage medium
WO2022151795A1 (en) Voting result display method and apparatus, and device, storage medium and program product
JP2023126292A (en) Information display method, device, instrument, and program
WO2022193838A1 (en) Game settlement interface display method and apparatus, device and medium
CN113648650B (en) Interaction method and related device
CN113069761B (en) Method and device for displaying virtual characters in game scene and electronic equipment
US20230088206A1 (en) Method and apparatus for controlling virtual object, device, storage medium, and program product
US20230078340A1 (en) Virtual object control method and apparatus, electronic device, storage medium, and computer program product
CN113181641A (en) Rendering method and device of game role in virtual scene and electronic equipment
CN114307150B (en) Method, device, equipment, medium and program product for interaction between virtual objects
KR20240046595A (en) Avatar control method and apparatus, and devices, storage media and program products
CN113730910A (en) Method and device for processing virtual equipment in game and electronic equipment
KR20190018816A (en) System for controlling skills of online game
US10668384B2 (en) System using rule based techniques for handling gameplay restrictions
CN113181643A (en) Virtual character drawing method and device and electronic equipment
CN113350785A (en) Virtual character rendering method and device and electronic equipment
CN113069765A (en) Game picture rendering method and device and electronic equipment
CN113181644B (en) Game role rendering method and device and electronic equipment
US11413529B2 (en) Game scene display control method and system and storage medium
CN116650957B (en) Game skill animation playing method, equipment and storage medium
WO2023231557A1 (en) Interaction method for virtual objects, apparatus for virtual objects, and device, storage medium and program product
WO2024060879A1 (en) Virtual scene effect display method and apparatus, device, medium and program product
CN112717390A (en) Virtual scene display method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant