CN106582015A - Method and system of implementing 3D effect display in 2D game - Google Patents
Method and system of implementing 3D effect display in 2D game Download PDFInfo
- Publication number
- CN106582015A CN106582015A CN201611052403.6A CN201611052403A CN106582015A CN 106582015 A CN106582015 A CN 106582015A CN 201611052403 A CN201611052403 A CN 201611052403A CN 106582015 A CN106582015 A CN 106582015A
- 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.)
- Granted
Links
- 230000000694 effects Effects 0.000 title claims abstract description 62
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000009471 action Effects 0.000 claims description 30
- 230000008859 change Effects 0.000 claims description 25
- 230000007423 decrease Effects 0.000 claims description 22
- 230000003247 decreasing effect Effects 0.000 claims description 16
- 238000009432 framing Methods 0.000 claims description 13
- 238000003384 imaging method Methods 0.000 claims description 12
- 238000013459 approach Methods 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 10
- 238000006467 substitution reaction Methods 0.000 abstract description 6
- 230000007547 defect Effects 0.000 abstract description 5
- 239000002904 solvent Substances 0.000 description 4
- 230000000007 visual effect Effects 0.000 description 4
- 230000009191 jumping Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/52—Controlling the output signals based on the game progress involving aspects of the displayed game scene
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/52—Controlling the output signals based on the game progress involving aspects of the displayed game scene
- A63F13/525—Changing parameters of virtual cameras
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/55—Controlling game characters or game objects based on the game progress
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/80—Special adaptations for executing a specific game genre or game mode
- A63F13/822—Strategy games; Role-playing games
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features 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/60—Methods for processing data by generating or executing the game program
- A63F2300/66—Methods 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 and system of implementing 3D effect display in a 2D game. The method of implementing 3D effect display in a 2D game includes the steps: setting a virtual camera at the inclined top of a game role and a game scene where the game role is, wherein the level of the ground, represented in the virtual camera, the game role and the game scene can be changeable; finding a view for the game role and the game scene where the game role is through the virtual camera; according to the above content, determining the parts to draw, for the game role and the game scenes, the draw areas of the parts to draw in a game device display unit, and the corresponding image resource; loading the image resource, and successively drawing the game scene and the game role in the corresponding draw area; and when each level changes, redetermining the above content. The invention also provides a system of implementing 3D effect display in a 2D game. The method and system of implementing 3D effect display in a 2D game can overcome the defect that 3D effect is difficult to display in a 2D game, thus greatly improving the life-like degree displayed by game animation effect and increasing the sense of substitution and game experience of a player.
Description
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 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, the game role, the part of the game scene needing to be drawn and the drawing area of the drawing part on the display unit of the game equipment are determined again according to the new framing of the virtual camera, andthe corresponding picture resource;
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, the game role, the part of the game scene needing to be drawn and the drawing area of the drawing part on the display unit of the game equipment are redetermined according to the new framing of the virtual cameraAnd the corresponding picture resources;
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 horizontal height coordinates of the reference ground and the representation ground of the game scene are respectively 0 and Z0The game character is locatedThe horizontal height coordinate is Z, and the horizontal height coordinate where the virtual camera is located 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 (10)
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; 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';
The above-mentionedZ0The 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;
s3 loads the picture resource determined at step S2, and draws a game scene, a game character in turn in the corresponding drawing area determined at step S2 in the game device display unit.
2. A method of enabling the exhibition of a 3D effect in a 2D game according to claim 1,
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; 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.
3. A method of enabling presentation of a 3D effect in a 2D game according to any of claims 1 or 2,
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 increases (or decreases) for a period of time toward the end, Δ H' increases (or decreases) accordingly.
4. A method of enabling the exhibition of a 3D effect in a 2D game according to claim 1,
when the game character is located in the gameThe representation ground of the game scene is that 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.
5. 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.
6. A system for enabling presentation of 3D effects in a 2D game, the system comprising:
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 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, which is expressed according to the terrain of the game sceneSetting;
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;
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.
7. A system for enabling 3D effects presentation in a 2D game according to claim 6,
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; 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.
8. A system for enabling 3D effects presentation in a 2D game according to any of claims 6 or 7,
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 increases (or decreases) for a period of time toward the end, Δ H' increases (or decreases) accordingly.
9. A system for enabling 3D effects presentation in a 2D game according to claim 6,
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.
10. A system for enabling 3D effects presentation in a 2D game according to claim 6,
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.
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 true CN106582015A (en) | 2017-04-26 |
CN106582015B 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) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111514583A (en) * | 2020-04-28 | 2020-08-11 | 网易(杭州)网络有限公司 | Game scene display control method, device, equipment and readable storage medium |
CN111514582A (en) * | 2020-04-28 | 2020-08-11 | 网易(杭州)网络有限公司 | 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)
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 |
-
2016
- 2016-11-24 CN CN201611052403.6A patent/CN106582015B/en active Active
Patent Citations (6)
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 |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111514583A (en) * | 2020-04-28 | 2020-08-11 | 网易(杭州)网络有限公司 | Game scene display control method, device, equipment and readable storage medium |
CN111514582A (en) * | 2020-04-28 | 2020-08-11 | 网易(杭州)网络有限公司 | Method, device and equipment for controlling display of map in game and readable storage medium |
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 |
Also Published As
Publication number | Publication date |
---|---|
CN106582015B (en) | 2020-01-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110465097B (en) | Character vertical drawing display method and device in game, electronic equipment and storage medium | |
CN106582015B (en) | Method and system for realizing 3D effect display in 2D game | |
US11213745B1 (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 | |
CN111614993B (en) | Barrage display method and device, computer equipment and storage medium | |
WO2022000971A1 (en) | Camera movement switching mode method and apparatus, computer program and readable medium | |
CN110800310A (en) | Subtitle processing method and director system for sports game video | |
CN106780674A (en) | Camera lens moving method and device | |
JP2017188002A (en) | Image processing device, image processing system and image processing method | |
WO2020133372A1 (en) | Video subtitle processing method and broadcast direction system | |
CN106028115A (en) | Video playing method and device | |
JP2021023401A (en) | Information processing apparatus, information processing method, and program | |
CN107823881A (en) | Special display effect method and device | |
KR20240038169A (en) | Scene picture display method and device, terminal and storage medium | |
WO2017174006A1 (en) | Image processing method and device | |
CN112843693A (en) | Method and device for shooting image, electronic equipment and storage medium | |
US8727876B2 (en) | Method of image processing and computer-readable recording medium | |
CN110860084B (en) | Virtual picture processing method and device | |
US20040166933A1 (en) | Game apparatus, storage medium and computer program | |
JP2007108876A (en) | Game program and game device | |
CN107320957B (en) | Game interface display method and device | |
CN115830210A (en) | Rendering method and device of virtual object, electronic 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 |