CN106582015B - Method and system for realizing 3D effect display in 2D game - Google Patents

Method and system for realizing 3D effect display in 2D game Download PDF

Info

Publication number
CN106582015B
CN106582015B CN201611052403.6A CN201611052403A CN106582015B CN 106582015 B CN106582015 B CN 106582015B CN 201611052403 A CN201611052403 A CN 201611052403A CN 106582015 B CN106582015 B CN 106582015B
Authority
CN
China
Prior art keywords
game
drawing area
value
scene
role
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.)
Active
Application number
CN201611052403.6A
Other languages
Chinese (zh)
Other versions
CN106582015A (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.)
BEIJING LOCOJOY TECHNOLOGY Co Ltd
Original Assignee
BEIJING LOCOJOY 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 BEIJING LOCOJOY TECHNOLOGY Co Ltd filed Critical BEIJING LOCOJOY TECHNOLOGY Co Ltd
Priority to CN201611052403.6A priority Critical patent/CN106582015B/en
Publication of CN106582015A publication Critical patent/CN106582015A/en
Application granted granted Critical
Publication of CN106582015B publication Critical patent/CN106582015B/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/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
    • A63F13/525Changing parameters of virtual cameras
    • 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
    • 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/80Special adaptations for executing a specific game genre or game mode
    • A63F13/822Strategy games; Role-playing games
    • 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/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a method for realizing 3D effect display in a 2D game, wherein the method comprises the following steps: arranging a virtual camera obliquely above the game role and the game scene where the game role is located, wherein the horizontal height of the virtual camera, the game role and the game scene representation ground is variable, the virtual camera frames the game role and the game scene where the game role is located, and accordingly, the parts of the game role and the game scene needing to be drawn and the drawing parts are determined in the drawing area of the game equipment display unit and the corresponding picture resources; loading the picture resources and drawing a game scene and a game role in the corresponding drawing area in sequence; when the respective levels are changed, the above is redetermined. The invention also provides a system for realizing the 3D effect display in the 2D game. The method and the system overcome the defect that the 3D effect is difficult to show in the 2D game, greatly improve the fidelity of the showing of the animation effect of the game, and enhance the substitution feeling and the game experience of the player.

Description

