Games are incredibles programs to create!
They are super interactive, full of nice visuals and sounds and hopefully a lot of fun! They allow you to create imaginary worlds and rules that players will interact and share with the world!
Unlike console applications (the kind that you have been programming so far): applications that open up that ugly command prompt; games create a window on their own and can draw whatever then want in them. They can also play sounds and music!
This kind of window application is used in most software you probably interact with: mobile apps, word and spreadsheet processing programs, and the very browser you are reading this in! The skills you develop while making games in Vizzcode can be leveraged to create these and many other very interactive programs.
Not only making games and other window-based graphics application will take your programming skills to the limit, they will also be some of the most engaging programs you will develop! You can share the executable file with friends to make them visit and play in the imaginary world you created. That is really cool! You can even publish your games on distribution platforms and even sell them to the world!
Although the process of creating the games might be hard (and a lot of work) it's very gratifying when your code comes alive.
We have created several tutorials that show you a step by step process of creating games in Vizzcode. There, you will learn everything from a very simple game all the way advanced programming techniques to make your game play, look and sound incredible. Remember that practice makes perfect, so you will have to create several small projects until your masterpiece can take the world by storm.
In the following section, I will explained to you how games are programmed and also show you the awesome tools you have at your disposal in Vizzcode to help you make your imagination come alive!
How Games are Programmed
Games are highly interactive real-time software. This means the player will constantly send input to the game (via mouse and keyboard, gamepad, touchscreen or other device) and the game must read that input and simulate the game world accordingly. Then, it must display the game world to the user and do that all over again.
These three elements: read input, simulate the world and display it is at the heart of every game: the game loop.
Like the name suggests, it's a loop that runs for as long as the game is running.
The game must do whatever the players wanted to do (like shooting or moving), update the world (like testing for collisions) and draw images on the screen. At the end of the loop's iteration, the game shows the player a frame: a static image, a snapshot of that specific time of the game world. Then, the game starts the loop all over again, reading the player input, simulating and drawing that.
But this happens VERY fast!
In order to look and feel smooth and interactive, a game must simulate and display several frames per seconds.
Because of the monitors people play games with, it's usually 30 or 60 frames per second.
This means that in every second the game reads the players input, simulates the world and displays it, something like 60 TIMES. This way, the still images the game displays will appear to be in motion! And as soon as the players press a button, they will see the result of that interaction on the screen! Like just like a film reel, but the film is being created as the player interacts with the game!
During the simulation part, the game might do several math operations to move objects, test collisions between them and update their behaviour according to the game's rules and the Artificial Intelligence's rules that controls the NPCs in the game (the other characters besides the players).
This process can be very simple for a small game or super complex for a high-budget AAA game!
To help you with all this, Vizzcode has a special library you can use to make games with: the Game Engine!
A Game Engine is a tool that helps you with some of the the complicated things required to make a game: like drawing images to the screen, testing collisions, playing audio and managing resources. Vizzcode's Game Engine library was hand-crafted to help you learn game development for real while having a lot of fun and creating very cool projects along the way, all that your own pace.
You can learn all about using that library and about game development in general by following all the tutorials we have prepared for you.
In the next section, I will link you to the various tutorials you can learn from to start making games in Vizzcode in no time!
Where you can Learn it All
Making games will test everything you have learned so far, so it strongly recommended that you are very familiar with programming in Vizzcode and solved some of the more advanced Programming Exercises.
Making games will take what you learned and apply it in new and interesting ways!
If you still need to sharpen your programmer sword before facing the game-making dragon, fear not; you can always progress at your own pace. You can start from the very beginning here in the documentations, all way to creating interactive programs. You can also follow the embedded tutorials starting from very simple programs all the way to programming with all the features Vizzcode can offer! Then, develop your problem-solving mindset by solving the Programming Exercises, that is essential to becoming a good game developer. Then, when you know all the programming kung-fu moves, you can jump right in the game development tutorials right from inside Vizzcode!
Vizzcode has several embedded tutorials that teach you how to make games. Each tutorial will either create a game from scratch or improve on an existing game you created. They were created in an incremental level of difficulty, so even if you want to jump right into a specific game tutorial that you want to follow, you should take the time to follow the previous tutorials as well! They were carefully created to introduce and expand on very important programming abilities you need, all the while creating very visual and interactive projects! These abilities are the base of game development, and are essential to have no matter what game engine you might use in your games.
With all that in mind, go right ahead in to the game tutorials that you can find inside Vizzcode and get started creating your own interactive worlds!