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

Best Friend of an Old Game Cartridge

You might recognise this issue. You have a game cartridge and it seems it doesn’t work. It probably is from some console that’s older than your PlayStation. It might be even produced for Nintendo 64. The graphics are usually blurry or the game doesn’t load at all. Hold on. I have a perfect fix for you.

Let’s talk a bit about basic practical electronics. You might know a metal called copper. Do you know how it works in electronic devices and why it is used a lot? Let me try to explain this. I promise it won’t be boring. I am actually very interested in things like how copper works in these devices we use every day.

Copper conducts electricity very nicely. There are also some other metals, like gold and silver, that also conduct electricity very fluently but of course, they are so much more expensive that copper is better to be used. Copper also conducts nicely heat. There are also heat sinks made out of copper for this reason.

So the connectors in your game cartridge are made out of copper. This material has also a tendency to wear out a bit. There is also a phenomenom called oxidation. This happens when over a long period of time you have some copper, like in those connectors, that reacts with oxygen in air. This makes the connection of all of the interfaces to get weaker which produces these issues.

Do you need a electrician to get your physical copies of your games to work? No you don’t. I first encountered this issue when one of these Mega Drive game cartridges wasn’t working. It might not be easy to detect if the copper in the connectors is oxidised. I then purchased this small spray can that is called “PRF 6-68”. It was recommended for cleaning electronic connectors. It didn’t cost so much.

You have to be a bit careful when using this stuff for cleaning electrical connectors. It evaporates quickly. You just basically spray it to your target and then you have to have some kind of cloth, maybe a soft one, that you can try to rub the copper so that the oxidised part wears off. It’s not a good idea to breath in a lot of this stuff. So try to avoid this and also be careful with this. It’s not something you could let small kids to handle.

Using this spray to clean the connectors of a game cartridge has saved many of these retro games that I have bought and that first seemed not to work. Just remember to be careful. It doesn’t hurt for you get some deeper information about this product. And if you are interested in physics or chemistry behind this be free to search from your favorite search engine. I have given you some of my knowledge here but while this is not a science blog I am leaving this a bit open for you to find out.

One Great DOS Game

In UFO – Enemy Unknown you face a serious situation. All the worlds countries have to set aside their disagreements because aliens are attacking the Earth. You first get to decide where are you going to set up your base. You get to build the base. You have money that you can use for research, training and otherwise imnprove your base. When you get to attack against UFOs you get also to missions that happen when an UFO gets shot down. For that you have to have soldiers, guns and you can evenuse tanks.

This game has many different areas. It combines very nicely strategy and action. I am trying not to spoil the game so much in this text since it has some moments in it that can be a bit suprising. I am not going to reveal any more about the plot of this game.

This game was first released for PC in 1994. When I first encountered it it was end of the 90s. This game was for me like candy for a child. That’s about how attractive it was. UFO – Enemy Unknown had many innovations that set it apart from some other strategy games. It also told a story that was full of Science Fiction influences.

I definitely recommend you to get into this game and give it a chance. It is an old game, but it also is a gold game or an oldie goldie if you want to use that term. If you are into DOS games already I can do nothing more than recommend this game. Also if you’re into alien stuff or have even a slight interest in Science Fiction.

Social media & sharing icons powered by UltimatelySocial