Code-It-Yourself! Frogger - Programming from Scratch (Quick and Simple C++)

Поділитися
Вставка
  • Опубліковано 19 сер 2017
  • A classic arcade game this week, I show you how to create a Frogger game using nothing but C++ and the command prompt. Specifically this video is about how much of a burden handling graphics becomes, and it can massively increase the size of your code base. All in all this simple Frogger game is about 150 lines of code. Also, I have a sore throat.
    You can get the code here:
    github.com/OneLoneCoder/Javid...
    Blog: www.onelonecoder.com
  • Наука та технологія

КОМЕНТАРІ • 92

  • @javidx9
    @javidx9  6 років тому +13

    Hi All - My apologies for not uploading the latest "olcConsoleGameEngine.h" file. I'll put it up 7pm (gmt) today (21/08/17)
    Done! - You can get it here: github.com/OneLoneCoder/videos/blob/master/olcConsoleGameEngine.h

    • @tonyblairr9758
      @tonyblairr9758 5 років тому

      And of course, it won't work without the sprites-- github.com/OneLoneCoder/videos/tree/master/FroggerSprites

    • @michaelcollins399
      @michaelcollins399 5 років тому

      @@tonyblairr9758 How do i add the sprites to the project?
      thanks

    • @javidx9
      @javidx9  5 років тому +2

      Just make sure the files are in the project folder

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

      How to add sprites

  • @eholloway1983
    @eholloway1983 6 років тому +38

    This is exactly the sort of programming channel I wish for in my dreams.

    • @javidx9
      @javidx9  6 років тому +2

      Thanks Eric!

  • @luislomeli7317
    @luislomeli7317 5 років тому +15

    Your attitude and humor while explaining stuff reminds me of those of the best teachers I've ever had. Looking forward to your content!

    • @javidx9
      @javidx9  5 років тому

      Hey thanks Luis, cheers for that!

  • @damascenoalisson
    @damascenoalisson 6 років тому +6

    I've been looking for this kind of channel for a long time now, most people simply teach how to use a full-featured game engine instead of doing it yourself, thanks for showing us how to create the real thing!

    • @javidx9
      @javidx9  6 років тому +1

      Hey Alisson, welcome to our little community! I'm pleased you finally found us :D

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

    Bruh, you make really awesome videos, you get directly to the point I really really enjoy them, I can't thank you enough for all the guide you have made :).

  • @pratyushbsingh5995
    @pratyushbsingh5995 6 років тому +9

    One video and I know I've stumbled upon a gem of a channel. Gonna binge it mate!

    • @javidx9
      @javidx9  6 років тому +1

      Hi Pratyush, thanks for your support. It means a lot!

  • @yaroslavpanych2067
    @yaroslavpanych2067 5 років тому +29

    At 16:10
    Dude, instead of that hack with If(nStartPos

  • @TheChodex
    @TheChodex 6 років тому +4

    javidx9 thanks man for your vidoes i'm learning so much from you. I am trying to make my own console engine in C# by following your ones (i watch video how you use them and get rough idea on what they should do and i make my own little thing), you also help me alot to learn how to organize my code, progress is slow but i'm learning! Thanks again you opened whole new world for me!

    • @javidx9
      @javidx9  6 років тому +1

      Hey Cheers Danilo! Dont forget to drop by the discord server some time, loads of learners, help and talent on there

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

    Great video Javidx9! I had a lot of fun following along and getting it working on my machine! Thank you for making it!

  • @cookiebyte5760
    @cookiebyte5760 6 років тому +3

    Thank you so much for this rare high quality content! Subscribed!

    • @javidx9
      @javidx9  6 років тому

      Hey Cookie Byte, what a nice thing to say! Cheers, it means a lot.

  • @robertfaubion1311
    @robertfaubion1311 6 років тому +3

    Greetings from Tucson, Arizona! Your videos are challenging and so interesting. Would love to see a video with your detailed explanations on the inner workings of the OLC game engine! Thanks so much for all your effort!

    • @javidx9
      @javidx9  6 років тому +2

      Hi Robert, thanks and greetings! The following three vids pretty much cover it: ua-cam.com/video/u5BhrA8ED0o/v-deo.html ua-cam.com/video/tdqc9hZhHxM/v-deo.html ua-cam.com/video/cWc0hgYwZyc/v-deo.html

  • @stephenelliott7071
    @stephenelliott7071 5 років тому +2

    As always, simply and clearly explained - what a great channel. Then the game is graduarly built-up from an efficient but text based underlying framework onto a graphic representation (and some nice graphics for a change ;) ).

    • @javidx9
      @javidx9  5 років тому

      For a change?! For a change?! XD Thanks Stephen, lol!

    • @stephenelliott7071
      @stephenelliott7071 5 років тому

      @@javidx9 hehe ;) Well the Retro formula 1 'car' was the real low point, but this was much better.

  • @jean-naymar602
    @jean-naymar602 6 років тому +1

    Lol, when I saw the the thumbnail I thought "Hey, he apparently started to use a library for his graphics".
    But nope.
    I really like your videos because they trully give me the feeling that I'm learning something even though I'm kind of experienced with programming (but no way near a professional).
    And I know two channels that give me this feeling. Yours and Quill18Creates

    • @javidx9
      @javidx9  6 років тому +1

      Hi Jean-Nay, I must admit that was a concern I had when I made this video, I was unsure if it would put people off.
      As you know, this channel is all about learning, so I'm pleased you're enjoying it. I've subbed Quill now so that's more of my time rapidly disappearing...

  • @andymouse
    @andymouse 4 роки тому

    Just found you and learning bits and bobs ....thanks, wish I was stronger at maths!

  • @leenus2348
    @leenus2348 6 років тому +54

    I am confused as to how you don't have more views.

    • @javidx9
      @javidx9  6 років тому +18

      Hi Leenus - It's our little secret society - welcome to the club!

    • @aryesegal1988
      @aryesegal1988 6 років тому +1

      likewise. his channle is so underrated, it's a shame :\

    • @theforbiddenknowledge1897
      @theforbiddenknowledge1897 5 років тому +3

      Majority of people in society do not want to use their mind. Thinking is hard.

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

      Because C++

    • @researchandbuild1751
      @researchandbuild1751 4 роки тому

      @@marcus_w0 probably. If it was java it would be bigger . C++ is so nice thougn

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

    I wish i had discovered this channel a year before

  • @BrekMartin
    @BrekMartin 6 років тому +2

    Nice one again :) I figured straight up it would be a bunch of reels like that :D Sideways it could be a slot machine :D

    • @javidx9
      @javidx9  6 років тому +1

      Cheers, slot machine frogger sounds like a cool mod! Yeah, the reels thing makes much more sense compared to handling objects, and I'm certain it's how the original would have been implemented. I've always wanted to build a purely mechanical slot machine, something about mechanising pseudo-probability with bias seems fascinating to me.

  • @tahak7411
    @tahak7411 5 років тому +3

    This channel is awesome, you make me feel stupid.

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

    George Costanza has entered the conversation.

  • @leerv.
    @leerv. 4 роки тому

    ***EDIT: I deleted the project and tried again and now it works! I think I may have not actually included the OLCGameEngine.h file in the project. I'm EXTREMELY new to C++ and VisualStudio, so some bumps in the road are to be expected! Thanks, Javid, for providing such an awesome resource!

  • @GhomezAnonimous
    @GhomezAnonimous 4 роки тому

    Trying to interpret this into Java but no idea what the Java version of Vector is?? so I used a Map only to find can't have duplicate keys, so I switched float and String then it rendered backwards :( it works well with float[] and String[] ([] Array) so far . . . it took days to fig that out though {Facepalm}

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

    Beginner advanced C/C++.

  • @D-K-C
    @D-K-C 6 років тому

    thank you

    • @javidx9
      @javidx9  6 років тому

      You're welcome!

  • @Volker-Dirr
    @Volker-Dirr 4 роки тому

    I saw you the first time writing an x while painting it into the not allowed block. While all the time you write an x, you write someting like >< or )( instead of x.

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

    Thankyouuu

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

    Hi Javid, I'm trying to follow along, somehow there is an Exception thrown 'write access violation. this-> m_bufScreen was 0x1110112.' In the debugger, m_bufScreen is pointing to in the OLC game engine. Do you know what is going on?

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

      Sounds like the console you are creating is too large to fit on your display. Try halving the fonth and fontw values in ConstructConsole function

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

      @@javidx9 Wow thank you! It works! I had my character size to be 12 by 12, should have been 8 by 8.

  • @MultiTrickster121
    @MultiTrickster121 5 років тому +1

    Hi there, I don't exactly understand how you used the sprite generator to create the sprites. I know that it comes with the updated version of the olcGameEngine, but I don't understand how to launch it like you did in the video. I started coding in c++ quite recently and I very much want to complete this game so I would really appreciate your input. Thanks in advance :)

    • @javidx9
      @javidx9  5 років тому +1

      Hi H123, the sprite editor is a program that is created in console game engine. As such it needs to be downloaded and compiled like any other example code from the videos. It also has limited features, so you specify the size of the sprite and its filename in code before you compile.

    • @MultiTrickster121
      @MultiTrickster121 5 років тому

      Hi there, Thanks for your response. I tried to do as you said but when I tried to run the editor I got an error that says " 'min': identifier not found " coming from the gdiplustypes.h file. The error code is C3861.

  • @unknownman6833
    @unknownman6833 5 років тому +2

    Great video! Like n 311😉👍🏻

    • @javidx9
      @javidx9  5 років тому +1

      Thank you Unknown Man!

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

    Hello, do ypu have a tutorial where you explain how the file "olcConsoleGameEngine" works?

  • @berkayzuhre6617
    @berkayzuhre6617 6 років тому +1

    How can I use the Sprite Editor to make my own games? You give small hints in the video but I get confused when I try it myself. Do you have a special video for it?

    • @javidx9
      @javidx9  6 років тому

      HI Berkey, I dont have a special video ,sorry! But its not too difficult.
      Its not a standalone program, it should be setup in code as needed and then run. So you'll need to specify the filename and size of the sprite you want to edit in the source code. These are in the OnUserCreate function.
      Compile and run. Use the arrow keys to navigate the cursor around, page up and down to zoom in and out, shift and arrow keys moves the "canvas" around. Other keys are displayed on the screen, holding shift gives you more colour options.
      Use space and delete to set/erase pixels.

    • @berkayzuhre6617
      @berkayzuhre6617 6 років тому

      Hey, thank you for your answer :) I asked you this because I am trying to make Pacman with your engine :)
      I am a sophomore industrial engineering student and I am taking Introduction to Object Oriented Programming with C++ class. Our professor wants us(100 students) to take your games and convert them to object oriented games. Me and my group, we are really stuck at drawing sequence and collaboration diagrams for your RetroCarRaceGame. Can you give us feedback or consultancies about this? :)

    • @efdalarik620
      @efdalarik620 6 років тому

      I am a member of his team, as well. We would be grateful if you can help us :)

    • @javidx9
      @javidx9  6 років тому +2

      Hey guys. I'm happy to offer some occasional advice but it's easier on my discord server than the you tube comments discord.gg/AwK4Xj2

    • @javidx9
      @javidx9  6 років тому

      Which uni/college are you guys all from?

  • @8.O.8.
    @8.O.8. 3 роки тому +1

    "if he jumps in the water... he's dead" what kinda frog is this xD

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

      The water uhh, comes from pollution sources. It's a feature. The frog is escaping the evil corporate wetlands, so it can be moist in safety

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

      @@brianwaltse281 Plot Twist: The evil corporate wetlands is all there is, and the frog has been trying since the 80s, at least he's got the spirit.

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

      @@yousefabdelmonem3788 god bless his poor soul

  • @Goregreet
    @Goregreet 5 років тому +2

    Im getting an error in the header file at line 434 "unhandled exception thrown:write access violation." this>m_buffscreen was 0x1110112.

    • @javidx9
      @javidx9  5 років тому +1

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

    • @Goregreet
      @Goregreet 5 років тому

      @@javidx9 thanks a bunch!

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

      @@javidx9 I am receiving this exact same error on the same line while attempting to follow along... I cut both the fontw and fonth values from 12 to 6 in the construct console function, but I am still getting the same error from the header file m_buffscreen was 0x1110112. Any other suggestions? These videos have been a huge help! :)

  • @skilz8098
    @skilz8098 5 років тому

    Three Thumbs Up!

    • @javidx9
      @javidx9  5 років тому +2

      lol thanks skilz, its good to see Frogger getting some love :D

    • @skilz8098
      @skilz8098 5 років тому

      I haven't played it since Atari in the early 80s!

    • @davep7176
      @davep7176 4 роки тому

      I'm not even gonna ask where the third thumb is kept :P

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

    How ca we make a camera to make a tiny gta like game im your console game engine?

  • @DenNis-cb8kq
    @DenNis-cb8kq 6 років тому +1

    Now I don't know if this is the right place to discuss this, but to be honest I am a little bit desperate right now. I tried your code, but whenever I started it, I got an error in the header-file saying 'Exception Thrown: Write Access Violation "this->m_buffScreen" was "0x1111F72"'. I would be grateful, if you (or somebody else) had any tips how to solve this problem. I tried Google, but what I found couldn't help me.

    • @javidx9
      @javidx9  6 років тому +1

      Hi Den, This sounds like you're trying to create a console that's too large for your desktop display. Try reducing the character size in the ConstructConsole function. For clarity in the videos I dont check for errors when calling this function

    • @DenNis-cb8kq
      @DenNis-cb8kq 6 років тому +1

      Thank you for the quick response, now I can at least start the game :)
      Oh and by the way, your videos are awesome!

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

    Greethings from Dayton Ohio...
    What means sprite? It is a image?

  • @aphenkan
    @aphenkan 4 роки тому

    I get the ERROR: Screen Height / Font Height Too Big when i try to run olcConsole game engine i visual studio. Any suggestions anyone? :)

    • @javidx9
      @javidx9  4 роки тому

      Your screen is not big enough to display the size of the console you are creating. Try halving the fontw and fonth values in construct console function.

    • @aphenkan
      @aphenkan 4 роки тому

      @@javidx9 The error message disappears but the screen is just black with a slowly blinking cursor. There is a very quick flash in the beginning of the execution . A screen that pops up and goes away maybe? I am trying to run code from frogger and from the 3d gameengine tutorial.
      im running visual studio 2017.
      Thanks for the quick answer!!

  • @sudiptoghosh53
    @sudiptoghosh53 5 років тому +1

    People will watch pokimane but not these .....anyways could you please make c++ beginners programming how to get started.....😃

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

    This make in fpc(pascal) with freebsd and dont have problems.
    Make this when have 19 years.

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

    tldr I got bored

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

    Source code to lamers

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

    Shit.