3D Racing Car Game - Chalmers

[Pages:51]d

3D Racing Car Game

Project Lloyd

Bachelor's Thesis

SVEN ABELSSON RUNING MATHIAS H?LLMAN NICOLE ANDERSSON

SVEN ANDERSSON FREDRIK TOFT RICKARD NILSSON

Department of Computer Science and Engineering CHALMERS UNIVERSITY OF TECHNOLOGY Gothenburg, Sweden, 2009

3D Racing Car Game

2009-05-19

3D Racing Car Game Project Lloyd

Sven Abelsson Runing Sven Andersson Mathias H?llman Fredrik Toft Nicole Andersson Rickard Nilsson

? Sven Abelsson Runing, Sven Andersson, Mathias H?llman, Fredrik Toft, Nicole Andersson, Rickard Nilsson, May 2009. Department of Computer Science and Engineering CHALMERS UNIVERSITY OF TECHNOLOGY SE-412 96 Gothenburg Sweden

2 (51)

3D Racing Car Game

2009-05-19

Abstract

This bachelor thesis describes a case study, where we focusing on developing a 3D racing car game, using a process based upon agile development; an evolutionary development method.

The thesis will cover implementation of real-time graphics, physics engine, network support, as well as sound effects and background music.

In the end, our case study will show that this development process was an appropriate choice for our game development project.

Sammanfattning

Denna slutrapport beskriver en fallstudie gjord p? utvecklingen av ett 3D -bilspel. Utvecklingen anv?nder sig av en process baserad p? agile development, som ?r en metod inom evolutionary development.

Slutrapporten kommer att t?cka implementering av realtidsrenderad grafik, fysikmotor, n?tverksst?d, liksom ljudeffekter och bakgrundsmusik.

I slut?ndan kommer fallstudien att visa att utvecklingsprocessen var ett l?mpligt val f?r v?rt spelutvecklingsprojekt.

3 (51)

3D Racing Car Game

2009-05-19

4 (51)

3D Racing Car Game

2009-05-19

Table of Content

1. INTRODUCTION ....................................................................................................................... 7

2. GAME DESIGN........................................................................................................................... 8 2.1. Game Design and Concepts ................................................................................................ 8 2.1.1. Initial Concept .............................................................................................................. 8 2.1.2. Second Iteration............................................................................................................ 8 2.1.3. Final Concept................................................................................................................ 8 2.2. Development Process .......................................................................................................... 9 What Is a Software Process Model? .................................................................................. 9 The Waterfall Model ........................................................................................................ 10 Component-based Software Engineering........................................................................ 11 Evolutionary Development .............................................................................................. 11 2.2.1. Our Development Process ......................................................................................... 11 Agile Methods................................................................................................................... 12 Milestones ......................................................................................................................... 13 2.3. Game Engine...................................................................................................................... 13 2.3.1. Game Framework ....................................................................................................... 13 Microsoft XNA ................................................................................................................. 13 CodePlex ........................................................................................................................... 14 2.3.2. Physics Engine............................................................................................................ 14 Background ....................................................................................................................... 14 JigLibX.............................................................................................................................. 15 Limitations ........................................................................................................................ 15 2.3.4. Game Assets ............................................................................................................... 17 2.3.4.1. Creation................................................................................................................ 17 2.3.4.2. Result and Discussion ......................................................................................... 18 2.3.4.3. Loading ................................................................................................................ 18 2.3.5. GUI, Menu and HUD ................................................................................................. 19 Background ....................................................................................................................... 19 Results ............................................................................................................................... 20 Discussion ......................................................................................................................... 21

3. GRAPHICS ................................................................................................................................22 3.1. Lights and Rendering ........................................................................................................ 22 3.1.1. Ambient Pass .............................................................................................................. 23 3.1.2. Light Pass.................................................................................................................... 24 3.2. Shadows ............................................................................................................................. 25

5 (51)

3D Racing Car Game

2009-05-19

3.2.1 Shadow Mapping......................................................................................................... 25 3.2.2. Variance Shadow Mapping........................................................................................ 26 3.3. Bump Mapping .................................................................................................................. 27 3.3.1. Techniques .................................................................................................................. 27 3.3.2. Normal Mapping ........................................................................................................ 27 3.3.3. Parallax Mapping ....................................................................................................... 27 3.3.4. Result and Discussion ................................................................................................ 27 3.4. Post-processing Effects ..................................................................................................... 28 3.4.1. Motion Blur ................................................................................................................ 28 3.4.2. Screen-Space Ambient Occlusion ............................................................................. 29 3.4.3. Bloom.......................................................................................................................... 31 3.5. Particle Systems................................................................................................................. 32 3.5.1. Sparks.......................................................................................................................... 33 3.5.2. Sprinkles and Glow .................................................................................................... 34 3.5.3. Smoke.......................................................................................................................... 34 3.6. Result .................................................................................................................................. 35 3.7. Discussion .......................................................................................................................... 36

