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
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






![AES Encryption 4: Matrix Multiplication
This is a short vid which shows the code for the matrix multiplication for the MixColumns step. I initially intended to make this vid and the previous AES one around the same length, but we actually covered almost everything in the previous vid!
Mix Columns Wikipedia Page:
https://en.wikipedia.org/wiki/Rijndael_mix_columns
Code for dot products:
tmp[0] = (unsigned char)(mul2[state[0]] ^ mul3[state[1]] ^ state[2] ^ state[3]);
tmp[1] = (unsigned char)(state[0] ^ mul2[state[1]] ^ mul3[state[2]] ^ state[3]);
tmp[2] = (unsigned char)(state[0] ^ state[1] ^ mul2[state[2]] ^ mul3[state[3]]);
tmp[3] = (unsigned char)(mul3[state[0]] ^ state[1] ^ state[2] ^ mul2[state[3]]);
tmp[4] = (unsigned char)(mul2[state[4]] ^ mul3[state[5]] ^ state[6] ^ state[7]);
tmp[5] = (unsigned char)(state[4] ^ mul2[state[5]] ^ mul3[state[6]] ^ state[7]);
tmp[6] = (unsigned char)(state[4] ^ state[5] ^ mul2[state[6]] ^ mul3[state[7]]);
tmp[7] = (unsigned char)(mul3[state[4]] ^ state[5] ^ state[6] ^ mul2[state[7]]);
tmp[8] = (unsigned char)(mul2[state[8]] ^ mul3[state[9]] ^ state[10] ^ state[11]);
tmp[9] = (unsigned char)(state[8] ^ mul2[state[9]] ^ mul3[state[10]] ^ state[11]);
tmp[10] = (unsigned char)(state[8] ^ state[9] ^ mul2[state[10]] ^ mul3[state[11]]);
tmp[11] = (unsigned char)(mul3[state[8]] ^ state[9] ^ state[10] ^ mul2[state[11]]);
tmp[12] = (unsigned char)(mul2[state[12]] ^ mul3[state[13]] ^ state[14] ^ state[15]);
tmp[13] = (unsigned char)(state[12] ^ mul2[state[13]] ^ mul3[state[14]] ^ state[15]);
tmp[14] = (unsigned char)(state[12] ^ state[13] ^ mul2[state[14]] ^ mul3[state[15]]);
tmp[15] = (unsigned char)(mul3[state[12]] ^ state[13] ^ state[14] ^ mul2[state[15]]);
Music Channel:
Sober:
https://youtu.be/Y2LCg3cGu7U
Gold Digger:
https://youtu.be/wAoXB8tg0co
Become a patron and support Whats a Creel programming vids on Patreon:
www.patreon.com/whatsacreel
FaceBook:
www.facebook.com/pages/WhatsaCreel/167732956665435 AES Encryption 4: Matrix Multiplication](https://i.ytimg.com/vi/bERjYzLqAfw/mqdefault.jpg)



