Car Game in C++ for Beginners | Easy Console Games Coding Tutorial

Поділитися
Вставка
  • Опубліковано 25 жов 2024
  • Car Game in C++ for Beginners | Easy Console Games Coding Tutorial
    Easy and Professional game programming in C++. This video is a time lapse of Console based Simple Car Game Development in C++ using dev cpp compiler.
    Send me your coding challenge!
    If you have any questions I'll be glad to answer, please leave a comment on the video.
    Thanks for watching
    Please click Subscribe button and press Bell Icon
    Link to download source code is
    github.com/Ang...

КОМЕНТАРІ • 634

  • @mmrlmn5289
    @mmrlmn5289 3 роки тому +1663

    Me: cout

    • @TempoChannel5
      @TempoChannel5 3 роки тому +172

      #include
      using namespace::std;
      {
      cout

    • @mmrlmn5289
      @mmrlmn5289 3 роки тому +128

      @@TempoChannel5 Where Int Main() ?

    • @TempoChannel5
      @TempoChannel5 3 роки тому +41

      @@mmrlmn5289 sorry im dumb.

    • @mmrlmn5289
      @mmrlmn5289 3 роки тому +27

      @@TempoChannel5 do not talk like that

    • @TempoChannel5
      @TempoChannel5 3 роки тому +15

      @@mmrlmn5289 #include
      using namespace std;
      int Main()
      {
      cout

  • @sirfmgamer5655
    @sirfmgamer5655 3 роки тому +243

    This video alone proves that you have to put in the long hours on this software and really study this code in depth if one is to create great things like this :)

    • @ayanraza3340
      @ayanraza3340 Рік тому +4

      It took me almost 8 hours to complete this type of project......

    • @artandcraftwithbt
      @artandcraftwithbt Рік тому

      IT WORKED??

    • @Viral_reels..
      @Viral_reels.. Рік тому

      Please anyone say me in which compiler this code will execute 😢

    • @artandcraftwithbt
      @artandcraftwithbt Рік тому

      @@Viral_reels.. ANY COMPILER U WANT BRO . UNREAL ENGINE C++ COMPILER.

    • @ayanraza3340
      @ayanraza3340 11 місяців тому

      @@artandcraftwithbt Yes!!!

  • @MatheeshaPalliyaguruge
    @MatheeshaPalliyaguruge 3 роки тому +191

    this would be much much great if you'd explain every step when ur doing! otherwise great

    • @ishanidey9580
      @ishanidey9580 3 роки тому +3

      yeah that would have been really helpful.

    • @SAQIBALI-km6xi
      @SAQIBALI-km6xi 3 роки тому +2

      Agreed

    • @Mythical_Spectra
      @Mythical_Spectra 2 роки тому +3

      Hey I am a coder and I know most of the c++ things if you ever need help feel free to ask!

    • @inthegallaxy7097
      @inthegallaxy7097 2 роки тому +1

      @@Mythical_Spectra sir what to do when you want to open a output in qbasic but it says in the bottom "c++ compilation failed" .
      Mine is window 7 sir pls help asap 🙏🙏

    • @Mythical_Spectra
      @Mythical_Spectra 2 роки тому +1

      @@inthegallaxy7097 it means the compiling of the code failed try using a different compiler or check the app you might have installed a wrong version if its not any of those issues try updating your windows

  • @sohaibahmad71
    @sohaibahmad71 4 роки тому +177

    Man, you worked VERY HARD on this, you deserve more views. Nicely done!

    • @sohaibahmad71
      @sohaibahmad71 3 роки тому +1

      @@Inferno0810 hmm, really?

    • @thecube0293
      @thecube0293 3 роки тому +10

      @@Inferno0810 maybe he tested it before he did the video and rewrote all the code again for the video!

    • @thecube0293
      @thecube0293 3 роки тому +2

      #include
      using namespace::std;
      int main()
      {
      cout>>”Am I right?”>>endl;
      return: 0;
      }

    • @sohaibahmad71
      @sohaibahmad71 3 роки тому

      @@thecube0293 no one knows

    • @kfdjhnhurjnnbjhu3ip410
      @kfdjhnhurjnnbjhu3ip410 3 роки тому

      @@thecube0293 its >, and no colon on return

  • @abacaabaca8131
    @abacaabaca8131 3 роки тому +90

    @1:47
    Resolving 2d array to 1d array
    Is important for improving frame rate because you are using nested for loop which means the big o notation for this is x to the power of n i.e grows exponentially.
    Better way is to resolve it to 1D array using the formula y-coordinate of the screen multiplies the total amount of pixels or characters used for the screen console to draw vertically i.e screen width plus coordinate of x considering starting at top left with the conventional (0,0) coordinate.
    Source from olcPixelGameEngine by
    One lone coder

  • @hutch-uu322
    @hutch-uu322 2 роки тому +16

    Congrats man. Starting c++, let's see where I'll be in one year.👨‍💻

    • @ismailaminu9826
      @ismailaminu9826 2 роки тому

      how far have you gone?

    • @hutch-uu322
      @hutch-uu322 2 роки тому +4

      @@ismailaminu9826 progress was good but I had some other stuff so I'm currently working on Python but I'm still doing c++ bit by bit.

    • @joen4287
      @joen4287 2 роки тому

      @@hutch-uu322 Ahh just make sure that u Master only one Programming language
      thats what ive got advised by soo many ppl, i cant even count
      even on youtube they advice this

    • @Vampion
      @Vampion Рік тому

      now what are you doing did you do that c++,

    • @hutch-uu322
      @hutch-uu322 Рік тому

      @@Vampion I dived into machine learning using python. So c++ not that much at the moment

  • @mEvEeeee
    @mEvEeeee Рік тому +6

    Nice Skills, but it will be more helpful if you explain every step to us so that we can get knowledge. thanks

  • @adrianojr.mendoza285
    @adrianojr.mendoza285 3 роки тому +68

    Can you make a video or a list explaining every purpose of a certain command?

    • @carinejabali1369
      @carinejabali1369 3 роки тому +22

      btw he said that he will answer the questions and he didnt answer any question lol

    • @ru2979
      @ru2979 2 роки тому

      @@carinejabali1369 so sed ;(

    • @sapiens9732
      @sapiens9732 2 роки тому +1

      no mames coméntalo tu xd

  • @-blueskitels-1033
    @-blueskitels-1033 3 роки тому +21

    In my opinion, it would be much better if you would explain what you are doing. I know it would take a lot more work but it would be more understandable and clear.

  • @lenarddistajo5926
    @lenarddistajo5926 4 роки тому +14

    This is so good men. I like the background music also

  • @motivational_dosee
    @motivational_dosee 2 роки тому +5

    Coding part is a reverse ◀️ video of backspacing 😁😁😁
    Good effort 👏

  • @acamovicdmitar9310
    @acamovicdmitar9310 3 роки тому +64

    i see what you meant by "easy and professional",but maybe the key to a successful tutorial is documentation or commentating- you know,explaining what you're doing?

    • @Mikioshi
      @Mikioshi 3 роки тому +5

      I agree. If meh professor saw my code and I didn't provide any documentation or comment on any part of my code, I'd be in big trouble.

    • @丅-k3r
      @丅-k3r 3 роки тому

      @@Mikioshi what can i do with source code?

    • @abdullahishaq3
      @abdullahishaq3 3 роки тому +1

      @@Mikioshi Yeah Same Condition is here and now I have to check and see the use of every step in this code btw some of the parts and commands, you will understand easily by there name

    • @abdullahishaq3
      @abdullahishaq3 3 роки тому +2

      @@丅-k3r Copy it and enjoy

    • @ishanidey9580
      @ishanidey9580 3 роки тому +2

      @@angulars please post the explanation video.

  • @949shashikant8
    @949shashikant8 3 роки тому +1

    #include
    Using namespace std;
    Int main(){
    Cout

  • @jqueiroz
    @jqueiroz 3 роки тому +4

    This works for me. Thank you!

  • @bojantanasic221
    @bojantanasic221 4 роки тому +5

    A lot of people asking for source code. Just copy what he's doing in the video and you will learn along the way. Don't be lazy pause the video and type it out that one of the best ways to learn. 🙄

  • @nikakvinikadze4538
    @nikakvinikadze4538 2 роки тому +4

    i liked it and the part when you explained and not just write code

  • @DGPGamer26
    @DGPGamer26 11 місяців тому +1

    you are probably no longer reading these comments but in case, how do you repeat the while 2 times in a row to get two enemies on the screen instead of one? I am doing a game using some line of codes from your car game, but on the output i will get just one enemy on the screen instead of 2

    • @angulars
      @angulars  Місяць тому

      Really sorry for the delay. I will soon make an explaination video of Car Game in C++

  • @simthy72
    @simthy72 3 роки тому +10

    how to type negative symbol under the positive symbol?

  • @noir66146
    @noir66146 11 місяців тому

    cool stuff.
    nice simple project with just one execution file.
    i'm actually not to sure how I set up pathway directories for external images and such to be added into my programs at the moment. this video kept me busy, thanks.

  • @electroera5318
    @electroera5318 3 роки тому +5

    I followed this project and it worked fine without errors only is the problem code have some bugs appearing unnecessary asteriks in the console window
    Eased my work
    Thanks

  • @VibeCheckUniversal
    @VibeCheckUniversal 2 роки тому +1

    Which software are u using???
    And what are you pc specs🙄

  • @divyasrivastava1488
    @divyasrivastava1488 4 роки тому +5

    It's showing compile time error
    As - syntax error near unexpected token ')'
    please help

  • @uokingsman
    @uokingsman Рік тому

    Thx for teaching , learn a lot !

  • @Tng_04
    @Tng_04 Рік тому +2

    why does the music only start at 6:05 lol

  • @thomasfergusan
    @thomasfergusan 2 роки тому +1

    Hey bro it didn't work it bolded on number 36 which says " CONSOLE_CURSOR_INFO lpCURSOR

  • @parkersmith3727
    @parkersmith3727 2 роки тому +3

    How do you do the plus or minus sign

  • @kannanvino5184
    @kannanvino5184 2 роки тому +2

    Bro..how to type ± this symbol in laptop without numpad plz...reply...

  • @md.zillurrahman9211
    @md.zillurrahman9211 3 роки тому

    You are real GuRu.. thanks

  • @BK.Vynz.1
    @BK.Vynz.1 2 роки тому +3

    Sir please give the whole program coding in description 😊

    • @leviistrash7361
      @leviistrash7361 2 роки тому +2

      here..
      #include
      #include
      #include
      #include
      #include
      #define SCREEN_WIDTH 90
      #define SCREEN_HEIGHT 26
      #define WIN_WIDTH 70
      using namespace std;

      HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);
      COORD CursorPosition;
      int enemyY[3];
      int enemyX[3];
      int enemyFlag[3];
      char car[4][4] = { ' ','�','�',' ',
      '�','�','�','�',
      ' ','�','�',' ',
      '�','�','�','�' };

      int carPos = WIN_WIDTH/2;
      int score = 0;
      void gotoxy(int x, int y){
      CursorPosition.X = x;
      CursorPosition.Y = y;
      SetConsoleCursorPosition(console, CursorPosition);
      }
      void setcursor(bool visible, DWORD size) {
      if(size == 0)
      size = 20;

      CONSOLE_CURSOR_INFO lpCursor;
      lpCursor.bVisible = visible;
      lpCursor.dwSize = size;
      SetConsoleCursorInfo(console,&lpCursor);
      }
      void drawBorder(){
      for(int i=0; i

  • @Hunter-ov6sy
    @Hunter-ov6sy Рік тому +1

    Bro liking coding from beginning means for beginners 😅💗

  • @supremegaming368
    @supremegaming368 Рік тому +1

    Music starts at 6:06

  • @hussainktk8411
    @hussainktk8411 3 роки тому +1

    what is (kbhit) in line number 152 ? time 5:07

  • @arjunbhardwaj8233
    @arjunbhardwaj8233 2 роки тому

    Thank You Sir the video really helped.

  • @ArhamKhan05
    @ArhamKhan05 3 роки тому +1

    how can you type so much without a single mistake or error?!

  • @hirdyanshsharma4349
    @hirdyanshsharma4349 3 роки тому +1

    thank you bro for this wonderful code and one question how did you learn to write such a wonderful code of games please answer.

  • @christorr2199
    @christorr2199 2 роки тому +2

    how do you type this symbol with the plus and the underline
    ?

  • @MRDEAFY
    @MRDEAFY Рік тому +1

    Which software do you use

  • @한진영-o5q
    @한진영-o5q 2 роки тому

    Hey,
    Can you start making games again. Like you did earlier?

  • @Anonymous-12337
    @Anonymous-12337 2 роки тому

    you earned an subscriber

    • @supergustavs8735
      @supergustavs8735 2 роки тому +1

      #include
      Using namespace std:
      Int Main ( )
      Int sub = 0;
      Cout sub;
      Cout

  • @shutters_of_yash
    @shutters_of_yash 3 роки тому +4

    Which software you use for creating the game which compiler or software?

  • @saikhot1103
    @saikhot1103 3 роки тому +1

    i just copied this video code and it worked but the car is not visible , what would be the problem

  • @dederizkirahmattuloh5912
    @dederizkirahmattuloh5912 2 роки тому +1

    #include
    using namespace std;
    int main () {
    cout

  • @kitgary
    @kitgary 2 роки тому +12

    This is "real programming" and what I expect a "real" software engineer do, not just use Pytorch to build a simple model and claim to be an AI engineer!

    • @hydrarl3869
      @hydrarl3869 2 роки тому +5

      A real software engineer should be able to do a hell of a lot more than this

    • @Yengozi
      @Yengozi Рік тому

      Ah jeez I’m a freshman and only took Java and about to take C++ but this is really intimidating

  • @ranjanrohillarajput2321
    @ranjanrohillarajput2321 Рік тому

    Sir game mein iostream: No such File or Directory Compilation Terminated aa raha hai?

  • @abdeali1301
    @abdeali1301 3 роки тому +1

    I try this code but ,
    could not convert '& lpCursor' from 'CONSOLE_CURSOR_INFO*' {aka '_CONSOLE_CURSOR_INFO*'} to 'COORD' {aka '_COORD'}
    this error ocuured . pls help me..

    • @razarukhsar8479
      @razarukhsar8479 2 роки тому

      U can try to do on Lpcursor and also u will add consor position.and u will add on one line cursorposition by atteched in LP cursor remind it it's not ipcursor it's Lpcursor

  • @_Cliche_
    @_Cliche_ 2 роки тому +1

    wait, it said: can not open source file "time.g"
    how can i fix this?

  • @jeetbhatt5986
    @jeetbhatt5986 3 роки тому +3

    Please tell me
    Why we took
    1. enemyY[3]
    2.enemyX
    Emenyflag
    And how collision works

  • @muzaffarsaleem154
    @muzaffarsaleem154 3 роки тому +1

    how write the +, - sign together in this video.

  • @dogoodhavegood229
    @dogoodhavegood229 Рік тому

    Good Editing

  • @mustangdream_7309
    @mustangdream_7309 2 роки тому

    Bro my setcursor showing wrong after click F9 ..why bro ?? whereas I'm wrote properly...and what did you clicked after complete coding for start the game

  • @uditsanghvi6571
    @uditsanghvi6571 3 роки тому

    which plateform are used to type code c++ in this video....?//??

  • @Warrior8004
    @Warrior8004 Рік тому

    Any online classes?

  • @faisalirfan8807
    @faisalirfan8807 2 роки тому +1

    I have written the same code as you still it is showing me bug at line 28

  • @abdulghani9596
    @abdulghani9596 2 роки тому +1

    We can do in visual studio??

  • @sharannagarajan4089
    @sharannagarajan4089 3 роки тому

    the song at the end blasted my ear

  • @GiyuTomiokaTheOneAndOnly
    @GiyuTomiokaTheOneAndOnly 2 роки тому

    Forgive me, I as a dev myself, I'm finding it hard to catch up with your code.. some comments on it would be helpful.

  • @lucle4076
    @lucle4076 3 роки тому +3

    I am new to c ++ programming. Can I have your code for reference?

    • @yours_azeem0
      @yours_azeem0 Рік тому

      @@angulars sir i found an error on line 49 why..... in same version i do...

  • @samodrahaqqiarifin4804
    @samodrahaqqiarifin4804 Рік тому

    22 28 [Error] narrowing conversion of '49841' from 'int' to 'char' [-Wnarrowing]

  • @eternexz5037
    @eternexz5037 3 роки тому +1

    Thanks for the code brother

  • @Aasheekowdo
    @Aasheekowdo Рік тому

    Thank you bhaiya kya aap kucha aur game ka example nhi pta sakte ho kya 🙂🙂🙂🙂 please please please please

  • @sonpham1886
    @sonpham1886 Рік тому

    car.cpp:22:57: error: narrowing conversion of '49841' from 'int' to 'char' [-Wnarrowing]
    bro what's this problem ? I use Vs code

  • @BamesMyZ
    @BamesMyZ 3 роки тому +1

    I: print("Hello, World!")

  • @Beebbajwa840
    @Beebbajwa840 Рік тому

    Aoa
    Ma NY coding ko typ Kiya lkn output ma car run nhi kr rhi??

  • @Chrispinerust520
    @Chrispinerust520 2 роки тому +1

    Hwo do you write ±?

  • @JushouaIgnacio
    @JushouaIgnacio Рік тому +1

    What specefic compiler should we use for this program sir

  • @MrTASer
    @MrTASer 3 роки тому

    Making Frogger?
    Or a TAS bot program?

  • @georgesbryandhoumbadji8330
    @georgesbryandhoumbadji8330 3 роки тому +1

    Try to learn OOP. That can help you.

  • @kanijzahera5310
    @kanijzahera5310 3 роки тому +3

    what code is to move player right, left,forward,back in c++ ?
    Please tell me anyone 🙏🙏🙏

  • @agustinmingute2937
    @agustinmingute2937 2 роки тому

    Sino dito pumunta para maghanap ng basic game para sa project nila ? 🖐️

  • @narindersidana2782
    @narindersidana2782 2 роки тому +1

    Bro how to put ± sign on computer

  • @aser789
    @aser789 2 роки тому +1

    Why it say
    1. #include
    Error

  • @jayeshsharma8101
    @jayeshsharma8101 3 роки тому +4

    Sir how will + and - come together?

  • @Nishaverma355
    @Nishaverma355 2 роки тому +1

    Not run programming for turboc3 me

  • @haseebaviary1311
    @haseebaviary1311 2 роки тому

    hope you are fine ! I am making a game using grahics.h header file. Can I use switch statement in the same program ....? how? it does not respond when i use switch statement...

  • @GOM_Gaming
    @GOM_Gaming 2 роки тому +1

    I’m the 500 comment and 5000 like

  • @KaranKashyap-ct4ez
    @KaranKashyap-ct4ez Рік тому

    How we can use this ± symbol in turbo c++ ??

  • @ec039venom4
    @ec039venom4 2 роки тому

    Hello sir !!
    I have a bid doubt
    I am ECE 3rd year student and till now I didn't practice for any language and also I am gate aspirant .
    And I want to get placed so should I start preparation for coding ? Is this right time to start coding when I am in 3rd year ? Please reply

  • @GOM_Gaming
    @GOM_Gaming 2 роки тому

    I’m the 500 hundred comment and 5000 like

  • @spstudio6200
    @spstudio6200 2 роки тому +1

    bro how you add a + under line

  • @adityayurveda6967
    @adityayurveda6967 3 роки тому +2

    #include
    using namespace std;
    int main () {
    cout

  • @papyrusiscool5737
    @papyrusiscool5737 Рік тому

    does anyone know how to color the individual objects like the enemies? I've tried it in so many ways but nothing works. system("Color ") and many other methods I've tried but nothing works. when use it, the whole screen takes on the selected color and you can no longer see anything.

  • @LoL-hv6px
    @LoL-hv6px Рік тому

    as a user of html/css (front end) i basically have no idea but that's soo cool

  • @jayeshsanjotdz5959
    @jayeshsanjotdz5959 2 роки тому

    Which software you're using for this...?

  • @sushovanhazra5072
    @sushovanhazra5072 Рік тому

    Why didn't declared in this update scop?

  • @Iceage31580
    @Iceage31580 3 роки тому +6

    I'm trying to figure out how to include the usage of the left and right key, any ideas?

  • @user-wd6pw5ug3y
    @user-wd6pw5ug3y Рік тому

    This does not work on C++ online compiler. Is he using VS?

  • @iemshanib
    @iemshanib Рік тому

    Bro
    when entering #include
    they saying error occured

  • @jeetchaurasia3972
    @jeetchaurasia3972 3 роки тому

    I write the code and I'm trying to use this but when i click any key to start the game it automatically back to the main menu section

  • @sunilreddy2711
    @sunilreddy2711 3 роки тому

    Which compilers ur using

  • @danielcamozzi5241
    @danielcamozzi5241 Рік тому

    Ma per questo videogame non era possibile programmarlo con Java?

  • @janjamniksrpcic4517
    @janjamniksrpcic4517 3 роки тому +2

    Thank you!

  • @visiononlineschool6985
    @visiononlineschool6985 3 роки тому

    Thanks for your hardworking.. it helped us do it differently...

  • @mehedishoisob4014
    @mehedishoisob4014 Рік тому

    here is it work in Codeblocks? just after running it works?

  • @bhaveshsoudhai4622
    @bhaveshsoudhai4622 3 роки тому

    I have run it but it is showing me drawing operation was attempted when there was no current window
    Pls help mei sir I don't know what's the problem

  • @sirbap
    @sirbap 3 роки тому

    How can I run it or install !
    It's automatically shifted to vs code when I try to open

  • @prasadnyk1539
    @prasadnyk1539 3 роки тому

    Which algorithm is used?

  • @Heavy-coder11
    @Heavy-coder11 2 роки тому

    Sir game ka Code bana rhe he but usme multi-character character constant ka error aara he

  • @Marathi_Erudition
    @Marathi_Erudition 2 роки тому +1

    In line 203 :- [Error] a function - definition is not allowed here before '{' tokan
    And last
    Expected '}' at end of input.
    Only this two errors .

  • @viditwanjari666
    @viditwanjari666 2 роки тому +1

    can i run it on vs code

  • @designer9137
    @designer9137 2 роки тому +2

    The plus minus symbol = "alt + 241"