4. NETWORK ...............................................................................................................................37 4.1. Background ........................................................................................................................ 37 4.2. Results ................................................................................................................................ 38 4.3. Discussion .......................................................................................................................... 42

5. SOUND ......................................................................................................................................42 5.1. Sound Effects ..................................................................................................................... 42 5.2. Background Music............................................................................................................. 43

6. RESULTS ..................................................................................................................................43 6.1. Requirements ..................................................................................................................... 43 6.2. Features .............................................................................................................................. 43 6.3. Time Estimations ............................................................................................................... 44 6.4. The Development Process................................................................................................. 44

7. DISCUSSION ............................................................................................................................45

8. ABBREVIATIONS ...................................................................................................................46

APPENDIX A ................................................................................................................................47

APPENDIX B ................................................................................................................................48

REFERENCES ...............................................................................................................................49

6 (51)

3D Racing Car Game

1. Introduction

Developing software applications is a time-consuming process, and with time-consuming processes come high costs. During the last years, several software development methodologies, often known as agile software development, have become widely used by software developers to address this issue. Many different development methodologies can be more or less good, depending of the task and application type.

One of the software development methodologies is the evolutionary software method, which, as the name hints, takes on an evolutionary approach to the problem, and allows the project to evolve through different stages of the project. Our case study will show how well this evolutionary approach worked on our project where we choose to develop a 3D graphic computer game. Some requirements for the computer game were given from the beginning, such as:

3D graphics ? The game must contain 3D models, and render these in the game. 3D environments were never a requirement, and platform games with 2D environment could still open up for 3D objects.

Impressive result ? The game result must impress whoever plays the game. It should last long, and make the players come back and play it over and over again.

Graphical effects ? To achieve an impressive result, we would need to add modern graphical effects, such as

2009-05-19

real-time rendered soft shadows, motion blur, and ambient occlusion.

Working with these requirements, we decided to use Microsoft XNA as our platform to develop our 3D game with. This decision was made with regard to that the platform had many in-built tools and provided a good framework for us to get started with the development as fast as possible. The fact that Microsoft XNA also used C# as development language was also in consideration, since we wanted to learn this newly developed C-based objectoriented language.

The requirement for the game to contain 3D graphics introduced an interesting challenge for the project group, since all had none or little experience in 3D modelling. Spending time learning how to model proper 3D models for our game was therefore necessary. During the research to find out what 3D modelling program to use, we found that we could use different studios to create models that we could later import to our game project. The complete game contains models made in both Blender and 3D Studio MAX.

With these choices made, we soon had our development environment set to use Microsoft Visual Studio 2008 with Microsoft XNA Game Studio 3.0 supporting the framework, and Blender and 3D Studio MAX for modelling the graphical components. For some of the sound effects we also made use of Adobe Audition 2.0.

7 (51)

3D Racing Car Game

2. Game Design

2.1. Game Design and Concepts

In this project, we were left free to decide what type of game we wanted to develop. The suggestion was that a racing game would be suitable, since such a game usually do not depend on advanced assets, e.g. animated models. After some brainstorming, it was decided that a racing game should be developed. However, there were two different racing game ideas, which will be described below.

In compliance with our development process, the game concept evolved, as more and more features were added. To further explain how the game concept evolved, the development has been divided into three parts.

2.1.1. Initial Concept

Our first concept had a game play similar to Remedy's game in 1996, called Death Rally1, where each player had a car equipped with a weapon, and the goal was to hunt down the opponent's cars. The other idea was to create a simple race track where players could collect coins in order to win. Since the first idea involved much greater work than the latter one, it was decided that the first idea were to be given a low priority, whereas the second were to be given a high priority.

2.1.2. Second Iteration

We decided that a joint solution would be best, where players are able to collect coins and then use the money to make upgrades. Example of upgrades was better weapons, faster engine, and heavier car body. These upgrades would be similar to the concept of

2009-05-19

levelling, something that many players appreciate. It was also decided that the racing track should be a garage or a store-house, filled with containers, boxes, and miscellaneous objects suitable for that environment. Since driving a real car around a garage is virtually impossible, it was decided that we should make remote controlled cars instead.

2.1.3. Final Concept

We kept most of the ideas from the second iteration with one exception for the death rally concept. It appeared that our first instinct, to give this idea a low priority, was right and in this last iteration, the idea was dropped. However, a racing game where players only may collect coins and nothing more, sounded a bit boring. Influenced by games like Super Mario Kart, it was decided that power-ups should be added. There are a number of different power-ups, and they could be divided into two groups; those that affect the car that hit the power-up, and those that affect the opponents' cars. A more profound description of the different power-ups follows.

In addition to the other improvements, one change was made to the points system. It should be possible to collect three types of coins, worth 50, 100 and 200 points.

8 (51)

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download