Continue looking at data, memory, storage,
and how it relates to video games.
Completed
Encryption vs Encoding
Cryptography in History
Revisit Info Theory Concept
About Control Flow
Finish our Caesar Cipher
Today
About Memory, Storage, Variables, & Games
Upcoming
Flux
Quiz eventually
Previously, we looked quite extensively at the development of storage and memory throughout the relatively short history of computers. Today, let's try to better understand how modern storage works.
The more affordable widely available storage is the HDD, or Hard Disk Drive. These were first introducted by IBM in 1956, and are still widely available and widely used today. They will currently get you the most storage for the lowest price.
Whether we are typing up an essay for class, streaming music, watching a bluray disc, or playing a video game; it's all bits of 1's and 0's.
These bits include the games graphics and logic, created from loops and conditionals. This logic is going to include responding to certain values, perhaps about how strong your character is, or what quests you've completed. This will all be stored in variables that we can us with the games programming. That's going to be our focus today.
Any game you've ever played, is all be encoded into systems of physics, sections of code that control movement, graphics and animations composed of polygons and/or pixels. In the computer, on whatever storage device you're utilizing, those all eventually boil down to bits, gargantuan quantities of bits that can be processed by software to render the character and the world, and create a system that is hopefully challenging and fun.
Let's try playing with the data stored and utilized in variables to see how the physics based on the variables affect gameplay.
Check out this video to learn a bit more about the program, then download it below and try it.
Try Platformer Toolkit. Itch is usually blocked on our school network, so try the mac version instead of the browser version. You should be able to run it fine, it does not require any installation. The file is compressed, double clicking it will create an uncompressed copy that you should be able to run.
This music is a little loud and can quickly become annoying. I recommend you turning it off, or at least turning it down. In the pictures below, I'm demonstrating where you can turn it off/down. You can do so from the start screen, or from where you make adjustments to the physics using the 'toolkit'. Notice the bright orange arrow, near the top right of the screen.
Your task for today relates to the Platformer Toolkit.
You can see the Task at the bottom of this page.
When your player is ready to end their game session, their character is saved. The data and their progress is recorded. This is all data as well. Somewhere on their device, that information is stored into some sort of organization scheme that the game can read later to recreate whatever point they had progressed to.
As you play with the platformer toolkit:
Identify 4 different variables that would hold an integer.
for each:
- choose a logical variable name that could store the data
- describe how this value/variable affects gameplay
- state the range/total number of values this variable holds
- state how many bits would be required to hold this range of values
Identify 4 different variables that would hold a boolean.
for each:
- choose a logical variable name that could store the data
- describe how this value/variable affects gameplay
- state the range/total number of values this variable holds
- state how many bits would be required to hold this range of values
- ^ if it requires more than 1 bit, then explain