Racing car game simulation platform based on game engine technology and game equipment

文档序号:1838131 发布日期:2021-11-16 浏览:16次 中文

阅读说明:本技术 一种基于游戏引擎技术及游戏设备的赛车游戏仿真平台 (Racing car game simulation platform based on game engine technology and game equipment ) 是由 谢晓兰 余友华 常盼 唐毅刚 刘亚荣 于 2021-06-27 设计创作,主要内容包括:本发明公开了一种基于游戏引擎技术及游戏设备的赛车游戏仿真平台。包括数据仓库模块、预处理模块、内部逻辑模块以及页面逻辑模块,其中内部逻辑模块包括:碰撞子模块、材质子模块、场景子模块、渲染子模块,页面逻辑模块包括:操作界面子模块、商城子模块。通过Unity游戏引擎技术、车辆转弯算法、车辆转弯算法、场景优化算法、场景优化算法等实现车辆转弯的真实模拟;实现逼真的场景、灯光、雨滴动态粒子效果;实现图形图像、赛车爆炸动画等方面的真实渲染效果。本发明所述赛车游戏仿真平台在玩家体验时能体现出较为真实的赛车体验,平台稳定性较好,设备接入以及操作较为简单,可通过USB接口外接游戏设备和显示器获得逼近现实的赛车操纵体验。(The invention discloses a racing car game simulation platform based on game engine technology and game equipment. Including data warehouse module, preprocessing module, internal logic module and page logic module, wherein the internal logic module includes: collision submodule piece, material submodule piece, scene submodule piece, render submodule piece, the page logic module includes: an operation interface sub-module and a mall sub-module. The real simulation of the vehicle turning is realized through a Unity game engine technology, a vehicle turning algorithm, a scene optimization algorithm and the like; the vivid scene, light and raindrop dynamic particle effects are realized; and the real rendering effect in the aspects of graphic images, racing car explosion animations and the like is realized. The racing game simulation platform provided by the invention can embody real racing experience when a player experiences, the platform stability is good, the equipment access and operation are simple, and the realistic racing control experience can be obtained by externally connecting game equipment and a display through a USB interface.)

1. A racing game simulation platform based on game engine technology and external game equipment is characterized by comprising a data warehouse module, a preprocessing module, an internal logic module and a page logic module; wherein the internal logic module comprises: a collision submodule, a material submodule, a scene submodule and a rendering submodule; the page logic module comprises: an operation interface sub-module and a mall sub-module; the data warehouse module is connected with the preprocessing module, the preprocessing module is connected with the internal logic module, and the internal logic module is connected with the page logic module; the scene submodule is connected with the rendering submodule in the internal logic module, and the operation interface submodule in the page logic module is connected with the mall submodule;

the data warehouse module is realized based on a data bucket and a data stack in a Unity game engine and is responsible for storing various resources and data in the game in the racing car simulation platform;

the preprocessing module is responsible for reading game data in the data warehouse module and preprocessing the game data, optimizing game resources and configuring the internal environment of the game;

the internal logic module mainly completes the core logic realization of the whole game platform and comprises a collision submodule, a material submodule, a scene submodule and a rendering submodule;

the collision submodule mainly completes turning design of the racing car, collision detection of the racing car and display of collision effects: the turning design of the racing car adopts a vehicle turning algorithm; the collision detection of the racing car adopts a racing car collision detection algorithm; the display of the collision effect is realized by adopting a proper collision animation;

the turning algorithm of the vehicle calculates the turning radius of the racing car according to the turning radius formula of the racing car, and the turning angle of the racing car passing through the turning curve is obtained in real time in a Unity game engine by adopting a C # language, so that the real simulation of the turning of the vehicle is realized; the turn radius of the racing car is the distance of a connecting line between the outer side of a front wheel of the car and two points at the center of a curve, and the turn radius calculation formula of the racing car is as follows:

wherein R is the turning radius of the racing car, R2 is the outer radius of the race track, R1 is the inner radius of the race track, d1 is the length of the racing car, d2 is the width of the racing car, x is the distance from the outermost point of the racing car to the outer edge of the race track when the racing car is in a circle, and y is the distance from the innermost point of the racing car to the inner edge of the race track when the racing car is in a circle;

