filmov
tv
Making Flappy Bird, but in Command Prompt with ASCII characters [C++ game dev tutorial]

Показать описание
Interested in making a C++ game from scratch at command prompt using only ASCII characters?
Then welcome to the C++ Game Dev Tutorial on programming Flappy Bird for the Windows Console.
Flappy Bird is a very simple arcade-style game played with only one button.
Your task in this endless runner game is to navigate a little bird, trying to safely pass through the gaps in the vertical walls, and fly as far as possible.
The bird persistently moves to the right and falls towards the ground under the influence of gravity.
At the same time, waves of deadly barriers are coming from the opposite side.
In order to fly and thus avoid certain death, the bird must get flying impulses from the player!
Here the player has only one button to control the bird, and that's the cursor up key.
The game is over when the bird collides with a barrier or the ground, or if it flies too high.
★ Chapters ★
To see what we are going to make in this C++ programming tutorial, the video starts with a short presentation of the complete game. After that, the whole game coding process is explained in detail as follows:
00:00 - Intro
00:29 - Terminator game framework
00:50 - Game class
01:02 - Main program
01:23 - Sky
01:28 - State machine
01:36 - Rocks on the ground
01:48 - Scrolling background
02:07 - Barrier class
02:27 - Mechanism of moving barriers
03:04 - Bird class
03:24 - Animating the bird
03:34 - Gravity and flight physics
03:49 - Player controls
04:00 - Collision detection
04:50 - Game over dialog
05:04 - Clouds
05:18 - Scoring system
05:29 - Sounds
05:44 - Splash screen
05:56 - Playing completed Flappy Bird game
★ Terminator Game Framework ★
Unlike other Flappy Bird clones, in this version the entire graphics is made with ASCII characters.
So instead of bitmaps and sprites, this game uses only ANSI escape codes to render the complete scene.
To make it, I used my own game framework called Terminator (that name should be associated with the terminal/text based games).
It is a lightweight C++ library which provides a number of ready-made functions for programming games at the Windows command prompt. So instead of writing all that Windows Console specific functions from scratch, we can instantly focus on the game coding.
In addition, the final source code is much more understandable to beginners who learn C++ programming, but also to anyone else interested in video game development.
Here is a list of all features:
✓ rapid developing terminal based games (or text games) at the command prompt
✓ making C++ game programming easy and enjoyable in an elegant and efficient way
✓ creating and destroying console window
✓ tracking time to ensure refreshing screen at proper frames per second
✓ drawing characters, text and rectangles
✓ clearing and redrawing screen
✓ using ANSI escape codes to render screen
✓ playing sounds
★ Game Development Tools ★
To build the game, I used the MinGW for Windows development environment, and ran the gcc compiler at the command prompt.
Here are all my video game development tools:
✓ Notepad++ text editor to write programs.
✓ MinGW tools to compile C++ source codes with the gcc compiler.
✓ Command Line to run the gcc compiler and execute the game.
★ Call To Action★
I hope you enjoyed today's C++ game programming tutorial on how to make a game in C++ programming language.
So if you found this video interesting, please like it, and consider subscribing to my youtube channel.
I would greatly appreciate it!
And that way, you will no longer miss out next videos intended to learn C++ programming for beginners.
If you have any feedback or suggestions, please let me know by leaving a comment!
Thanks for watching and happy game coding!
See you in my next video game development tutorial.
★ Music ★
Fig Leaf Rag by Kevin MacLeod
Hammock Fight by Kevin MacLeod
'House Of Style'
Jay Man - OurMusicBox
★ Photos and videos (free to use) ★
Assorted-color Metal Clips on Table Beside Pencil and Notebook
Digital Presentation Of Data And Information
★ Contact ★
Official Website:
Github:
Facebook:
Twitter:
#gamedev #indiedev #devblog #programming #coding #c++ #console
Then welcome to the C++ Game Dev Tutorial on programming Flappy Bird for the Windows Console.
Flappy Bird is a very simple arcade-style game played with only one button.
Your task in this endless runner game is to navigate a little bird, trying to safely pass through the gaps in the vertical walls, and fly as far as possible.
The bird persistently moves to the right and falls towards the ground under the influence of gravity.
At the same time, waves of deadly barriers are coming from the opposite side.
In order to fly and thus avoid certain death, the bird must get flying impulses from the player!
Here the player has only one button to control the bird, and that's the cursor up key.
The game is over when the bird collides with a barrier or the ground, or if it flies too high.
★ Chapters ★
To see what we are going to make in this C++ programming tutorial, the video starts with a short presentation of the complete game. After that, the whole game coding process is explained in detail as follows:
00:00 - Intro
00:29 - Terminator game framework
00:50 - Game class
01:02 - Main program
01:23 - Sky
01:28 - State machine
01:36 - Rocks on the ground
01:48 - Scrolling background
02:07 - Barrier class
02:27 - Mechanism of moving barriers
03:04 - Bird class
03:24 - Animating the bird
03:34 - Gravity and flight physics
03:49 - Player controls
04:00 - Collision detection
04:50 - Game over dialog
05:04 - Clouds
05:18 - Scoring system
05:29 - Sounds
05:44 - Splash screen
05:56 - Playing completed Flappy Bird game
★ Terminator Game Framework ★
Unlike other Flappy Bird clones, in this version the entire graphics is made with ASCII characters.
So instead of bitmaps and sprites, this game uses only ANSI escape codes to render the complete scene.
To make it, I used my own game framework called Terminator (that name should be associated with the terminal/text based games).
It is a lightweight C++ library which provides a number of ready-made functions for programming games at the Windows command prompt. So instead of writing all that Windows Console specific functions from scratch, we can instantly focus on the game coding.
In addition, the final source code is much more understandable to beginners who learn C++ programming, but also to anyone else interested in video game development.
Here is a list of all features:
✓ rapid developing terminal based games (or text games) at the command prompt
✓ making C++ game programming easy and enjoyable in an elegant and efficient way
✓ creating and destroying console window
✓ tracking time to ensure refreshing screen at proper frames per second
✓ drawing characters, text and rectangles
✓ clearing and redrawing screen
✓ using ANSI escape codes to render screen
✓ playing sounds
★ Game Development Tools ★
To build the game, I used the MinGW for Windows development environment, and ran the gcc compiler at the command prompt.
Here are all my video game development tools:
✓ Notepad++ text editor to write programs.
✓ MinGW tools to compile C++ source codes with the gcc compiler.
✓ Command Line to run the gcc compiler and execute the game.
★ Call To Action★
I hope you enjoyed today's C++ game programming tutorial on how to make a game in C++ programming language.
So if you found this video interesting, please like it, and consider subscribing to my youtube channel.
I would greatly appreciate it!
And that way, you will no longer miss out next videos intended to learn C++ programming for beginners.
If you have any feedback or suggestions, please let me know by leaving a comment!
Thanks for watching and happy game coding!
See you in my next video game development tutorial.
★ Music ★
Fig Leaf Rag by Kevin MacLeod
Hammock Fight by Kevin MacLeod
'House Of Style'
Jay Man - OurMusicBox
★ Photos and videos (free to use) ★
Assorted-color Metal Clips on Table Beside Pencil and Notebook
Digital Presentation Of Data And Information
★ Contact ★
Official Website:
Github:
Facebook:
Twitter:
#gamedev #indiedev #devblog #programming #coding #c++ #console
Комментарии