Creating a game using C++, OpenGL and Qt

18
Making a game: Eggerland 3D Motivation - Gain more experience with C/C++, Qt, OpenGL, etc. - Complete my first game using graphics, music and code - To have fun @:) What to show - What is Adventures of Lolo? - Neat tools to make a game

Transcript of Creating a game using C++, OpenGL and Qt

Page 1: Creating a game using C++, OpenGL and Qt

Making a game: Eggerland 3D

Motivation

- Gain more experience with C/C++, Qt, OpenGL, etc.

- Complete my first game using graphics, music and code

- To have fun @:)

What to show

- What is Adventures of Lolo?

- Neat tools to make a game

Page 2: Creating a game using C++, OpenGL and Qt

Adventures of Lolo 1

http://www.youtube.com/watch?v=_Zz5Pnk1Usc

Page 3: Creating a game using C++, OpenGL and Qt

Graphics (3D models) 1/2

Lib3ds

+ GPL

+ Reads 3DS v3 and v4

+ Animation

+ Easy editing with 3ds Max

+ Small in file size (~80kB)

- No morph support for animation

- 3DS is an old format (DOS, 8.3)

Page 4: Creating a game using C++, OpenGL and Qt

Graphics (animation) 2/2

Using OpenGL Display List

1st frame = mesh, materials, etc

[2, *]nd frame = transformation

Page 5: Creating a game using C++, OpenGL and Qt

Music (trackers) 1/4Sound Tracker (Amiga, 80's, commercial)

Fast Tracker (PC, 90's, free)

Renoise (PC/Mac/Linux, 00's, “free”)

Page 6: Creating a game using C++, OpenGL and Qt

Music (Schism Tracker) 2/4

GPL license

Written in SDL (works for many OS's)

Supports MANY module formats

Familiar interface (Impulse/Scream Tracker)

Tracker format (Module)

Sounds exactly the same on all players

Long tunes can be very small in file size!

Page 7: Creating a game using C++, OpenGL and Qt

Music (tracking) 3/4

Pattern editor

Notes

volume

effects (chip-tune arpeggio)

commands...

Sample list

add sounds

edit sounds (looping)

Page 8: Creating a game using C++, OpenGL and Qt

Music (Songs) 4/4Song

Pattern arrangment

Command

Jump to song position

Page 9: Creating a game using C++, OpenGL and Qt

SDL 1/3

● First released in '98. (stable is 1.2.14)● GPL● Crossplatform (Win32, OSX, Linux, PSP, etc.)● Manages video, events, sound, threads,

networking, timers etc.● Very small in file size!

Page 10: Creating a game using C++, OpenGL and Qt

SDL (“standard” libraries) 2/3

SDL (~300 kb)

Main library (BMP, WAV, etc.)

SDL_mixer (~150 kb + mikmod(~200kb) + etc.)

MP3/OGG, modules, MIDI (software wavetable)

SDL_image (~40kB + jpeg(~100kB) + etc.)

JPG, GIF, PNG etc.

SDL_ttf (~20 kB)

TrueType font support

Page 11: Creating a game using C++, OpenGL and Qt

SDL (examples) 3/3

Game engines

ScummVM, DOSBox, ZSNES, etc.

Games

OpenTTD, Frozen Bubble, World of Goo, etc.

Games (Linux only)

Doom 3, Sim City 3000, etc.

Page 12: Creating a game using C++, OpenGL and Qt

Eggerland (Title screen) 1/7

Page 13: Creating a game using C++, OpenGL and Qt

Eggerland (In-game) 2/7

Page 14: Creating a game using C++, OpenGL and Qt

Eggerland (Environment) 3/7- Mountain

- Winter

- Beach

Page 15: Creating a game using C++, OpenGL and Qt

Eggerland (Water) 4/7Perlin Noise

Using 2 octaves

Very realistic!

Page 16: Creating a game using C++, OpenGL and Qt

Eggerland (Editor) 5/7Using Qt

+ Fast and easy to develop tools

+ Easy to read/write data (QDataStream)

- Qt is large in file size

Page 17: Creating a game using C++, OpenGL and Qt

Eggerland (Editor music) 6/7

Using SDL_mixer with mikmod

Using XML to store misc data

Page 18: Creating a game using C++, OpenGL and Qt

Eggerland (Demo) 7/7

...