the racing car collision detection algorithm treats the collision between the player racing car and other objects in the platform into a rectangular collision, wherein the player racing car is a rectangle 1, and the other objects are rectangles 2; the implementation principle of the racing car collision detection algorithm is as follows: whether two rectangles are overlapped is detected, and the specific mathematical treatment is that the relation between the distance and the width of the coordinates of the center points in the x direction and the y direction is compared, namely, the absolute value of the distance between the center points of the two rectangles in the x direction is less than or equal to one half of the sum of the widths of the rectangles, and the absolute value of the distance in the y direction is less than or equal to one half of the sum of the heights of the rectangles, and the mathematical formula is as follows:

the x direction: | (x1+ w1/2) - (x2+ w2/2) | ≦| (w1+ w2)/2| equation (2)

The y direction: | (y1+ h1/2) - (y2+ h2/2) | ≦ l (h1+ h2)/2| equation (3)

Where (x1, y1) is the coordinate parameter of the top left corner of rectangle 1, w1 is the width of rectangle 1, h1 is the height of rectangle 1, (x2, y2) is the coordinate parameter of the top left corner of rectangle 2, w2 is the width of rectangle 2, and h2 is the height of rectangle 2;

the material submodule mainly comprises static materials such as road surfaces, trees, buildings, vehicle appearances and the like and is applied to each game model in the game platform;

the scene submodule adopts a scene optimization algorithm to realize vivid scenes, lamplight, raindrop dynamic particle effects and the like;

the scene optimization algorithm is used for segmenting a scene in a game platform by using an octree data structure, optimizing a scene map by using a Level of Detail (LOD) method, and optimizing the scene by using an improved plane mapping method, so that the game visual effect is ensured, and the optimization complexity is reduced;

the rendering submodule adopts a rendering acceleration algorithm to realize real rendering effects in the aspects of graphic images, illumination particles, racing car explosion animations and the like;

the rendering acceleration algorithm adopts a spatial data structure of a BSP tree, and renders graphic images, illumination particles and racing car explosion animations in a game platform from back to front on a screen by applying an LOD (level of detail) switching and selecting technology;

the page logic module is mainly used for completing interface design and realization of a game platform and comprises a mall submodule and an operation interface submodule;

the mall sub-module, namely a game mall, is used for a player to buy a racing car and upgrade the performance of the racing car, and consists of LOGO pictures of a game operation interface, wherein the LOGO pictures comprise pictures of a brake button, an accelerator button, a turning button and the like;

the operation interface sub-module is a racing car game interface and is composed of LOGO pictures of a game mall interface, wherein the LOGO pictures comprise pictures of game gold coins, racing car models, racing car parts and the like.

2. The gaming environment of embodiments of the present invention includes four components, respectively: the game system comprises a Unity game engine, a racing game simulation platform, game equipment and a display; the Unity game engine is connected with the racing game simulation platform, and the racing game simulation platform is connected with the game equipment and the display;

the Unity game engine is used for developing and manufacturing a racing car game simulation platform;

the racing game simulation platform is based on a game engine technology and game equipment;

the game equipment and the display are external game equipment and are used for connecting a racing car game simulation platform to build an external game environment, and a player performs racing car simulation interaction according to the external game environment;

the specific work flow of the racing game simulation platform is as follows: firstly, game equipment and a display are connected with a racing car game simulation platform through a USB interface, then the platform is started, a data warehouse module transmits various stored game resources and game internal data in the platform to a preprocessing module, and the preprocessing module optimizes the game resources and the data and configures a game internal environment; then the internal logic module starts to work, wherein the collision submodule realizes the turning design of the racing car, the collision detection of a racing workshop and the display of collision effects, the material submodule displays the static material of each game model in the game platform, and the real environment background in the game platform is formed by the interaction of the scene submodule and the rendering submodule; and after the internal logic module operates, the page logic module starts to work, the mall sub-module is used for a player to purchase a racing car and upgrade the performance of the racing car, and the operation interface sub-module is used for the player to perform racing car simulation experience and interaction.

Technical Field

The invention belongs to the field of computer game software development, and particularly relates to a racing car game simulation platform based on a game engine technology and game equipment.

Background

