Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
OpenGL Game Development By Example

You're reading from   OpenGL Game Development By Example Design and code your own 2D and 3D games efficiently using OpenGL and C++

Arrow left icon
Product type Paperback
Published in Mar 2016
Publisher
ISBN-13 9781783288199
Length 340 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Madsen Madsen
Author Profile Icon Madsen
Madsen
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Creation 101


Our first task is to load our world. We need a few basic components. First, we need a universe. This universe will contain stars, asteroids, and our space ship. Open up SpaceRacer3D and let's get coding!

Preparing the project

Before we get going, we will need to move some code over from our 2D project. Copy the following files and settings from RoboRacer2D to SpaceRacer3D:

  1. Copy Input.cpp and Input.h—we will use these classes to handle user input.

  2. Copy Sprite.cpp, Sprite.h, SOIL.h, and SOIL.lib—we will use them to support the user interface in the next chapter. You may need to remove the line #include "stdafx.h" from Sprite.cpp.

  3. Copy fmodex.dll—we need this for audio support.

  4. Copy the settings from the project Configuration Properties/C/C++/General/Additional Include Directories setting—this is necessary to provide access to FMOD library:

  5. Copy the settings from the project Configuration Properties/Linker/Input/ Additional Dependencies setting—this is necessary to provide access to the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images