Method and system for realizing 3D effect display in 2D game
Technical Field
The invention relates to the technical field of game rendering, in particular to a method and a system for realizing 3D effect display in a 2D game.
Background
With the popularity of computers and smart mobile devices, electronic games have become an important way of entertaining people, particularly teenagers. In recent two years, the hardware configuration of the intelligent mobile device is approaching to the traditional PC device, and due to the advantages of portability and the like, the electronic game is led to be changed and exploded again by the mobile game taking the intelligent mobile device as the running device. Among them, 2D games are an early batch of games that are transplanted to smart mobile devices and succeed because of their simple interaction and easy operation.
To improve game playability and player experience, game developers may require games that can play animations of actions of a game character such as walking, running, attacking, executing, jumping, flying, etc. In a 3D game, a game character has not only x-axis and y-axis information (which usually records position information of the game character on a plane for showing movement of the game character, etc.), but also z-axis information (which usually records height information of the game character for showing a change in the height of the game character in a game scene, such as a flying, jumping, etc., of the game character). However, in the current 2D game, the motion animation of the game character is generally implemented by playing a sequence frame animation (each frame of the sequence frame animation can be regarded as being obtained by continuously photographing the motion of the game character through a virtual camera), and since the game character of the 2D game only has information of an x-axis (i.e. left and right, which is generally used for showing that the game character moves left or right in the same plane) and a y-axis (i.e. up and down, which is generally used for showing that the game character moves up or down in the same plane), it is difficult to show the height change of the game character and the effects of scaling, blocking and the like between the game characters and the game scene due to the height change like the 3D game.
Due to the defects, the 2D game can not realize the 3D effect display of game roles, the fidelity of game animation effect display is seriously influenced, and the substitution feeling and game experience of players are greatly weakened.
Disclosure of Invention
The invention aims to realize a 3D effect in a 2D game, and enable a 2D game corner image to show the height change of game characters, the effects of zooming, shielding and the like among the game characters formed by the height change and the game scenes like the 3D game. Currently, in 2D games, especially semi-dive 2D games, the process of implementing animation of game character actions is generally as follows: the method comprises the steps of arranging a virtual camera (in a semi-depression 2D game, the virtual camera is arranged above a game role) which keeps a fixed height at one side of the game role and moves along with the game role in parallel to dynamically frame the game role, the game scene where the game role is located and other game roles in the same scene, determining the parts of the game scene and the game role which need to be drawn and the drawing parts in the drawing area of a game equipment display unit and the picture resources corresponding to the parts according to the virtual camera frame, loading the picture resources and drawing the game scene and the game role in the corresponding drawing area in sequence, and finally realizing the display and playing of game animation. Obviously, the above method cannot achieve the effect intended by the present invention.
In order to solve the above problems, the present invention provides a method for implementing a 3D effect presentation in a 2D game, wherein the method comprises: arranging a virtual camera obliquely above a game role and a game scene where the game role is located, wherein the horizontal heights of the virtual camera, the game role and the representation ground of the game scene are variable, and the virtual camera frames the game role and the game scene where the game role is located, and accordingly, determining the parts of the game role and the game scene needing to be drawn, drawing areas of the drawing parts on a display unit of game equipment and picture resources corresponding to the drawing areas; loading the picture resources and drawing the game scene and the game role in the corresponding drawing area in sequence; when the change occurs, the game role, the part of the game scene needing to be drawn, the drawing area of the drawing part on the display unit of the game equipment and the corresponding picture resource are redetermined. The invention also provides a system for realizing the 3D effect display in the 2D game. The method and the system overcome the defects that the height change of game characters is difficult to show in a semi-depression 2D game, and 3D effects such as scaling and shielding between the game characters and game scenes and between the game characters and the game scenes are formed due to the height change, greatly improve the fidelity of game animation effect display, and enhance the substitution feeling and game experience of players.
The embodiment of the invention provides a method for realizing 3D effect display in a 2D game, which comprises the following steps:
s1, arranging a virtual camera obliquely above the game role and the game scene where the game role is located; wherein, the horizontal height coordinates of the reference ground and the representation ground of the game scene are respectively 0 and Z0The horizontal height coordinate of the game role is Z, the horizontal height coordinate of the virtual camera is Z', Z0Z, Z' is a variable number and Z0≤Z<Z';
Z is0The value is set according to the height of the representation ground, and the height of the representation ground is set according to the height of the terrain representation ground of the game scene;
the Z value is according to the Z0Value and action setting of the game character;
the Z 'value is the sum of the Z value and a vertical distance delta H' between the virtual camera and the game character; the Δ H' changes according to the change process of the Z value;
s2, the virtual camera views the game role and the game scene where the game role is located, and accordingly determines the game role, the part of the game scene needing to be drawn, the drawing area of the drawing part on the display unit of the game equipment and the picture resource corresponding to the drawing area; the drawing area must not exceed the maximum drawing area of the game device display unit; the maximum drawing area is determined by the size of a display unit of the game equipment and preset display parameters;
when the Z value and/or Z0When the value changes, re-determining the game role, the part of the game scene needing to be drawn, the drawing area of the drawing part on the display unit of the game equipment and the corresponding picture resource according to the new framing of the virtual camera;
in particular, the amount of the solvent to be used,
when the game scene is far away from (or close to) the virtual camera, namely the Z' value is increased (or decreased), the viewing range is increased (or decreased), and the original drawing part is proportionally reduced (or increased) in the theoretical drawing area of the display unit of the game device;
further, when the theoretical drawing area of the original drawing part falls on the maximum drawing area of the game device display unit, adding the part which is not drawn in the game scene connected with the theoretical drawing area around the theoretical drawing area until the maximum drawing area is filled up to form a new game scene drawing part, wherein the new game scene drawing part is in the drawing area of the game device display unit, namely the maximum drawing area; the un-drawn part and the original drawn part are reduced in the same proportion in the theoretical drawing area of the game equipment display unit;
when the theoretical drawing area of the original drawing part exceeds the maximum drawing area of the game equipment display unit, cutting off the part exceeding the maximum drawing area, and only keeping the cut part as a new game scene drawing part which is the maximum drawing area in the drawing area of the game equipment display unit;
when the game character is far away from the virtual camera, namely, when the Delta H' is increased, the drawing part of the game character is not changed, and the drawing area of the game character on the display unit of the game device is proportionally reduced;
when the game character approaches to the virtual camera, namely when the delta H' is reduced, the original drawing part of the game character is increased in proportion in the theoretical drawing area of the display unit of the game equipment; if the theoretical drawing area does not exceed the maximum drawing area of the game equipment display unit, the drawing part of the game role is not changed, and the theoretical drawing area is the drawing area of the game role; if the theoretical drawing area exceeds the maximum drawing area of the game equipment display unit, cutting off the part exceeding the maximum drawing area, and only keeping the cut part as a new game role drawing part, wherein the drawing area is the cut drawing area;
s3 loading the picture resources determined in step S2, and drawing the game scene, the game character in the game device display unit in sequence in the corresponding drawing area determined in step S2;
further, when the Z value starts to increase (or decrease) for a certain period of time, Δ H' decreases (or increases) accordingly; when the Z value continuously increases (or decreases), the Δ H' is kept unchanged; when the Z value is increased (or decreased) near the end for a period of time, the Δ H' is correspondingly increased (or decreased); the change of the delta H' can better show the 3D effect of the height change of the game role caused by the action in the 2D game;
further, when the game character is located on the performance ground of the game scene, the Z value is equal to Z0A value;
when the action of the game role is separated from the expression ground of the game scene, the Z value is larger than Z0A value; the difference value delta H between the two is the vertical distance of the action of the game role which is separated from the expression ground of the game scene;
when the action of the game role is separated from the representation ground of the game scene, drawing and playing a shadow effect at the vertical position of the representation ground of the game scene and the game role;
further, when the drawing order of the game role and other game roles in the game scene is determined according to the shielding relation between the game role and other game roles, the game role is drawn in advance in a shielding manner; the shielding relation is determined according to the heights of the two and the height of the virtual camera.
The embodiment of the invention provides a system for realizing 3D effect display in a 2D game, which comprises:
the virtual camera shooting unit is specifically used for arranging a virtual camera obliquely above a game role and a game scene where the game role is located, and framing the game role and the game scene where the game role is located;
a height positioning unit for positioning a reference ground of the game scene and a horizontal height of the presentation ground, the game character, and the virtual camera; wherein the content of the first and second substances,
the horizontal height coordinates of the reference ground and the representation ground of the game scene are respectively 0 and Z0The horizontal height coordinate of the game role is Z, the horizontal height coordinate of the virtual camera is Z', Z0Z, Z' is a variable number and Z0≤Z<Z';
Z is0The value is set according to the height of the representation ground, and the height of the representation ground is set according to the height of the terrain representation ground of the game scene;
the Z value is according to the Z0Value and action setting of the game character;
the Z 'value is the sum of the Z value and a vertical distance delta H' between the virtual camera and the game character; the Δ H' changes according to the change process of the Z value;
the operation unit is used for receiving the height parameter of the height positioning unit, and determining the drawing area of the game role, the part of the game scene needing to be drawn, the drawing part in the display unit of the game equipment and the picture resource corresponding to the drawing part through operation; the realization process is as follows,
determining the game role, the part of the game scene needing to be drawn, the drawing area of the drawing part on a display unit of the game equipment and the picture resource corresponding to the drawing area according to the framing of the virtual camera; the drawing area must not exceed the maximum drawing area of the game device display unit; the maximum drawing area is determined by the size of a display unit of the game equipment and preset display parameters;
when the Z value and/or Z0When the value changes, re-determining the game role, the part of the game scene needing to be drawn, the drawing area of the drawing part on the display unit of the game equipment and the corresponding picture resource according to the new framing of the virtual camera;
in particular, the amount of the solvent to be used,
when the game scene is far away from (or close to) the virtual camera, namely the Z' value is increased (or decreased), the viewing range is increased (or decreased), and the original drawing part is proportionally reduced (or increased) in the theoretical drawing area of the display unit of the game device;
further, when the theoretical drawing area of the original drawing part falls on the maximum drawing area of the game device display unit, adding the part which is not drawn in the game scene connected with the theoretical drawing area around the theoretical drawing area until the maximum drawing area is filled up to form a new game scene drawing part, wherein the new game scene drawing part is in the drawing area of the game device display unit, namely the maximum drawing area; the non-drawn part of the game scene is reduced in the same proportion with the drawn part of the original game scene;
when the theoretical drawing area of the original drawing part exceeds the maximum drawing area of the game equipment display unit, cutting off the part exceeding the maximum drawing area, and only keeping the cut part as a new game scene drawing part which is the maximum drawing area in the drawing area of the game equipment display unit;
when the game character is far away from the virtual camera, namely, when the Delta H' is increased, the drawing part of the game character is not changed, and the drawing area of the game character on the display unit of the game device is proportionally reduced;
when the game character approaches to the virtual camera, namely when the delta H' is reduced, the original drawing part of the game character is increased in proportion in the theoretical drawing area of the display unit of the game equipment; if the theoretical drawing area does not exceed the maximum drawing area of the game equipment display unit, the drawing part of the game role is not changed, and the theoretical drawing area is the drawing area of the game role; if the theoretical drawing area exceeds the maximum drawing area of the game equipment display unit, cutting off the part exceeding the maximum drawing area, and only keeping the cut part as a new game role drawing part, wherein the drawing area is the cut drawing area;
the imaging processing unit is specifically used for loading the picture resources determined by the operation unit and generating imaging signals of a game scene and a game role in a corresponding drawing area;
the display unit is used for receiving the imaging signal of the imaging processing unit and sequentially displaying a game scene and a game role;
further, when the Z value starts to increase (or decrease) for a certain period of time, Δ H' decreases (or increases) accordingly; when the Z value continuously increases (or decreases), the Δ H' is kept unchanged; when the Z value is increased (or decreased) near the end for a period of time, the Δ H' is correspondingly increased (or decreased); the change of the delta H' can better show the 3D effect of the height change of the game role caused by the action in the 2D game;
further, when the game character is located on the performance ground of the game scene, the Z value is equal to Z0A value;
when the action of the game role is separated from the expression ground of the game scene, the Z value is larger than Z0A value; the difference value delta H between the two is the vertical distance of the action of the game role which is separated from the expression ground of the game scene;
when the action of the game role is separated from the representation ground of the game scene, drawing and playing a shadow effect at the vertical position of the representation ground of the game scene and the game role;
further, when the drawing order of the game role and other game roles in the game scene is determined according to the shielding relation between the game role and other game roles, the game role is drawn in advance in a shielding manner; the shielding relation is determined according to the heights of the two and the height of the virtual camera.
The invention provides a method for realizing 3D effect display in a 2D game, wherein the method comprises the following steps: arranging a virtual camera obliquely above a game role and a game scene where the game role is located, wherein the horizontal heights of the virtual camera, the game role and the representation ground of the game scene are variable, and the virtual camera frames the game role and the game scene where the game role is located, and accordingly, determining the parts of the game role and the game scene needing to be drawn, drawing areas of the drawing parts on a display unit of game equipment and picture resources corresponding to the drawing areas; loading the picture resources and drawing the game scene and the game role in the corresponding drawing area in sequence; when the change occurs, the game role, the part of the game scene needing to be drawn, the drawing area of the drawing part on the display unit of the game equipment and the corresponding picture resource are redetermined. The invention also provides a system for realizing the 3D effect display in the 2D game. The method and the system overcome the defects that the height change of game characters is difficult to show in the 2D game, 3D effects such as scaling and shielding between the game characters and game scenes are formed due to the height change, the fidelity of game animation effect display is greatly improved, and the substitution feeling and the game experience of players are enhanced.
Drawings
Fig. 1 is a schematic flowchart of a method for implementing 3D effect display in a 2D game according to embodiment 1 of the present invention;
fig. 2 is a schematic structural diagram of a system for implementing 3D effect display in a 2D game according to embodiment 5 of the present invention.
Detailed Description
In order to make the purpose, technical scheme and beneficial effects obtained by the embodiments of the present invention clearer, the technical scheme in the embodiments of the present invention is clearly and completely described below with reference to the accompanying drawings. It is to be understood that the embodiments described herein are merely illustrative and explanatory of the invention and are not restrictive thereof. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Embodiment 1 of the present invention provides a method for implementing a 3D effect display in a 2D game, as shown in fig. 1, the method includes:
step 101, arranging a virtual camera obliquely above a game role and a game scene where the game role is located; wherein, the horizontal height coordinates of the reference ground and the representation ground of the game scene are respectively 0 and Z0The horizontal height coordinate of the game role is Z, the horizontal height coordinate of the virtual camera is Z', Z0Z, Z' is a variable number and Z0≤Z<Z';
Z is0The value is set according to the height of the representation ground, and the height of the representation ground is set according to the height of the terrain representation ground of the game scene;
the Z value is according to the Z0Value and action setting of the game character;
the Z 'value is the sum of the Z value and a vertical distance delta H' between the virtual camera and the game character; the Δ H' changes according to the change process of the Z value;
102, framing the game role and the game scene where the game role is located by the virtual camera, and accordingly determining the game role, the part of the game scene needing to be drawn, the drawing area of the drawing part on a display unit of the game equipment and the picture resource corresponding to the drawing area; the drawing area must not exceed the maximum drawing area of the game device display unit; the maximum drawing area is determined by the size of a display unit of the game equipment and preset display parameters;
when the Z value and/or Z0When the value changes, re-determining the game role, the part of the game scene needing to be drawn, the drawing area of the drawing part on the display unit of the game equipment and the corresponding picture resource according to the new framing of the virtual camera;
in particular, the amount of the solvent to be used,
when the game scene is far away from the virtual camera, namely the Z' value is increased, the viewing range is increased, and the original drawing part of the game scene is proportionally reduced in the theoretical drawing area of the game device display unit;
further, when the theoretical drawing area of the original drawing part of the game scene falls on the maximum drawing area of the game device display unit, adding the non-drawing part of the game scene connected with the theoretical drawing area around the theoretical drawing area until the maximum drawing area is filled up to form a new game scene drawing part, wherein the new game scene drawing part is in the drawing area of the game device display unit, namely the maximum drawing area; the non-drawn part of the game scene is reduced in the same proportion with the drawn part of the original game scene;
when the game scene is close to the virtual camera, namely the Z' value is reduced, the view finding range is reduced, and the original drawing part of the game scene is increased in proportion in the theoretical drawing area of the game device display unit;
further, when the theoretical drawing area of the original drawing part of the game scene exceeds the maximum drawing area of the game device display unit, cutting off the part exceeding the maximum drawing area, and only keeping the cut part as a new game scene drawing part which is in the drawing area of the game device display unit, namely the maximum drawing area;
when the game character is far away from the virtual camera, namely, when the Delta H' is increased, the drawing part of the game character is not changed, and the drawing area of the game character on the display unit of the game device is proportionally reduced;
when the game character approaches to the virtual camera, namely when the delta H' is reduced, the original drawing part of the game character is increased in proportion in the theoretical drawing area of the display unit of the game equipment; if the theoretical drawing area does not exceed the maximum drawing area of the game equipment display unit, the theoretical drawing area is the drawing area of the game role; if the theoretical drawing area exceeds the maximum drawing area of the game equipment display unit, cutting off the part exceeding the maximum drawing area, and only keeping the cut part as a new game role drawing part, wherein the drawing area is the cut drawing area;
in step 103, the picture resource determined in step 102 is loaded, and the game scene and the game character are drawn in the corresponding drawing area determined in step S2 in the game device display unit in sequence.
Embodiment 2 of the present invention provides a method for realizing 3D effect display in a 2D game, which comprises, on the basis of embodiment 1,
when the Z value begins to increase (or decrease) for a period of time, the Δ H' correspondingly decreases (or increases); when the Z value continuously increases (or decreases), the Δ H' is kept unchanged; when the Z value is increased (or decreased) near the end for a period of time, the Δ H' is correspondingly increased (or decreased);
for example, when the game character starts to take off, the distance between the game character and the virtual camera is firstly reduced so as to provide visual effect brought to people at the take-off moment, and when the game character approaches to the parallel flight track (namely the Z value is close to ending to increasing), the virtual camera is continuously lifted so as to recover the effect that the game character displays the conventional size in the screen; the game role landing is the same;
for example, when the game role jumps up, the distance between the game role and the virtual camera is firstly reduced so as to provide visual effect brought to people at the jump up moment, when the game role approaches to the highest point (namely the Z value is close to and ends to increase), the virtual camera is continuously lifted, the increased display of the game role at the jump up moment is buffered, and the effect that the game role displays the conventional size in the screen is gradually recovered; the game role falls in the same way;
the change of the delta H' can better show the 3D effect that the height of the game character is changed due to the action in the 2D game.
Embodiment 3 of the present invention provides a method for realizing 3D effect display in a 2D game, which comprises, on the basis of embodiment 1,
when the game character is located on the performance ground of the game scene, the Z value is equal to Z0A value;
when the action of the game role is separated from the expression ground of the game scene, the Z value is larger than Z0A value; the difference value delta H between the two is the vertical distance of the action of the game role which is separated from the expression ground of the game scene;
further, when the action of the game character is deviated from the game scene representation ground, a shadow effect is drawn and played at a position perpendicular to the game scene representation ground and the game character.
Embodiment 4 of the present invention provides a method for realizing 3D effect display in a 2D game, which comprises, on the basis of embodiment 1,
when the drawing order of the game role and other game roles in the game scene is determined according to the shielding relation between the game role and other game roles, the game role is drawn in advance in a shielding manner; the shielding relation is determined according to the heights of the two and the height of the virtual camera.
Embodiment 5 of the present invention provides a system for implementing a 3D effect display in a 2D game, as shown in fig. 2, the system includes:
a virtual camera unit 201, specifically, a virtual camera is arranged obliquely above a game character and a game scene where the game character is located, and is used for framing the game character and the game scene where the game character is located;
a height positioning unit 202 for positioning a reference ground of the game scene and a horizontal height of the presentation ground, the game character, and the virtual camera; wherein the content of the first and second substances,
the horizontal height coordinates of the reference ground and the representation ground of the game scene are respectively 0 and Z0The horizontal height coordinate of the game role is Z, the horizontal height coordinate of the virtual camera is Z', Z0Z, Z' is a variable number and Z0≤Z<Z';
Z is0The value is set according to the height of the representation ground, and the height of the representation ground is set according to the height of the terrain representation ground of the game scene;
the Z value is according to the Z0Value and action setting of the game character;
the Z 'value is the sum of the Z value and a vertical distance delta H' between the virtual camera and the game character; the Δ H' changes according to the change process of the Z value;
the operation unit 203 receives the height parameter of the height positioning unit, and determines the drawing area of the game role, the part of the game scene needing to be drawn, the drawing part on the display unit of the game equipment and the picture resource corresponding to the drawing part through operation; the realization process is as follows,
determining the game role, the part of the game scene needing to be drawn, the drawing area of the drawing part on a display unit of the game equipment and the picture resource corresponding to the drawing area according to the framing of the virtual camera; the drawing area must not exceed the maximum drawing area of the game device display unit; the maximum drawing area is determined by the size of a display unit of the game equipment and preset display parameters;
when the Z value and/or Z0When the value changes, re-determining the game role, the part of the game scene needing to be drawn, the drawing area of the drawing part on the display unit of the game equipment and the corresponding picture resource according to the new framing of the virtual camera;
in particular, the amount of the solvent to be used,
when the game scene is far away from the virtual camera, namely the Z' value is increased, the viewing range is increased, and the original drawing part of the game scene is proportionally reduced in the theoretical drawing area of the game device display unit;
further, when the theoretical drawing area of the original drawing part of the game scene falls on the maximum drawing area of the game device display unit, adding the non-drawing part of the game scene connected with the theoretical drawing area around the theoretical drawing area until the maximum drawing area is filled up to form a new game scene drawing part, wherein the new game scene drawing part is in the drawing area of the game device display unit, namely the maximum drawing area; the non-drawn part of the game scene is reduced in the same proportion with the drawn part of the original game scene;
when the game scene is close to the virtual camera, namely the Z' value is reduced, the view finding range is reduced, and the original drawing part of the game scene is increased in proportion in the theoretical drawing area of the game device display unit;
further, when the theoretical drawing area of the original drawing part of the game scene exceeds the maximum drawing area of the game device display unit, cutting off the part exceeding the maximum drawing area, and only keeping the cut part as a new game scene drawing part which is in the drawing area of the game device display unit, namely the maximum drawing area;
when the game character is far away from the virtual camera, namely, when the Delta H' is increased, the drawing part of the game character is not changed, and the drawing area of the game character on the display unit of the game device is proportionally reduced;
when the game character approaches to the virtual camera, namely when the delta H' is reduced, the original drawing part of the game character is increased in proportion in the theoretical drawing area of the display unit of the game equipment; if the theoretical drawing area does not exceed the maximum drawing area of the game equipment display unit, the theoretical drawing area is the drawing area of the game role; if the theoretical drawing area exceeds the maximum drawing area of the game equipment display unit, cutting off the part exceeding the maximum drawing area, and only keeping the cut part as a new game role drawing part, wherein the drawing area is the cut drawing area;
the imaging processing unit 204 is specifically configured to load the picture resource determined by the arithmetic unit, and generate imaging signals of a game scene and a game role in a corresponding drawing area;
the display unit 205 specifically receives the imaging signal of the imaging processing unit, and sequentially displays a game scene and a game character.
Embodiment 6 of the present invention provides a system for realizing 3D effect display in a 2D game, which, on the basis of embodiment 5,
when the Z value begins to increase (or decrease) for a period of time, the Δ H' correspondingly decreases (or increases); when the Z value continuously increases (or decreases), the Δ H' is kept unchanged; when the Z value is increased (or decreased) near the end for a period of time, the Δ H' is correspondingly increased (or decreased);
for example, when the game character starts to take off, the distance between the game character and the virtual camera is firstly reduced so as to provide visual effect brought to people at the take-off moment, and when the game character approaches to the parallel flight track (namely the Z value is close to ending to increasing), the virtual camera is continuously lifted so as to recover the effect that the game character displays the conventional size in the screen; the game role landing is the same;
for example, when the game role jumps up, the distance between the game role and the virtual camera is firstly reduced so as to provide visual effect brought to people at the jump up moment, when the game role approaches to the highest point (namely the Z value is close to and ends to increase), the virtual camera is continuously lifted, the increased display of the game role at the jump up moment is buffered, and the effect that the game role displays the conventional size in the screen is gradually recovered; the game role falls in the same way;
the change of the delta H' can better show the 3D effect that the height of the game character is changed due to the action in the 2D game.
Embodiment 7 of the present invention provides a system for realizing 3D effect display in a 2D game, which, on the basis of embodiment 5,
when the game character is located on the performance ground of the game scene, the Z value is equal to Z0A value;
when the action of the game role is separated from the expression ground of the game scene, the Z value is larger than Z0A value; the difference value delta H between the two is the vertical distance of the action of the game role which is separated from the expression ground of the game scene;
further, when the action of the game character is deviated from the game scene representation ground, a shadow effect is drawn and played at a position perpendicular to the game scene representation ground and the game character.
Embodiment 8 of the present invention provides a system for realizing 3D effect display in a 2D game, which, on the basis of embodiment 5,
when the drawing order of the game role and other game roles in the game scene is determined according to the shielding relation between the game role and other game roles, the game role is drawn in advance in a shielding manner; the shielding relation is determined according to the heights of the two and the height of the virtual camera.
The method and the system for realizing 3D effect display in the 2D game overcome the defects that the height change of game characters is difficult to display in a semi-depression 2D game, the 3D effects such as scaling and shielding between the game characters and game scenes are formed due to the height change, the fidelity of game animation effect display is greatly improved, and the substitution feeling and the game experience of players are enhanced.
Finally, it should be noted that: the above examples are only for illustrating the technical solutions of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for enabling 3D effects to be exhibited in a 2D game, the method comprising:
s1, arranging a virtual camera obliquely above the game role and the game scene where the game role is located;
defining: the horizontal height coordinate where the virtual camera is located is Z';
the horizontal height coordinates of the reference ground and the representation ground of the game scene are respectively 0 and Z0
The horizontal height coordinate of the game role is Z;
Z0z, Z' is a variable number and Z0≤Z<Z';
Wherein, Z is0The value is set according to the height of the representation ground, and the height of the representation ground is set according to the height of the terrain representation ground of the game scene;
the Z value is according to the Z0Value and action setting of the game character;
the Z 'value is set to the sum of the Z value and a vertical distance Δ H' between the virtual camera and the game character;
the value of the delta H' is changed according to the change process of the value of the Z value;
s2 the virtual camera views the game character and the game scene where the game character is located, and accordingly determines the part of the game character, the part of the game scene that needs to be drawn, the drawing area of the game device display unit where the drawing part will be drawn, and the picture resource corresponding to the drawing area:
the value of Z and/or Z0When the value changes, re-determining the game role, the part of the game scene needing to be drawn, the drawing area of the drawing part on the display unit of the game equipment and the corresponding picture resource according to the new framing of the virtual camera:
when the game scene is far away from/close to the virtual camera, the viewing range is correspondingly increased/decreased, and the original drawing part is correspondingly scaled down/increased in the theoretical drawing area of the game device display unit;
when the theoretical drawing area of the original drawing part falls in the maximum drawing area of the game equipment display unit, adding the part which is not drawn in the game scene and is connected with the theoretical drawing area around the theoretical drawing area until the maximum drawing area is filled up to form a new game scene drawing part, wherein the new game scene drawing part is in the drawing area of the game equipment display unit, namely the maximum drawing area; when the theoretical drawing area of the original drawing part exceeds the maximum drawing area of the game equipment display unit, cutting off the part exceeding the maximum drawing area, and only keeping the cut part as a new game scene drawing part which is the maximum drawing area in the drawing area of the game equipment display unit;
when the game character is far away from the virtual camera, namely, when the Delta H' is increased, the drawing part of the game character is not changed, and the drawing area of the game character on the display unit of the game device is proportionally reduced;
when the game character approaches to the virtual camera, namely when the delta H' is reduced, the original drawing part of the game character is increased in proportion in the theoretical drawing area of the display unit of the game equipment; if the theoretical drawing area does not exceed the maximum drawing area of the game equipment display unit, the drawing part of the game role is not changed, and the theoretical drawing area is the drawing area of the game role; if the theoretical drawing area exceeds the maximum drawing area of the game equipment display unit, cutting off the part exceeding the maximum drawing area, and only keeping the cut part as a new game role drawing part, wherein the drawing area is the cut drawing area;
s3 loads the picture resource determined in step S2, and draws a game scene, a game character in the game device display unit in turn in the corresponding drawing area determined in step S2.
2. A method of enabling the exhibition of a 3D effect in a 2D game according to claim 1,
when the Z value starts to increase/decrease for a period of time, the Δ H' is correspondingly decreased/increased; when the Z value continues to increase/decrease, the Δ H' is kept unchanged; when the Z value is close to the increasing/decreasing ending time, the Δ H' is increased/decreased correspondingly.
3. A method of enabling the exhibition of a 3D effect in a 2D game according to claim 1,
when the game character is located on the performance ground of the game scene, the Z value is equal to Z0A value;
when the action of the game role is separated from the expression ground of the game scene, the Z value is larger than Z0A value; the difference value delta H between the two is the vertical distance of the action of the game role which is separated from the expression ground of the game scene;
when the action of the game character is separated from the representation ground of the game scene, the shadow effect is drawn and played at the vertical position of the representation ground of the game scene and the game character.
4. A method of enabling the exhibition of a 3D effect in a 2D game according to claim 1,
when the drawing order of the game role and other game roles in the game scene is determined according to the shielding relation between the game role and other game roles, the game role is drawn in advance in a shielding manner; the shielding relation is determined according to the heights of the two and the height of the virtual camera.
5. A system for enabling presentation of 3D effects in a 2D game, the system comprising:
the virtual camera shooting unit is specifically used for setting a virtual camera obliquely above a game role and a game scene where the game role is located, and the virtual camera is used for framing the game role and the game scene where the game role is located.
A height positioning unit for positioning a reference ground of the game scene and a horizontal height of the presentation ground, the game character, and the virtual camera; wherein the content of the first and second substances,
the horizontal height coordinates of the reference ground and the representation ground of the game scene are respectively 0 and Z0The horizontal height coordinate of the game role is Z, the horizontal height coordinate of the virtual camera is Z', Z0Z, Z' is a variable number and Z0≤Z<Z';
Z is0The value is set according to the height of the representation ground, and the height of the representation ground is set according to the height of the terrain representation ground of the game scene;
the Z value is according to the Z0Value and action setting of the game character;
the Z 'value is the sum of the Z value and a vertical distance delta H' between the virtual camera and the game character; the Δ H' changes according to the change process of the Z value;
the operation unit is used for receiving the height parameter of the height positioning unit, and determining the drawing area of the game role, the part of the game scene needing to be drawn, the drawing part in the display unit of the game equipment and the picture resource corresponding to the drawing part through operation; the realization process is as follows,
determining the game role, the part of the game scene needing to be drawn, the drawing area of the drawing part on a display unit of the game equipment and the picture resource corresponding to the drawing area according to the framing of the virtual camera; the drawing area must not exceed the maximum drawing area of the game device display unit; the maximum drawing area is determined by the size of a display unit of the game equipment and preset display parameters;
when the Z value and/or Z0Upon a change in value, re-determining from a new view of the virtual cameraThe game role, the part of the game scene needing to be drawn, the drawing part in the drawing area of the game equipment display unit and the corresponding picture resource;
the imaging processing unit is specifically used for loading the picture resources determined by the operation unit and generating imaging signals of a game scene and a game role in a corresponding drawing area;
and the display unit is used for receiving the imaging signal of the imaging processing unit and sequentially displaying a game scene and a game role.
6. A system for enabling 3D effects presentation in a 2D game according to claim 5,
when the game scene is far away from/close to the virtual camera, namely the Z' value is increased/decreased, the viewing range is increased/decreased, and the original drawing part is proportionally reduced/increased in the theoretical drawing area of the game device display unit;
further, when the theoretical drawing area of the original drawing part falls on the maximum drawing area of the game device display unit, adding the part which is not drawn in the game scene connected with the theoretical drawing area around the theoretical drawing area until the maximum drawing area is filled up to form a new game scene drawing part, wherein the new game scene drawing part is in the drawing area of the game device display unit, namely the maximum drawing area; when the theoretical drawing area of the original drawing part exceeds the maximum drawing area of the game equipment display unit, cutting off the part exceeding the maximum drawing area, and only keeping the cut part as a new game scene drawing part which is the maximum drawing area in the drawing area of the game equipment display unit;
when the game character is far away from the virtual camera, namely, when the Delta H' is increased, the drawing part of the game character is not changed, and the drawing area of the game character on the display unit of the game device is proportionally reduced;
when the game character approaches to the virtual camera, namely when the delta H' is reduced, the original drawing part of the game character is increased in proportion in the theoretical drawing area of the display unit of the game equipment; if the theoretical drawing area does not exceed the maximum drawing area of the game equipment display unit, the drawing part of the game role is not changed, and the theoretical drawing area is the drawing area of the game role; if the theoretical drawing area exceeds the maximum drawing area of the game equipment display unit, cutting off the part exceeding the maximum drawing area, and only keeping the cut part as a new game role drawing part, wherein the drawing area is the cut drawing area.
7. A system for enabling 3D effects presentation in a 2D game according to any of claims 5 or 6,
when the Z value starts to increase/decrease for a period of time, the Δ H' is correspondingly decreased/increased; when the Z value continues to increase/decrease, the Δ H' is kept unchanged; when the Z value is close to the increasing/decreasing ending time, the Δ H' is increased/decreased correspondingly.
8. A system for enabling 3D effects presentation in a 2D game according to claim 5,
when the game character is located on the performance ground of the game scene, the Z value is equal to Z0A value;
when the action of the game role is separated from the expression ground of the game scene, the Z value is larger than Z0A value; the difference value delta H between the two is the vertical distance of the action of the game role which is separated from the expression ground of the game scene;
when the action of the game character is separated from the representation ground of the game scene, the shadow effect is drawn and played at the vertical position of the representation ground of the game scene and the game character.
9. A system for enabling 3D effects presentation in a 2D game according to claim 5,
when the drawing order of the game role and other game roles in the game scene is determined according to the shielding relation between the game role and other game roles, the game role is drawn in advance in a shielding manner; the shielding relation is determined according to the heights of the two and the height of the virtual camera.
CN201611052403.6A 2016-11-24 2016-11-24 Method and system for realizing 3D effect display in 2D game Active CN106582015B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611052403.6A CN106582015B (en) 2016-11-24 2016-11-24 Method and system for realizing 3D effect display in 2D game

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611052403.6A CN106582015B (en) 2016-11-24 2016-11-24 Method and system for realizing 3D effect display in 2D game