The earliest electronic games for automobiles dates back to 1984, a simulated racing game developed by Konami corporation, road fighters, one of the earliest racing games in the world, in which players driven cars to avoid nearby vehicles and reached a terminal point before fuel was exhausted. With the rapid development of computer technology over time, companies have come to feel the pleasure of driving cars by using game engine technology. The existing common PC-side racing games include 'masterwork aerodyne' and 'horizon line' and the like, the manufacture of the games is mostly based on engines such as cold cream and Chameleon, the games are developed mainly by using languages such as C and C + +, although the story line and entertainment are good, and various sports cars are shaped to be lifelike by means of the powerful computing power of a computer, but the racing games have the following defects:

(1) modeling of game scenes is more and more magic, and the game scenes gradually deviate from the real world;

(2) the vehicle is slightly stiff when passing through a curve, and the fluency is insufficient;

(3) the vehicle collision is not real enough, and the realistic operation needs to be enhanced;

(4) the operation of accessing the external game device is cumbersome.

Therefore, the existing PC-side racing games have some defects in the above aspects, and therefore, it is a need to develop a simulation platform for simulating real racing games. The racing car game simulation platform based on the game engine technology and the game equipment is developed based on a Unity engine and a C # language, and can be externally connected with the game equipment and a display through a USB interface to obtain an approaching-to-reality racing car operation experience.

Disclosure of Invention

The invention aims to provide a racing game simulation platform based on a game engine technology and game equipment, which improves the characteristic of insufficient real operation feeling of the existing PC-side racing game.

The racing game simulation platform comprises a data warehouse module, a preprocessing module, an internal logic module and a page logic module. Wherein the internal logic module comprises: a collision submodule, a material submodule, a scene submodule and a rendering submodule; the page logic module comprises: an operation interface sub-module and a mall sub-module.

The connection relationship between the modules and the sub-modules is as follows: the data warehouse module is connected with the preprocessing module, the preprocessing module is connected with the internal logic module, and the internal logic module is connected with the page logic module; the scene sub-module is connected with the rendering sub-module in the internal logic module, and the operation interface sub-module is connected with the mall sub-module in the page logic module.

The data warehouse module is realized based on a data bucket and a data stack in the Unity game engine and is responsible for storing various resources and data in the game in the racing car simulation platform.

The preprocessing module is responsible for reading the game data in the data warehouse module and preprocessing the game data, optimizing game resources and configuring the internal environment of the game.

The internal logic module mainly completes the core logic realization of the whole game platform, and comprises a collision submodule, a material submodule, a scene submodule and a rendering submodule.

The collision submodule mainly completes turning design of the racing car, collision detection of a racing car and display of collision effects. The turning design of the racing car adopts a vehicle turning algorithm; the collision detection of the racing car adopts a racing car collision detection algorithm; and the display of the collision effect is realized by adopting a proper collision animation.

The material submodule mainly comprises static materials such as pavements, trees, buildings, vehicle appearances and the like and is applied to each game model in the game platform.

The scene submodule adopts a scene optimization algorithm to realize vivid scenes, lamplight, raindrop dynamic particle effects and the like.

The rendering submodule adopts a rendering acceleration algorithm to realize real rendering effects in the aspects of graphic images, illumination particles, racing car explosion animations and the like.

The page logic module is mainly used for completing interface design and realization of a game platform and comprises a mall submodule and an operation interface submodule.

The mall sub-module, namely the game mall, is used for the player to purchase the racing car and upgrade the performance of the racing car.

The operation interface sub-module is a racing game interface and is used for a player to perform racing simulation experience and interaction in a game.

The invention develops and manufactures a racing car game simulation platform based on a Unity engine, and external game equipment and a display are connected to the platform through a USB interface to build an external game environment, so that a player can perform racing car simulation experience.

Compared with the existing racing games, the racing game simulation platform based on the game engine technology and the game equipment has the following advantages:

(1) a scene optimization algorithm is adopted to realize vivid scenes, lamplight, raindrop dynamic particle effects and the like; and a rendering acceleration algorithm is adopted to realize the real rendering effect in the aspects of graphic images, illumination particles, racing car explosion animations and the like.

(2) And calculating the turning radius of the racing car, and adjusting the turning angle of the car in real time by adopting a car turning algorithm to realize real simulation of the turning of the car.

(3) By adopting the vehicle collision detection algorithm, the real vehicle collision is further restored, and a player can obtain more real racing car interaction experience.

