12/08/2018, 10:51

How are video games created?

Video games, taking from people their precious life time, since 1950. OK, since you are here, I mean on this page, you could be at least a technology enthusiasm, is that right? And as you know, for the last 50 years, technology have been improved greatly, all the modern computers, phones, ...

Video games, taking from people their precious life time, since 1950.

OK, since you are here, I mean on this page, you could be at least a technology enthusiasm, is that right? And as you know, for the last 50 years, technology have been improved greatly, all the modern computers, phones, watches have been given powerful hardware no one could have imagined.

But now when you think about it, what are those powerful hardware are being used for, all the CPUs, GPUs, what are they for? Space exploration? Certainly! Architecture? Sure! Art? Most likely. But then, there was a certain thing that was always keeping up with the progress of Technology, it was always there, wherever a new technology was released, there you could find it, it was walking along with Technology, for a very long time, it is a Video Game.

game-console-guide.jpg

Video game history

So video games have been around for a while, the earliest adventure games were, truly, not really video at all, they used texts to create the world for player to explore. One of the first text based game was Adventure, created by Will Crowther (who was a great caving enthusiast) and enhanced by Don Woods. The player would read the text descriptions and type in simple commands like “go north” or “take lantern” to navigate through the cave and interact with the denizens. Text based games worked around the back then limited RAM by focusing on story and setting, rather than the graphics.

The game was written using Fortran (Formula Translating System, a coding language developed by IBM in 1957) code and required about 60K words, about 300 kB of core memory.

Screenshot.180971.1000003.jpg

The next step was the Atari 2600 (a family computer) Adventure game released in 1980, this one included exploration, loot gathering and simple battles against monsters. With the limitations on PC processing power, the main character was represented with a colored square, objects such as monsters, swords and dragons were all represented by pixelated graphics. Even then, the ability to use joystick with a visual environment gave player ability to explore the game’s world mode widely than just read all the texts from screen.

Now I could continue with the history and it would still be very long, and (most likely) very boring, I would like to make a time skip and go straight to the modern gaming, giving you a better idea on how do actually video game are created.

Rendering

Rendering is the final process of creating an image, an actual 2D image from the prepared scene, now what you see in the game isn’t actually a life like World, but rather, an image of prebuild scene, you can compare it to taking a photo from the film set. This film set is being drawn by your CPU, with the help of GPU, depending on the power of those processors, the scene could be drawn faster, or slower. High spec GPU and CPU could result in drawing faster complex and heavy 3D objects, from those rendered objects, a frame, or can be called a screenshot, will be taken and displayed on your screen.

There are 2 kinds of rending, the first is none real-time, those are used mostly for movies, because the scene is too complex, too heavy for any hardware being able to render it quickly enough, individual frame is saved to the hard disk, then they will be merged, creating a video. The 3D animated movies you are seeing in the cinemas are being created this way, it isn’t mean that the games can’t look as beautiful as the pre rendered 3D movies, games can be as real as i.e. Avatar movie, the problem is just that no computer would be able to run a game with that kind of graphic stably.

Now the 2nd rendering way is real-time rendering, used mostly in games and simulations, the number of the frames taken and displayed could be higher or lower depending on your hardware, ranging from 20 to 120, those are called FPS (frame for seconds), the goal is to show as much information as possible as the eye can process in a second while still achieving a high enough sense of realism.

xjjs1yfeyvmddirulziz.png

Enter DirectX

As the popularity of video games grown into, it was necessity to increase the platforms which games could be played on, the PC architecture was never designed to be a gaming platform, its wide-ranging nature makes each of personal’s machine different, while game consoles had the same hardware. The differences made games development very hard for the developers.

To solve this problem, Microsoft introduced a new standard in gaming that every application could follow, an interface between OS and the hardware installed in PC, thus, DirectX was born. To make it short, DirectX is an interface designed to make programing easier, for both developers and end users. DirectX itself consist of many libraries, with 2D and 3D renderers, as well as media player and many others.

d3d11_subd11_capture.png

Now before DirectX was born, programing games were very hard tasks, each programmer needed to develop their own way of reading the user’s input and display screen images as well as play sounds or music. The developer has to speak directly to the hardware at fundamental level. At this point Microsoft enters, the idea was simple, to stop the programmers talking directly to the hardware, but using an API, a toolkit that could help them instead. From now on, game developments was simplified, when a game developer wants to play a sound file, all he needed to was to call a correct library function, in this case DirectSound from DirectX.

The developer doesn’t need to know what sound card he is working with or how to talk to it. Microsoft provides DirectX, sound card manufacturers provide Direct-capable driver. And as long as the driver was available, the sound will be played, doesn’t matter on what kind of machine.

OpenGL

Same as DirectX, the objective for why OpenGL was created is to make easier for developers to write applications for wide range of graphics hardware. Born in 1990 by the name IRIS GL, later with the increase market of graphics hardware, IRIS GL was turned into OpenGL.

IdVdZ.png

Direct3D VS OpenGL

Direct3D is a proprietary API by Microsoft, uses hardware acceleration if available, designed by Microsoft for use on Windows platform only. OpenGL on the other way, is an open standard API available on almost every modern OS including Windows, Mac OS and Linux. One of the main differences was that Direct3D implements API in common runtime, which talks to low level Device Driver, with OpenGL, every vendor (hardware manufacturer) implements the whole API in driver itself, this means some API function could be slightly different depending on the vendor implementing it. In example a shader could have different behavior depending on different hardware.

SS.png

Game Engines

Even with the graphic rendering APIs, game development wasn’t an easy task, each game, with different idea, style, and those forced developers to create a new framework each time a new game is released.

To ease the process, game engines were created, those are collection of tools for game developers to create game much faster, and easier. The core functionality typically provided by a game engine includes a rendering engine, or “renderer” for 2D and 3D graphics, a physics engine for collision detection, sound, scripting, animation, AI, networking and memory management, among others. Many modern game engines include multi-platform, allowing porting games to multiple platforms. Game engines can be written with many programming language, ranging from C++, Java to C#, each language is structurally different and provide different levels of access to functions.

unity-4.jpg

Back in the end of 90s and beginning of 2000s, game engines were very costly, those are mostly genre specific (i.e. FPS) by large companies. Such game engines can only be bought by game developer teams with access to high funds. As the number of game engines become larger, some companies changed their policy, give access to their API much easier, allowing game developers number of choices, even small time developers, depending on their needs.

Summary

As you see, time have changed greatly for the last 70 years for game developers, we have come a long way, the time we are living in now could not be better to become a game developer. We have access to knowledge, to the tools, even the high end tools, for free, opening to us limitless possibilities. Since games always were about imagination, and there is no limit to the imagination, let yours fly freely, maybe you could bring something new to the world of video games.

0