Publications (2)

Publication Number Publication Date
CN106582015A CN106582015A (en) 2017-04-26
CN106582015B true CN106582015B (en) 2020-01-07

Family

ID=58593242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611052403.6A Active CN106582015B (en) 2016-11-24 2016-11-24 Method and system for realizing 3D effect display in 2D game

Country Status (1)

Country Link
CN (1) CN106582015B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111514583B (en) * 2020-04-28 2023-08-25 网易(杭州)网络有限公司 Game scene display control method, device, equipment and readable storage medium
CN111514582B (en) * 2020-04-28 2023-09-12 网易(杭州)网络有限公司 Method, device and equipment for controlling display of map in game and readable storage medium
CN112870698A (en) * 2021-02-26 2021-06-01 网易(杭州)网络有限公司 Target game scene generation method and device, storage medium and electronic equipment
CN113413593A (en) * 2021-07-20 2021-09-21 网易(杭州)网络有限公司 Game picture display method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521520A (en) * 2011-12-22 2012-06-27 北京像素软件科技股份有限公司 Camera control method applied into 3D (three-dimensional) online games
CN103402106A (en) * 2013-07-25 2013-11-20 青岛海信电器股份有限公司 Method and device for displaying three-dimensional image
CN104380338A (en) * 2012-05-22 2015-02-25 索尼电脑娱乐公司 Information processing device and information processing method
CN104740874A (en) * 2015-03-26 2015-07-01 广州博冠信息科技有限公司 Method and system for playing videos in two-dimension game scene
WO2015164155A1 (en) * 2014-04-24 2015-10-29 Microsoft Technology Licensing, Llc Artist-directed volumetric dynamic virtual cameras
CN105389848A (en) * 2015-11-06 2016-03-09 网易(杭州)网络有限公司 Drawing system and method of 3D scene, and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521520A (en) * 2011-12-22 2012-06-27 北京像素软件科技股份有限公司 Camera control method applied into 3D (three-dimensional) online games
CN104380338A (en) * 2012-05-22 2015-02-25 索尼电脑娱乐公司 Information processing device and information processing method
CN103402106A (en) * 2013-07-25 2013-11-20 青岛海信电器股份有限公司 Method and device for displaying three-dimensional image
WO2015164155A1 (en) * 2014-04-24 2015-10-29 Microsoft Technology Licensing, Llc Artist-directed volumetric dynamic virtual cameras
CN104740874A (en) * 2015-03-26 2015-07-01 广州博冠信息科技有限公司 Method and system for playing videos in two-dimension game scene
CN105389848A (en) * 2015-11-06 2016-03-09 网易(杭州)网络有限公司 Drawing system and method of 3D scene, and terminal

