Direct2D Tutorial 7: Structure of a Game @WhatsACreel
Direct2D Tutorial 7: Structure of a Game  @WhatsACreel
Uploaded March 2015 | Updated September 2026, 2 weeks ago
In this vid we'll look at making the backbone to a working game. In the end it looks exactly the same as last time, but we've now got a way to switch between screens or levels and load and unload resources.

I've been a little reckless with the GameController. At the moment, it changes levels and it deletes the object that calls it before that object has finished running its method. We have to be careful not to do anything after the GameController returns from a call to SwitchLevel. The alternative, and safer thing to do would be to add a "Closing" switch to each level. When the game controller sees that a level is Closing, it could delete the object at a safer time (i.e. not when it's halfway through a method). We might change it in the future if I remember.

Also, calling it a "Singleton" is a little strange, we don't actually make any objects from it. Perhaps "static class" would be a better term.


Become a patron and support What's a Creel programming vids on Patreon:
patreon.com/whatsacreel

FaceBook:
facebook.com/pages/WhatsaCreel/167732956665435
Direct2D Tutorial 7: Structure of a GameWhy is Radix Sort so Fast? Part 1 Why are Comparison Sorts so Slow?What is the Halting Problem?Learn Python Programming 5: Functionsx64 Assembly Tutorial 59: 128bpp Photo Editor Frontend ImogenMatrix Multiplication in C++ (for Neural Networks)Modern x64 Assembly 7: Boolean (Bool) Logical Instructions in x86 x64 8086 ASMAES Encryption 4: Matrix MultiplicationPerformance x64: Caches 1Branchless Programming: Why If is Sloowww... and what we can do about it!PIC Microcontroller Programming - PIC AS Assembler using MPLAB X IDE, Blinking LEDNeural Nets 5: Forward Propagation (Feed Forward)
Creel |

Direct2D Tutorial 7: Structure of a Game

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER