Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a method for realizing MMO game ground surface applique, which comprises the following steps:
s1, loading preset information;
s2, obtaining role positioning information;
s3, creating a direction model based on the preset information and the positioning information;
s4, acquiring a ground surface model based on the direction model block and the role coordinates;
s5, creating a model to be processed based on the direction model and the earth surface model;
and S6, rendering the model to be processed and generating the applique.
Further, the preset information comprises the applique material and the applique diameter.
Further, the positioning information includes current coordinates and direction vectors of the role.
Further, the direction vector is a vector set of an x-axis, a y-axis, and a z-axis within a three-dimensional coordinate system.
Further, the direction model is a cube created by taking the current coordinates of the character as an origin, taking the direction vector as an orientation and taking the diameter of the applique as a side length.
Further, the earth surface model is based on the current coordinates and the direction model of the role, and earth surface areas intersected with the cube are selected.
Further, the model to be processed is generated by cutting the corresponding earth surface model through six planes of a cube in the direction model.
Furthermore, when the model to be processed is rendered, the applique material preset in the preset information is used.
An apparatus for implementing an MMO game floor decal, comprising:
the loading module is used for loading preset information;
the positioning module is used for acquiring role positioning information;
the direction model creating module is used for creating a direction model;
the earth surface model creating module is used for acquiring an earth surface model;
the model to be processed establishing module is used for establishing a model to be processed; and
and the applique generation module is used for rendering the model to be processed and generating the applique.
A computer-readable storage medium having stored thereon computer instructions, characterized in that the instructions, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 8.
The invention has the beneficial effects that: the indicator marks can be well attached to the earth surface when the indicator marks normally fulfill the function of direction guiding in a game scene, so that a more natural aesthetic effect is displayed, and the game experience of a player is greatly improved.
Detailed Description
It should be recognized that embodiments of the present invention can be realized and implemented in computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The methods may be implemented in a computer program using standard programming techniques, including a non-transitory computer-readable storage medium configured with the computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner, according to the methods and figures described in the detailed description. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose.
Further, the operations of processes described herein can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) collectively executed on one or more processors, by hardware, or combinations thereof. The computer program includes a plurality of instructions executable by one or more processors.
Further, the method may be implemented in any type of computing platform operatively connected to a suitable interface, including but not limited to a personal computer, mini computer, mainframe, workstation, networked or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the invention may be embodied in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optically read and/or write storage medium, RAM, ROM, or the like, such that it may be read by a programmable computer, which when read by the storage medium or device, is operative to configure and operate the computer to perform the procedures described herein. Further, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described herein includes these and other different types of non-transitory computer-readable storage media when such media includes instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. The invention also includes the computer itself when programmed according to the methods and techniques described herein.
A computer program can be applied to input data to perform the functions described herein to transform the input data to generate output data that is stored to non-volatile memory. The output information may also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including particular visual depictions of physical and tangible objects produced on a display.
It is noted that, as used in this disclosure, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Furthermore, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any combination of one or more of the listed items.
It should be understood that the use of any and all examples, or exemplary language ("e.g.," such as, "etc.), provided herein is intended merely to better illuminate embodiments of the invention and does not pose a limitation on the scope of the invention unless otherwise claimed.
Embodiments of the invention will be further described with reference to the accompanying drawings in which:
referring to fig. 1, a general flow chart according to the present invention specifically includes the following steps:
s1, loading preset information; the preset information comprises the applique material and the applique diameter, but the preset information comprises the applique material and the applique diameter, and developers can properly adjust the information needing to be input in advance in due time according to the requirements of actual development and application environments;
s2, acquiring role positioning information; the positioning information comprises current coordinates and direction vectors of the roles; the direction vector is a vector set of an x axis, a y axis and a z axis in a three-dimensional coordinate system, namely the direction of the game role at the moment or the facing direction can be understood, and the direction of the game role or the facing direction is separated to form a vector set of the x axis, the y axis and the z axis in the three-dimensional coordinate system;
s3, creating a direction model based on the preset information and the positioning information; the direction model is a cube created by taking the current coordinates of the role as the origin, taking a direction vector as the direction and taking the diameter of the applique as the side length;
s4, acquiring a ground surface model based on the direction model block and the role coordinates; the earth surface model is based on the current coordinates and direction model of the role, and earth surface areas intersected with the cube are selected;
s5, creating a model to be processed based on the direction model and the earth surface model; the model to be processed is generated by cutting a corresponding earth surface model through six planes of a cube in the direction model;
s6, rendering the model to be processed and generating the applique; and when the model to be processed is rendered, the preset applique material in the preset information is used.
Referring to fig. 2, there is shown a connection diagram of an apparatus according to the present invention, comprising:
the loading module is connected with the direction model creating module to realize interaction and is used for loading preset information;
the positioning module is connected with the direction model creating module to realize interaction and is used for acquiring role positioning information;
the direction model creating module is connected with the earth surface model creating module to realize interaction and is used for creating a direction model;
the earth surface model creating module is connected with the model creating module to be processed to realize interaction and is used for acquiring an earth surface model;
the model to be processed creating module is connected with the generating module to realize interaction and is used for creating a model to be processed; and
and the applique generation module is used for rendering the model to be processed and generating a corresponding applique.
The above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiment, and the present invention shall fall within the protection scope of the present invention as long as the technical effects of the present invention are achieved by the same means. The invention is capable of other modifications and variations in its technical solution and/or its implementation, within the scope of protection of the invention.