Code-It-Yourself! Flappy Bird (Quick and Simple C++)

Ғылым және технология

This video shows an implementation of, sigh, Flappy Bird in C++ at the command prompt.
Source: github.com/OneLoneCoder/Javid...
Blog: www.onelonecoder.com
Twitter: @javidx9
Twitch: javidx9

Пікірлер: 184

  • @dillonreed6860
    @dillonreed68604 жыл бұрын

    My favorite part are his negative comments of the game😂

  • @CodeDisease

    @CodeDisease

    2 жыл бұрын

    aka the entire video

  • @Brandlin
    @Brandlin6 жыл бұрын

    Javid - wonderful to see you showing development and concentrating on the game engine not the graphics. As an old school amateur programmer brought up on a 32k BBC micro and later learned C and now python its a breath of fresh air to see someone actually understands and explains the physics and not just the flashy animation. Oh, love the great sarcastic British humour too.

  • @javidx9

    @javidx9

    6 жыл бұрын

    lol, I loved my BBC Micro - I think it should be compulsory for all programmers!

  • @linkinparkrulz2275
    @linkinparkrulz22754 жыл бұрын

    These are awesome tutorials. Many code instructions on KZread rush through the main details and they make it impossible for beginners to figure things out. I like that I can just plug things in and switch up the parameters to see how the fundamentals work. Thanks so much.

  • @evensandvik6140
    @evensandvik61405 жыл бұрын

    When you refuse to learn a graphics library

  • @noellekkar903

    @noellekkar903

    4 жыл бұрын

    😂😂

  • @Thebasicmaker

    @Thebasicmaker

    3 жыл бұрын

    I Still don't understand why usefull commands must be in libraryes...well I do understand but a language should come with some basic graphics at least

  • @mustnz998

    @mustnz998

    3 жыл бұрын

    @@Thebasicmaker First time?

  • @Thebasicmaker

    @Thebasicmaker

    3 жыл бұрын

    @@mustnz998 i did study C++ just for a few days then went back to B.A.S.I.C!

  • @DanielBrotherston

    @DanielBrotherston

    3 жыл бұрын

    When you understand why languages don't come with graphics builtins, then you will better understand how the systems you are programming work and are organized.

  • @salmanahmad1
    @salmanahmad16 жыл бұрын

    i have been looking for this for a long time ,thanks man u rock

  • @javidx9

    @javidx9

    6 жыл бұрын

    No problem Dark Energy, Cheers! (but flappy bird, really? just kidding :D)

  • @user-bb9it4ur2g
    @user-bb9it4ur2g4 жыл бұрын

    I'm here to finish my C++ assignment. The teacher asked us to code a game ourselves. It's not easy since he didn't teach us anything about making a game. Therefore, your video is of great help to me, thx so much.

  • @linowmik
    @linowmik5 жыл бұрын

    after seeing this I'd like to code it myself. thx~

  • @javidx9

    @javidx9

    5 жыл бұрын

    Nice one, good luck!

  • @anandk1977
    @anandk19776 жыл бұрын

    This is the first game i made in C++. Thanks man for these tutorials. My c++ journey is off to a good start, or at least I hope so.

  • @javidx9

    @javidx9

    6 жыл бұрын

    Hi Anand, no problem, Good luck with your journey - just take it at a pace that's right for you, and it will work out fine!

  • @finrodable

    @finrodable

    4 жыл бұрын

    how is your c++ nowadays? :)

  • @crusial1281

    @crusial1281

    3 жыл бұрын

    @Circuit Carbon what happened

  • @crusial1281

    @crusial1281

    3 жыл бұрын

    @Circuit Carbon wdym was it a project u wanted to make?

  • @DarkReaperK97

    @DarkReaperK97

    3 жыл бұрын

    @Circuit Carbon what do you mean you gave up? O.O

  • @thegigasurgeon
    @thegigasurgeon4 жыл бұрын

    😂 when he says "should you wish to subject yourself to such a miserable form of entertainment"

  • @HimanshuSharma-tm2ms
    @HimanshuSharma-tm2ms4 жыл бұрын

    Your way of naming variables like f before float ones is really good..

  • @DiveInsideTech

    @DiveInsideTech

    4 жыл бұрын

    Actually, I think he has used UE (unreal engine) before and there that's normal. I like it too! Especially when you changing the types of variables. But why does he use n for int instead of i?

  • @rastaarmando7058

    @rastaarmando7058

    3 жыл бұрын

    @@DiveInsideTech every book i read about this language uses n for integers instead of i.

  • @BrekMartin
    @BrekMartin6 жыл бұрын

    Someone with an 80x48 display would probably feel the same way. What did they do to deserve this punishment? :D

  • @xiao_sings
    @xiao_sings4 жыл бұрын

    Love Your Videos, Dude!.

  • @javidx9

    @javidx9

    4 жыл бұрын

    Cheers Xiao!

  • @Altekameraden79
    @Altekameraden798 ай бұрын

    Apart from Eve Online I hate games, but learning C++ now for scientific computing w/a MATLAB background, these projects really teach dynamic ideals better than stale apps. For any future viewers, learn C or C++ before MATLAB or Python.

  • @xkilla911
    @xkilla9115 жыл бұрын

    cool replica! though I do notice your flappy game is exceedingly difficult... it's hard passing through the pipes! i believe the flap escalation is higher than the gap between the pipes, making this harder than the original game!

  • @user-yo3fr6wz6b
    @user-yo3fr6wz6b3 жыл бұрын

    Man, you are the best

  • @Zyk0tiK
    @Zyk0tiK6 жыл бұрын

    Hey javidx dude, I'm really enjoying your videos, but I'm wondering if you'll ever write a port of your game engine to run in a Linux terminal? Relying on Windows.h means I can't join in :(

  • @javidx9

    @javidx9

    6 жыл бұрын

    Hi Steven, if I got a great British pound every time someone mentioned the L word. Lol, I'm going to investigate Linux but I don't think I could do much better than those that have already tried. Never say never though! Thanks for the support.

  • @ym1118

    @ym1118

    6 жыл бұрын

    You can use ANSI escape characters to set the mouse position, background colors, and get a lot of data. So you may want to look into that.

  • @NexGenSlayer
    @NexGenSlayer6 жыл бұрын

    Can you show how to implement levels for a game with OLC with a menu?

  • @javidx9

    @javidx9

    6 жыл бұрын

    Hi NexGenSlayer, That's an interesting idea. Yes. I will think of something.

  • @sknchn9901
    @sknchn99014 жыл бұрын

    which book you would prefer for a java developer? the original from bjorn?

  • @CoolDude911
    @CoolDude9113 жыл бұрын

    Velocity should be positive and gravity negative. From a young age I have always dreamed of being a flappy bird escaping to the heavens. Now with this video I am finally able to do it.

  • @javidx9

    @javidx9

    3 жыл бұрын

    Don't forget in computer game world's the y axis is inverted!

  • @saptomudito6779
    @saptomudito67794 жыл бұрын

    great tutorial, sir. more video please :)

  • @javidx9

    @javidx9

    4 жыл бұрын

    lol Sapto, ive made over 100 XD

  • @stutteringcris468
    @stutteringcris4684 жыл бұрын

    Im interested in learning python, well, coding in general and this is already so exciting!! AHHHHHH!!!

  • @rizalabdurrahman8317
    @rizalabdurrahman83176 жыл бұрын

    hei javidx dude, i'm really enjoy video have you made and that was simply explanation, but i have a request to next video of Code-it-yourself is Saint venant equation, something to visualized motion of water, thanks :))

  • @javidx9

    @javidx9

    6 жыл бұрын

    Hi Rizal, thanks for the suggestion! I don't think it'll be the next video, but I think a couple of fluid approximation algorithms would make for good videos.

  • @mvd3517
    @mvd35172 жыл бұрын

    I was searching for the song ”The Bird Code” by VOITH and found this 👍 🦅

  • @praniljadhav357
    @praniljadhav3574 жыл бұрын

    Why?! T_T this literally hurts more than death. Now whenever I'm binging (weird kid I know) this playlist Ill have to encounter this devil of a video idea. I'll drop a like for making this and making us suffer.

  • @yigithanmete8790
    @yigithanmete87905 жыл бұрын

    I have wirtten it. But there is a problem that the map does not re-upload. After you pass 3 obstacles, the game crashes. Any solutions to this?

  • @BrekMartin
    @BrekMartinАй бұрын

    Hmm... Lynx doesn't have a float variable type, but it does have a 102 pixel high screen (a small number) and some fairly large integers if the calculations are few. Someone did have a go at Flappy Bird for it, and it's kind of there. I must take note... I like the game in small doses when it's right. Like all games :D

  • @Goregreet
    @Goregreet5 жыл бұрын

    Hey im trying to use your sprite editor to implement my own bird sprite for this game but the editor doesnt seem to be able to save sprites i keep pressing on f10 but nothing is being saved is there a simple solution for this?

  • @javidx9

    @javidx9

    5 жыл бұрын

    Did you program in a valid filename?

  • @txorimorea3869
    @txorimorea38693 жыл бұрын

    What is really sad is that flappy bird is more fun to play than many AAA games out there XD XD XD

  • @jerinmathew995
    @jerinmathew9953 жыл бұрын

    Hi David, How to enable Unicode for compailer. I am using mingW g++. Kindly suggest. Thanks.

  • @devanandhunnur8916
    @devanandhunnur89165 жыл бұрын

    sir ,in which version ,you didi it 2010,2015 ????

  • @sivavidhyamogankumar60
    @sivavidhyamogankumar606 жыл бұрын

    Please tell me is the program the same if it is done in GEANY?

  • @javidx9

    @javidx9

    6 жыл бұрын

    Hi Sivavidhya, if GEANY is capable of compiling modern C++ code in a windows environment then I see no reason it should not work - I'm not familiar with the tool I'm afraid.

  • @robertboran6234
    @robertboran62346 жыл бұрын

    Nice

  • @richardvelasquez2676
    @richardvelasquez26762 жыл бұрын

    Sir can I ask how to put leaderboard at the end of the game? Plss I need your help

  • @eggaming8292
    @eggaming82925 жыл бұрын

    Flappy bird can flap before having a negative velocity. He can flap again and again. I think that's how it worked in the original game. Btw flappy bird isnt a rubbish its a masterpiece.

  • @KJ7JHN
    @KJ7JHN2 жыл бұрын

    Do you have any videos on Turbo C++? ASCII fps? Thanks.

  • @javidx9

    @javidx9

    2 жыл бұрын

    2 videos on ASCII FPS yes, none on Turbo C++, must confess, didn't realise it was still going

  • @williamdeschenes3627
    @williamdeschenes36275 жыл бұрын

    Hi, i know im late on the vid but when i try to run the project it says « Cannot open include file: ‘olcConsoleGameEngine.h ‘ : no such file or directory». Thats what it says. Idk what to do im a beginnee

  • @javidx9

    @javidx9

    5 жыл бұрын

    Hi William, you will need to download the source file from my github. The link is in the description.

  • @williamdeschenes3627

    @williamdeschenes3627

    5 жыл бұрын

    Thank you !

  • @yaoyao-ainiyo
    @yaoyao-ainiyo4 жыл бұрын

    I just knock the code into my vs, but don't know most of them, lol, but no matter how, thank you.

  • @BluesManPeich
    @BluesManPeich3 жыл бұрын

    "Those people were suckers."

  • @Thebasicmaker
    @Thebasicmaker3 жыл бұрын

    Windows commnd prompt...you mean ms.dos?

  • @HimanshuSharma-tm2ms
    @HimanshuSharma-tm2ms4 жыл бұрын

    @javidx9 how to enable unicode for compiler if you are not using VS:( . Please answer!

  • @jerinmathew995

    @jerinmathew995

    3 жыл бұрын

    Did you get any solution ? I am using MingW g++ compailer.

  • @HimanshuSharma-tm2ms

    @HimanshuSharma-tm2ms

    3 жыл бұрын

    @@jerinmathew995 No I tried a lot but VScode is the only way we can do it :/

  • @javidx9

    @javidx9

    3 жыл бұрын

    Define UNICODE as part of your compile command...

  • @bobbylow175
    @bobbylow1754 жыл бұрын

    can you program in a noclip cheatcode.

  • @abbasjradi5001
    @abbasjradi50012 жыл бұрын

    I am new to programming, i know some basics but i hope someone can help me with this, as i look at the source code, i notice that there are a whole "olcConsoleGameEngine" written beforehand, have i to read this whole header file in order to be able to track with the rest of the code, secondly can we really progress if everything almost written by someone else?

  • @javidx9

    @javidx9

    2 жыл бұрын

    99% of programming is using things that already exist. No you don't need to read the header before using it.

  • @__hannibaalbarca__
    @__hannibaalbarca__ Жыл бұрын

    *HELLO* _l learn a lot from your video_ I m going to write on class behave same sfml windows and methods draw and display . Thanks.

  • @khanhchung4103
    @khanhchung41035 жыл бұрын

    Dear Mr. Javidx9, on the part if( fBirdAcceleration >= fGravity ). Why did you not just let fBirdAcceleration = fGravity at the first place? Sorry for my bad English.

  • @javidx9

    @javidx9

    5 жыл бұрын

    The acceleration of the bird changes. It needs to move both up and down. The line you highlight is to set a maximum descent rate, which is a gameplay feature to stop the descent from becoming so fast the player cant actually play.

  • @khanhchung4103

    @khanhchung4103

    5 жыл бұрын

    @@javidx9 Thank you Mr javidx9. One more question that why did fBirdVelocity = -fGravity / 4.0f? I mean why is 4.0f?

  • @javidx9

    @javidx9

    5 жыл бұрын

    Again its a gameplay tuning factor. Changing this constant affects how the game plays, and needs tuning until it "feels" how you want the player experience to be.

  • @khanhchung4103

    @khanhchung4103

    5 жыл бұрын

    ​@@javidx9 I got it. Thank you Mr Javidx9. I'm trying to make a clone flappy bird. First, I used very simple physics for my bird and it doesn't work well. So that's why your video is really helpful. Anyway, I just read your code again, I realized my first question was dumb @@

  • @adityapandari5395
    @adityapandari53955 жыл бұрын

    Sir can we do this program in code block software ??? Pls reply sir

  • @user-kx5es4kr4x

    @user-kx5es4kr4x

    4 жыл бұрын

    yes

  • @spjewkes
    @spjewkes6 жыл бұрын

    Another great video. However, I'm slightly perplexed as to why you'd go out of your way to write a game that you really don't like :)

  • @javidx9

    @javidx9

    6 жыл бұрын

    Thanks Steve. I'd love to say it's a positive example of mental discipline, finishing a project you don't like against the odds, and that it's good for you to do this from time to time. But in reality I wanted a code-it-yourself video less than 20 minutes that I could inject some wry humour into, flappy bird fit the bill! 😁

  • @ciceroalves9076
    @ciceroalves90766 жыл бұрын

    could you do a video about hack in games? ive always found it interesting.

  • @javidx9

    @javidx9

    6 жыл бұрын

    I could, but it might not be as interesting as you would hope - Firstly, no matter which game I choose, it will be the wrong one! and Secondly, hacks are quite specific to individual games. That said, it might be interesting to do a video about memory analysis and interception in general, so i'll add it to the list.

  • @cruestoddard7614
    @cruestoddard76142 жыл бұрын

    where the heck is the previous code from??

  • @tiriotis
    @tiriotis4 жыл бұрын

    Is there any way to run this in linux ?

  • @javidx9

    @javidx9

    4 жыл бұрын

    Sure, use the olcConsoleGameEngineSDL.h file instead.

  • @maximborisenko2590
    @maximborisenko25905 жыл бұрын

    hi,what to do? Exception thrown: write access violation. this->m_bufScreen was 0x1110112.

  • @javidx9

    @javidx9

    5 жыл бұрын

    You are creating a console that is too big for your display. Try halving the fontw and fonth values in construct console function.

  • @maximborisenko2590

    @maximborisenko2590

    5 жыл бұрын

    @@javidx9 thank you

  • @vx.nocturne
    @vx.nocturne3 жыл бұрын

    It doesnt work, It says no file directory

  • @PMCdev
    @PMCdev4 жыл бұрын

    how do u debugge it as soon as i debug i get this ERROR: Screen Height / Font Height Too Big The operation completed successfully. debugged on visual studio code debugger

  • @javidx9

    @javidx9

    4 жыл бұрын

    Well its telling you what the problem is. You are trying to create a console that is too big for your display. Try halving the fontw and fonth values in construct console function.

  • @PMCdev

    @PMCdev

    4 жыл бұрын

    @@javidx9 rhanx for the quick response will check it ou

  • @spzcortex628
    @spzcortex6286 жыл бұрын

    I am using mono develop and every time I had the code put in it said error

  • @javidx9

    @javidx9

    6 жыл бұрын

    Is your compiler up to date? Does it support C++14 and winapi fully?

  • @ashutoshaswal
    @ashutoshaswal4 жыл бұрын

    haha! 😂😂Ending👏👏

  • @syalin4433
    @syalin44335 жыл бұрын

    how do I use the engine, there is no file to download or anything

  • @javidx9

    @javidx9

    5 жыл бұрын

    Link in video description. All source on github. It's a single header file you just download and include in your project.

  • @adityapandari5395

    @adityapandari5395

    5 жыл бұрын

    Sir how to include or where to include in out project

  • @nablislim4294
    @nablislim42943 жыл бұрын

    How Can this work on linux

  • @spzcortex628
    @spzcortex6286 жыл бұрын

    I don't know

  • @toastyPredicament
    @toastyPredicament Жыл бұрын

    I doubt you can bring down a sat by restarting its software. They hover in orbit...

  • @lepureur4657
    @lepureur46573 жыл бұрын

    I have this unicode issue:/

  • @lancate4566
    @lancate45664 жыл бұрын

    Where I can find "olcConsoleGameEngine.h" for this game?

  • @DiveInsideTech

    @DiveInsideTech

    4 жыл бұрын

    On GitHub. He put it there, although he puts the latest version, so I don't know, but he might have some different code.

  • @projektraven4149
    @projektraven41494 жыл бұрын

    And that ladies and gents is why ill become an artist and not a programmer

  • @b.dimitrieski9642
    @b.dimitrieski96423 жыл бұрын

    How do i download olcConsoleGameEngine.h?

  • @tomnetin7511

    @tomnetin7511

    Ай бұрын

    Do you understand how?

  • @janalbertgibson3192
    @janalbertgibson31926 жыл бұрын

    how its made :Flappy Bird

  • @javidx9

    @javidx9

    6 жыл бұрын

    lol I love that show!

  • @janalbertgibson3192

    @janalbertgibson3192

    6 жыл бұрын

    Me too. You almost sound like that narrator... btw... *awesome* videos man

  • @devanandhunnur8916
    @devanandhunnur89165 жыл бұрын

    plz reply 2015 or 2010??

  • @javidx9

    @javidx9

    5 жыл бұрын

    2017

  • @adityapandari5395
    @adityapandari53955 жыл бұрын

    Sir ,can you please provide whole program in one picture please???

  • @javidx9

    @javidx9

    5 жыл бұрын

    Download the source from the description

  • @adityapandari5395

    @adityapandari5395

    5 жыл бұрын

    Sir can you please tell me which software you have used for coding this program??any other software can we use???

  • @javidx9

    @javidx9

    5 жыл бұрын

    Its visual studio, free, from microsoft

  • @adityapandari5395

    @adityapandari5395

    5 жыл бұрын

    Code is c++ right sir??

  • @javidx9

    @javidx9

    5 жыл бұрын

    It is yes

  • @BAMBAMBAMBAMBAMval
    @BAMBAMBAMBAMBAMval Жыл бұрын

    First ever copy of flappybird to run at over 7k fps???

  • @alejandroflorez1718
    @alejandroflorez17182 жыл бұрын

    Hello guys , i am a newby, i copied and pasted the code, but it gave me the error: 6 34 [Error] olcConsoleGameEngine.h: No such file or directory.

  • @tomnetin7511

    @tomnetin7511

    Ай бұрын

    Do you understand how?

  • @5a_fabioshelbyaulnurhilmi93
    @5a_fabioshelbyaulnurhilmi933 жыл бұрын

    Hai.. can you give me the script of this game?

  • @javidx9

    @javidx9

    3 жыл бұрын

    Link is in the description

  • @FishNChips
    @FishNChips5 жыл бұрын

    it said that there were build errors?

  • @jonasstrabel
    @jonasstrabel5 жыл бұрын

    You lost me at 0.0 !! is there any beginner things to understand better what you do??

  • @javidx9

    @javidx9

    5 жыл бұрын

    Hi Jonas, Ive deliberately avoided doing complete beginner videos, as there are plenty of good resources. However learning to code via KZread is not ideal, I really recommend finding a book that feels right for you.

  • @jonasstrabel

    @jonasstrabel

    5 жыл бұрын

    @@javidx9 okay thank you!

  • @jonasstrabel

    @jonasstrabel

    5 жыл бұрын

    @@wahomevictor6589 thank you too!

  • @spzcortex628
    @spzcortex6286 жыл бұрын

    I want to code so bad but have a Windows vista

  • @spzcortex628
    @spzcortex6286 жыл бұрын

    how do i build it it says error

  • @javidx9

    @javidx9

    6 жыл бұрын

    Hi Crazyvides, You'll have to offer more than that if you need help!

  • @mallikarjunsomanni1584
    @mallikarjunsomanni15845 жыл бұрын

    How to include 'olcConsoleGameEngine.h' to project

  • @kriluk1214

    @kriluk1214

    5 жыл бұрын

    You need to download it from his github page, then put it in the same directory as your .cpp file, after that include it in the code.

  • @uniqueshorts2256
    @uniqueshorts2256 Жыл бұрын

    Is it real Or what

  • @brianx2405
    @brianx24053 жыл бұрын

    ahhhahahah 10:50

  • @k9ijou
    @k9ijou4 жыл бұрын

    So, it was fun learning coding, I have to retire now, this shit is not for me, see you guys

  • @ianciti
    @ianciti5 жыл бұрын

    i don't wanna know how to code flappy bird, i wanna know how to code something like zelda 2

  • @javidx9

    @javidx9

    5 жыл бұрын

    XD Then why are you watching this?

  • @ianciti

    @ianciti

    5 жыл бұрын

    @@javidx9 because you're very educational, and also i wanted to make a request. could you do a tutorial on a full on side scrolling platformer/RPG?

  • @javidx9

    @javidx9

    5 жыл бұрын

    Well i have a whole series on RPGs, and a popular video on side scrolling platform games so id start there 😁

  • @entity5209
    @entity52093 жыл бұрын

    Code it yourself more like copy paste it yourself

  • @javidx9

    @javidx9

    3 жыл бұрын

    Awww, thats nice! You want to watch me type it out character by character?

  • @entity5209

    @entity5209

    3 жыл бұрын

    @@javidx9 I want u to code it yourself

  • @entity5209

    @entity5209

    3 жыл бұрын

    @@javidx9 kzread.info/dash/bejne/f3WgtcytqNybkc4.html

Келесі