Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

10 days of game engine development

A topic by Aredhele created Aug 04, 2018 Views: 521 Replies: 11
Viewing posts 1 to 4
Submitted (5 edits) (+2)

I had time to work intensively during these 10 days... to create a game engine from scratch. Custom made for the jam.

The engine is for now called "OOM Engine" (OOM stands for "Out Of Memory" ).  This is a 3D game engine made in C++17 with DirectX 9 and OpenGL 3 (not really a cutting edge DX12/Vulkan engine) holding in exactly 350 KB, with all dependencies and without any kind of compression. You can check the sources here.

Implemented features :

  • Import of 3D models from .obj files (OBJ are really easy to read !)
  • JPEG, PNG textures (Supporting both is good because there some cases where one performs better than the other etc.)
  • 3D audio (stereo panning)  .wav and .ogg - ogg is a very good compromise, but libvorbis and libogg have a cost. +100 KB
  • Basic forward rendering pipeline with post-processing (Fog, AA etc.)
  • Working game objects and components 
  • Old school GUI texts using textures instead of font files
  • 3D physics thanks to a really well made and handy physics library
  • Gizmos to debug the engine/game
  • The whole engine is inspired from Unity.


What is not required to run the engine : a virtual machine, an emulator, downloading dependencies when the game starts (that's the case of almost all web browser games)

What is required to run the engine : Windows

Some issues I had :

- Audio...  a real challenge because there are two challenges. How can I play sounds ? Which format for audio files ? The first was the most complicated.

  • I tried with OpenAL -> No, OpenAL is DLL only. That means there is no possible optimization (in size) for the DLL.  If we strip the DLL, the linker will yell for missing symbols, so ... 
  • High level libraries -> No. SDL, SFML etc. have many dependencies (including OpenAL). The problem is still the same.
  • The solution : Using DirectX 9. This dependency (dsound.dll) is Installed on all Windows.
  • For the file format, wav are a way to large.
  •  Ogg files. The best compromise but I had some difficulties to compile libvorbis with libogg.

Some screenshots (placeholders) :

First 3D model import



Grid, Point light and axis gizmos :



Lighting and post processing :



Always better with animations :


3D Sound test :




With sound, better ;) :

And voilà, 5 days and 1 MB available for the game ! 

Submitted(+1)

Wow! The OOM engine looks fantastic! Sort-of reminds me of my N64 days XD

Submitted (1 edit) (+1)

Hey! Thanks!! Yeahh, There are a lot of old school things and we told our 3D artist he only had 300 KB for textures and 3D models x) I think this is the reason why it looks like N64 games ^^

Submitted(+1)

I would’ve paid money to see the look on your artists face the moment he saw how much memory was left.  I couldn’t believe how much memory is used up by most simple audio libraries, let alone 3D!

Submitted(+1)

Ahah and you can't imagine the face of our sound designer when we told him he had 300 KB too (for 16 bit mono ogg sound only)  !
Yes... Audio libraries are heavy and most of them relies on OpenAL under the hood (sometimes DirectX)

Submitted(+1)

Lol! I'm a music/audio guy, and I can imagine XD

Funny, I actually just rewrote my music engine today! Since I'm using .NET Framework, I have access to the wonderful sound of "Console.Beep". It is one instrument, one voice. It is the stuff of dial-up internet dreams 

Submitted (1 edit) (+1)

xD I was tempted to use the Beep function too with this one. But it was limited to one sound at time. If I call the function twice with two different sounds, it will stop the current and start playing the new one... Thanks Windows x) I will play your game for sure!

Submitted

Thanks! And I look forward to checking out your game!

Host(+2)

Awesome!

Submitted

Thanks!

Submitted(+2)

glad to see I wasnt the only one doing a C++ engine from scratch for the compo!

amazing work!

Submitted(+1)

Yeah! Your previous post about your retro 3D engine motivated me a lot ^^