(4) The platform stability is better, and equipment access only can be solved through the USB mouth, and the operation is comparatively simple.

Drawings

Fig. 1 is a schematic structural diagram of a racing game simulation platform based on game engine technology and game equipment according to the present invention.

FIG. 2 is a diagram of a gaming environment in accordance with an embodiment of the present invention.

The labels in the figure are: 1. a data warehouse module; 2. a preprocessing module; 3. an internal logic module; 3-1. collision submodule; 3-2, material submodule; 3-3, a scene submodule; 3-4, rendering the submodule; 4. a page logic module; 4-1, operating an interface submodule; 4-2, a mall sub-module; a Unity game engine; 6. a racing game simulation platform; 7. a game device; 8. a display.

Detailed Description

Example (b):

(1) as shown in fig. 1, the present invention provides a racing game simulation platform based on game engine technology and game equipment, which includes 4 main modules and 6 sub-modules, wherein the main modules and the sub-modules are respectively: the system comprises a data warehouse module 1, a preprocessing module 2, an internal logic module 3 and a page logic module 4. Wherein the internal logic module 3 comprises: a collision sub-module 3-1, a material sub-module 3-2, a scene sub-module 3-3 and a rendering sub-module 3-4; the page logic module 4 includes: an operation interface submodule 4-1; mall sub-module 4-2. The data warehouse module 1 is connected with the preprocessing module 2, the preprocessing module 2 is connected with the internal logic module 3, the internal logic module 3 is connected with the page logic module 4, the scene sub-module 3-3 is connected with the rendering sub-module 3-4, and the operation interface sub-module 4-1 is connected with the mall sub-module 4-2.

The data warehouse module 1 is used for storing various resources and data in a game in a racing car simulation platform and is mainly realized based on a data bucket and a data stack in a Unity game engine.

The preprocessing module 2 is mainly used for preprocessing a large amount of input game data and preprocessing the game of the whole racing car game platform. The game preprocessing module receives the game data transmitted from the game data warehouse module 1, optimizes game resources and completes the configuration of the internal environment of the game.

The internal logic module 3 is mainly responsible for completing the core logic realization of the whole game platform and comprises a collision submodule 3-1, a material submodule 3-2, a scene submodule 3-3 and a rendering submodule 3-4.

The collision submodule 3-1 is mainly used for completing turning design of the racing car, collision detection of a racing car and display of collision effects. The turning design of the racing car adopts a vehicle turning algorithm; the collision detection of the racing car adopts a racing car collision detection algorithm; and the display of the collision effect is realized by adopting a proper collision animation.

The turning radius of the racing car is calculated according to the turning radius formula of the racing car by the vehicle turning algorithm, and the turning angle of the racing car passing through the turning curve is obtained in real time by adopting a C # language in a Unity game engine, so that the real simulation of the turning of the vehicle is realized.

The turn radius of the racing car is the distance of a connecting line between the outer side of a front wheel of the car and two points at the center of a curve, and the turn radius calculation formula of the racing car is as follows:

wherein R is the turning radius of the racing car, R2 is the outer radius of the race track, R1 is the inner radius of the race track, d1 is the length of the racing car, d2 is the width of the racing car, x is the distance from the outermost point of the racing car to the outer edge of the race track when the racing car is in a circle, and y is the distance from the innermost point of the racing car to the inner edge of the race track when the racing car is in a circle.

The collision detection algorithm of the racing cars treats the collision between the racing cars of the players and other objects in the platform as rectangular collision, wherein the racing cars of the players are rectangular 1, and the other objects are rectangular 2. The implementation principle of the racing car collision detection algorithm is as follows: whether two rectangles are overlapped is detected, and the specific mathematical treatment is that the relation between the distance and the width of the coordinates of the center points in the x direction and the y direction is compared, namely, the absolute value of the distance between the center points of the two rectangles in the x direction is less than or equal to one half of the sum of the widths of the rectangles, and the absolute value of the distance in the y direction is less than or equal to one half of the sum of the heights of the rectangles, and the mathematical formula is as follows:

the x direction: | (x1+ w1/2) - (x2+ w2/2) | ≦| (w1+ w2)/2| equation (2)

The y direction: | (y1+ h1/2) - (y2+ h2/2) | ≦ l (h1+ h2)/2| equation (3)