Also Published As

Publication number Publication date
CN106582015A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
CN106582015B (en) Method and system for realizing 3D effect display in 2D game
US11565178B2 (en) User interface rendering and post processing during video game streaming
US10537799B1 (en) User interface rendering and post processing during video game streaming
JP3733587B2 (en) INPUT DEVICE AND METHOD FOR PROVIDING SIGNALS AFFECTING TRANSLATION AND ROTATION OF OBJECTS ON DISPLAY IMAGE
CN106730815B (en) Somatosensory interaction method and system easy to realize
GB2507314A (en) Augmented reality using an image mask
US20120264514A1 (en) Electronic device and three-dimensional effect simulation method
CN106780674B (en) Lens moving method and device
CN110800310A (en) Subtitle processing method and director system for sports game video
CN110795056B (en) Method, device, terminal and storage medium for adjusting display parameters
CN111614993B (en) Barrage display method and device, computer equipment and storage medium
JP2020523691A (en) Delayed lighting optimization, foveal adaptation of particles, and simulation model in foveal rendering system
US10839587B2 (en) Image processing methods and devices for moving a target object by using a target ripple
CN109933383A (en) Adjust the method and apparatus of game APP operation frame per second
CN112843693A (en) Method and device for shooting image, electronic equipment and storage medium
US6982717B2 (en) Game apparatus, storage medium and computer program
US10888784B2 (en) Control of player character with enhanced motion functionality
US20120190447A1 (en) Method of image processing and computer-readable recording medium
KR20240038169A (en) Scene picture display method and device, terminal and storage medium
CN115830210A (en) Rendering method and device of virtual object, electronic equipment and storage medium
CN115708956A (en) Game picture updating method and device, computer equipment and medium
CN110860084B (en) Virtual picture processing method and device
US20120322551A1 (en) Motion Detection Method, Program and Gaming System
CN117555256B (en) Flight cinema film-viewing control method and flight cinema control system
CN117504282B (en) Control method and system of AR wearing equipment

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