The Role of a Single Variable in an Application Source Code

What is the role of a variable? In case you don’t know about software design, or basics of programming, let me show to you what kind of a term it actually is. Variable has a type which defines what values it can have. It can be a number, a single character or combination of multiple characters. A variable can also be part of an array that has several variables that are of the same type. Objects have properties and every implementation of an object has a variable as a value to its properties. But we are not going to object oriented programming or modeling…at least not yet.

Together with other variables in a program variables form a state of the program. If you think about thing in any retro game console emulator there are so called “saved states”. This means actually what it exactly is. In Super Mario you have variable, which says in which world you are, which stage you are, were you are positioned in the actual level and, for example, how many lives you have left. So all these variables form the state. You with me?

One thing I wondered for several years especially when I wasn’t too deeply involved in actual programming and I was still trying to get my thoughts gathered was “how can you save the entire game when you are saving your game in any modern game?”. Of course you aren’t saving a full copy of the whole game. You are only saving these values of all these variables. You are saving the state in which the application currently is. And basically, this means text. How much would a text file consisting of, maybe, some hundreds of lines of variables and their values take space? Yeah, you figured it out…it wouldn’t take a lot of space. Not at all.

What does take space if any commercial modern game would be considered? Graphics, 3D models, the recorded sound effects and all of the dialogue of the game. They all take a lot of space. Especially when you think about today’s high quality screens with 4K pixels and high quality sound coming out of the selected audio device. Of course what takes also power is all this processing. The processing of code is done by processor of your computer. Graphics are processed with GPU (Grpahics Processing Unit). Today there is a need to maximize the use of a powerful GPU to process the data as efficiently as possible. The processor then works with the GPU and also the hard disk. We have already witnessed fast data processing of SSDs. SSD is short from Solid State Drive. Earlier we had hard disks called HDD (“Hard Disk Drive”). If you are really into computers and building setups you probably know that HDDs are a lot cheaper than SSDs. I mean, of course, the monetary expense of a unit of space. It is a lot more expensive to get a 256 GB of SSD space than it is to get this same space in a HDD.

Right now we are deep in the workings of a personal computer. All these facts I have already covered took me years to get into. It took me involvement. And mostly, it took a lot of time. I started getting in this, very deeply and by studying, back in 2008. That was the year I started studying first electronics and after two years I moved on to study computer science in an University of Applied Sciences. After I graduated back in 2016 I was having a hard time finding a job. After two years of looking for a job I found one as a customer servant. I have worked my way from there and now I work as an IT support person. And all this started from trying to figure out how the saved game system works in my favorite computer or video game. I think the game I was thinking about was Fallout Vegas.

The question made think deeply. How was the game able to save all this information to a small saved game file? I got the answer but it sure wasn’t an easy peace of a cake. I didn’t succeed very well in courses that dealt with a computer’s memory usage or how is magnetism, a physical phenomenon, handling all this data on a hard disk. But little by little…I got the whole picture. I finally got to combine all this information together. All this started by playing games.

Today, I find that there are several areas that are really interesting to me. If you want to learn some knowledge very deeply, like how computers actually work, you will have to use your past knowledge and experiences to guide your thoughts through it all as a process. Writing something “open” to yourself so that you understand what your mind is dealing and handling is one big key for understanding complex and theoretical matters. And teaching someone or having a conversation about the fact is very useful many times.

I don’t know a lot about actual electronics or how the architecture of a full computer work. Well, I actually know something about it. That isn’t however enough for me to solve every problem. This is also where search engines or even a tool like ChatGPT would come in handy. Of course you can look up information from books or your notes and study some more. Just try to remember to take it piece by piece. There is an old saying. It goes something like this: “nobody is a master as you are born”.

I Finished Reading “Ready Player One”

So, as the title of this blog post tells you, I finished reading my copy of Ready Player One. It was originally published in 2011. My copy of this book is printed in 2018. This is the translation. I read this one in Finnish. I just wish that I would have read the original book in English. The translation isn’t bad. I just think there are so many terms in English “nerd slang” that you cannot directly translate to Finnish. They have done their best. I know this because there is a person mentioned in the first pages of the book. That person is Jyrki J. J. Kasvi. Or at least was because, sadly, he passed away some years ago.

This book offers a story and lots of references to 70s, 80s and 90s video game related content. This includes games, music and movies. When I am reading this material, I feel very much like a real nerd. I can feel the writers, who is, actually, Ernest Cline, passion, so to say, about every movie and game that he mentions in the book. You probably get who this book is targeted for. It is a fun read. All this talk about Atari 2600 makes it also a bit funny. It just shows how much this console mattered to the author of the book.

The book has a bit over 500 pages. On these last pages there is an advertisement about Cline’s new book called Armada. It is said that it will be available in 2018. I didn’t actually buy this paper back book as a new copy. I bought it from flea market. It might have been from recycling center. I don’t remember clearly.

The story takes place in year 2045. People are really into virtual reality gaming. There is a huge video game called OASIS. It was developed by a now deceased game designer James Halliday. He left a quest inside the game. There is a huge reward promised to that person that can solve the mystery. There is also a large company called IOI that is doing its best to get their hands on this award. The book takes you through of how the main character, Wade Watts, deals with this challenge.

This book has been very popular. There is also a movie made out of it. With all this hype around the book I found it to be a nice read. And of course it is related to the subject of my dearest hobby – collecting and playing video and computer games.

Missing Old Times and Playing Alien 3

I got Alien 3 for Sega Mega Drive. I paid 25 euros for it. It might not be the best Alien game ever. There are although many elements that make this game interesting for me. I also got Mortal Kombat for Mega Drive and a NES game that was actually Chip ‘n Dale Rescue Rangers.

I am thinking of collecting some more Mega Drive games. There are over 900 games for this system. I currently have a bit over 30 games. I also have the Mega Drive mini console. While Iike to own the cartridges the classic mini offers the opportunity to use save states which makes playing more comfortable.

I miss the 90s. We seemed to have that feeling of progressing technology and everyone thought that this fast advancement would continue. Well, it has continued, but today we also see all of these threats of technology and there are lots of difficult issues with modern and ever developing technology. We are facing an issue of technology bringing more difficulties than advancements and improvements to our lives. Technology has grabbed us and is holding us as hostages in a way.

Alien 3 is a shooting game. Your mission is to rescue all persons that are captured in the maze. There are 15 levels for you to play. I played this game for some hours and got to level 4. There is a lot to play for a 90s Mega Drive game. You get to choose from different weapons. Ammo is somewhat limited. You can choose a grenade launcher, flamethrower, submachine gun and grenade. You will have to combine the use of these three weapons since ammo is limited as I stated already. There is also a time limit.

The world of sound is very nice in this game. When the time is about to run out you get an annoying beeping from the game. This is, well, annoying. Otherwise I like the sound in this game. You have to play the levels for a couple of times so that you can figure when an alien is jumping at you or where to find a captured prisoner that you need to release. It is said that this game takes 4 hours to complete. Í think this is very close to true.

I like Alien 3. I am going to try to complete it when I have some more time. It brings me very comfortable memories from an era of past. I can recommend this game if you like solving puzzles and figuring out where to move in a challenging maze. If you like 90s 16-bit Mega Drive games I think you will like this one also.