Where (x1, y1) is the coordinate parameter of the top left corner of rectangle 1, w1 is the width of rectangle 1, h1 is the height of rectangle 1, (x2, y2) is the coordinate parameter of the top left corner of rectangle 2, w2 is the width of rectangle 2, and h2 is the height of rectangle 2.

The material submodule 3-2 comprises static materials such as road surfaces, trees, buildings, vehicle appearances and the like, is applied to each game model in the game platform, and is manufactured in Photoshop software.

The scene submodule 3-3 adopts a scene optimization algorithm to realize vivid scenes, lamplight, raindrop dynamic particle effects and the like.

The scene optimization algorithm is used for segmenting a scene in a game platform by using an octree data structure, optimizing a scene map by using a Level of Detail (LOD) method, and optimizing the scene by using an improved plane mapping method, so that the game visual effect is ensured, and the optimization complexity is reduced.

The rendering sub-modules 3-4 mainly complete the rendering of the graphic images, the illumination particles, the racing car explosion animations and the like, and are realized by adopting a rendering acceleration algorithm.

The rendering acceleration algorithm adopts a spatial data structure of a BSP tree, and uses LOD (level of detail) switching and selecting technology to render the graphic images, the illumination particles and the racing car explosion animations in the game platform from back to front on a screen.

The page logic module 4 mainly completes the interface design and implementation of the whole game platform, and comprises an operation interface sub-module 4-1 and a mall sub-module 4-2.

The operation interface submodule 4-1 is used for a player to perform good racing experience and interaction in a game, and is composed of LOGO pictures of a game operation interface, wherein the LOGO pictures comprise pictures of a brake button, an accelerator button, a turning button and the like, and the pictures are processed and manufactured in Photoshop software.

The mall submodule 4-2 is used for a player to buy a racing car and upgrade the performance of the racing car, is composed of LOGO pictures of a game mall interface, comprises pictures of game gold coins, a racing car model, parts of the racing car and the like, and is processed and manufactured in Photoshop software.

(2) As shown in FIG. 2, the gaming environment of an embodiment of the present invention includes four components, respectively: unity game engine 5, racing game simulation platform 6, game device 7, display 8. The Unity game engine 5 is connected with the racing game simulation platform 6, and the racing game simulation platform 6 is connected with the game equipment 7 and the display 8.

The Unity game engine 5 is used to develop a production racing game simulation platform 6, the development process being as described above.

The racing game simulation platform 6 is a racing game simulation platform based on game engine technology and game equipment.

The game equipment 7 and the display 8 are external game equipment and are used for connecting the racing game simulation platform 6 to build an external game environment and then used for a player to perform racing simulation interaction.

The specific work flow of the racing game simulation platform 6 is as follows: firstly, game equipment 7 and a display 8 are connected with a racing car game simulation platform 6 through a USB interface, then the platform 6 is started, a data warehouse module 1 transmits various stored game resources and game internal data in the platform to a preprocessing module 2, and the preprocessing module 2 optimizes the game resources and the data and configures a game internal environment. Then the internal logic module 3 starts to work, wherein the collision submodule 3-1 realizes the turning design of the racing car, the collision detection of the racing shop and the display of the collision effect, the material submodule 3-2 displays the static material of each game model in the game platform, and the real environment background in the game platform is formed by the interaction of the scene submodule 3-3 and the rendering submodule 3-4. After the internal logic module 3 operates, the page logic module 4 starts to work, wherein the mall sub-module 4-2 is used for the player to buy the racing car and upgrade the performance of the racing car, and the operation interface sub-module 4-1 is used for the player to perform racing car simulation experience and interaction.

In summary, the invention relates to a racing car game simulation platform based on a game engine technology and game equipment, which adopts a vehicle turning algorithm to adjust the turning angle of a racing car in real time so as to realize real simulation of vehicle turning; a scene optimization algorithm is adopted to realize vivid scene, light and raindrop dynamic particle effects; the real rendering effect in the aspects of graphic images, illumination particles, racing car explosion animations and the like is realized by adopting a rendering acceleration algorithm; the game equipment and the display are connected through the USB interface, so that more real racing car simulation interaction is realized.

The foregoing is only a preferred embodiment of the present invention. The above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same, and the scope of the present invention is not limited to any such changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:游戏数据处理方法、系统、装置、计算机设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类