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

Nothing Special to See Here

This image here is a screenshot from Forza Horizon 5. I am playing it currently on my Xbox Series X. I bought it recently as a digital copy. It cost me about 40 euros. I was happy that I didn’t have to pay more for it. It isn’t the newest racing game after all.

I bought also some other games. I noticed that there are some Xbox 360 and original Xbox games available as digital copy and they were on a discount also. So, I picked up some more games. There were 9 games all in all. I picked up Red Faction II, The Darkness, Contra, Vampyr, Flashback, Call of Cthulhu, Crimson Skies – High Road to Revenge, FH5 and Gears of War 4. This cost me only about 75 euros. I saved over 100 euros. If you can call spending money saving money. Well, I think we can.

Some people are talking and even worrying about spending too much money buying gaming stuff. I don’t think gaming would be different from any other hobby that you have to spend money in. You need equipment in sports. You need money if you drive a car. How is gaming different? This talk about money makes me think about some of these big game releases. We can take the latest Zelda game for example. It is Tears of the Kingdom. I think they have a huge marketing budget. This is reality. It is so because I did saw a commercial on a bus stop just some weeks ago. I don’t remember seeing a game advertised on a bus stop here in a long period of time. If this has happened earlier, I don’t remember what the game might have been.

Forza Horizon 5 is already an old game. It isn’t actually old. Its just not the newest game providing racing and entertainment. I decided to start playing it because I hadn’t done it earlier. It has received some good ratings. It would take me at least 20 hours of time to finish it. Or so tells the well-known website named “How Long to Beat”. This is my preferred website if I want to seek information about how long does a game last. Some times, like in the case of Diablo II – Resurrected, I have noticed that it takes me some more time to complete a game than what is told on this website. If you want to see the website, just use your favorite search engine. As you might have noticed I don’t promote any special search engine.

I am hoping to enjoy some more Forza Horizon 5. I hope that I can finish it some day soon. I have spent already maybe 5 hours playing it. There is, as is usual today, many different areas of interest in this game. There’s a lot going on. We have definitely more than a racing gameĀ  here. I hope to continue playing it and to explore its content as thoroughly as is possible.

Web Page as a Medium

I have spent so much time learning to write and also express different ideas on a web page. There has always been this certain appeal for me to websites. It probably all began when I started getting into HTML in 1999 or 2000. So, that’s ages ago. But that is where it this interest started for me.

I was far from a professional. At first I didn’t even study anything related. At the time I was still a student in elementary school. This was even before I went to high school. It started as an interest and a hobby for me. I didn’t think that I would become some sort of professional in this exact field. But that actually happened a bit later. But lets just say that I was sort of free to do whatever I wanted at this time and I also found many interesting subjects in this time in my life. That was also a time when I got deeper into gaming.

So, there has always been an interest for me in designing and programming websites at least at some level. I am still not a seasoned professional. I am still taking those steps toward understanding this form of art and also a very strong medium. Because I think that’s what a web page really is – a medium. There are so many things you can express in a website. It might be a single page application but I myself started with static HTML. I soon got to CSS also.

I started building websites with simple HTML tables. I liked creating different types of interfaces and menus and also logos and headers. That was fun. I liked modifying images and changing how they were colored and represented in a web page. Soon it came to my understanding that tables weren’t a good way, anymore, to design a website. So I learned some newer techniques. I got far. I still stumbled as I encountered something like PHP, MySQL or JavaScript. I understood how powerful they could be but I wasn’t ready to move on to actual programming. I think that would have been too much for me to cope with as I was learning everything on my own with no teachers or other students or even a decent theory book.

I did learn more later. Today, I can create a static website. I still don’t know how to use React deeply and thoroughly. There is still lot to learn. Websites are now fully responsive and can be used with different kinds of tablets and phones and maybe even some other mobile devices. I think the medium is still there. You can write a book on a website. You can play a movie on it. There are several ways to draw content to the screen using your favorite web browser. You can create a game for others to play. And all this is achieved with a certain limit and you don’t have to actually install any other software than just your web browser.

There are many types of browsers available. Microsoft still has its own browser and it is currently called Microsoft Edge. Google has its own web browser. It’s called Chrome. You have also, the descendant of Netscape, Mozilla Firefox, which is very popular. Then there are browsers like Opera and Brave. Web browsers do gather information about you, the user, in form of cookies.

There are countless possibilities in what way you can deploy this medium. The content has to be in a form of HTML and it’s functionality is defined in JavaScript, be it as a framework or vanilla. You can also tune the look and view of your page with CSS. Together these, sort of, languages form a web page. This form is very different from what you have when you write a story. Then you are only using a tool like Word. You have a very limited way to control the content. Then you have complex ways to express your content with a pen or even a brush with a paper. This means actually drawing something. Creating a website is more technical and also more simple way to express some ideas you might have.

Websites keep interesting me a lot even today. I like fiddling around with digital photography and writing stuff. I like also the technical stuff. The programming side is very interesting. I think I have now a grasp of what can be achieved with a web page. I just have to grab myself and start working. There is lots to do and I have lots to achieve, still.