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 - Наука та технологія
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
And of course, it won't work without the sprites-- github.com/OneLoneCoder/videos/tree/master/FroggerSprites
@@tonyblairr9758 How do i add the sprites to the project?
thanks
Just make sure the files are in the project folder
How to add sprites
This is exactly the sort of programming channel I wish for in my dreams.
Thanks Eric!
Your attitude and humor while explaining stuff reminds me of those of the best teachers I've ever had. Looking forward to your content!
Hey thanks Luis, cheers for that!
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!
Hey Alisson, welcome to our little community! I'm pleased you finally found us :D
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 :).
One video and I know I've stumbled upon a gem of a channel. Gonna binge it mate!
Hi Pratyush, thanks for your support. It means a lot!
At 16:10
Dude, instead of that hack with If(nStartPos
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!
Hey Cheers Danilo! Dont forget to drop by the discord server some time, loads of learners, help and talent on there
Great video Javidx9! I had a lot of fun following along and getting it working on my machine! Thank you for making it!
Thank you so much for this rare high quality content! Subscribed!
Hey Cookie Byte, what a nice thing to say! Cheers, it means a lot.
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!
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
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 ;) ).
For a change?! For a change?! XD Thanks Stephen, lol!
@@javidx9 hehe ;) Well the Retro formula 1 'car' was the real low point, but this was much better.
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
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...
Just found you and learning bits and bobs ....thanks, wish I was stronger at maths!
I am confused as to how you don't have more views.
Hi Leenus - It's our little secret society - welcome to the club!
likewise. his channle is so underrated, it's a shame :\
Majority of people in society do not want to use their mind. Thinking is hard.
Because C++
@@marcus_w0 probably. If it was java it would be bigger . C++ is so nice thougn
I wish i had discovered this channel a year before
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
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.
This channel is awesome, you make me feel stupid.
George Costanza has entered the conversation.
***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!
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}
Beginner advanced C/C++.
thank you
You're welcome!
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.
Thankyouuu
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?
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
@@javidx9 Wow thank you! It works! I had my character size to be 12 by 12, should have been 8 by 8.
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 :)
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.
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.
Great video! Like n 311😉👍🏻
Thank you Unknown Man!
Hello, do ypu have a tutorial where you explain how the file "olcConsoleGameEngine" works?
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?
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.
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? :)
I am a member of his team, as well. We would be grateful if you can help us :)
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
Which uni/college are you guys all from?
"if he jumps in the water... he's dead" what kinda frog is this xD
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
@@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.
@@yousefabdelmonem3788 god bless his poor soul
Im getting an error in the header file at line 434 "unhandled exception thrown:write access violation." this>m_buffscreen was 0x1110112.
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.
@@javidx9 thanks a bunch!
@@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! :)
Three Thumbs Up!
lol thanks skilz, its good to see Frogger getting some love :D
I haven't played it since Atari in the early 80s!
I'm not even gonna ask where the third thumb is kept :P
How ca we make a camera to make a tiny gta like game im your console game engine?
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.
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
Thank you for the quick response, now I can at least start the game :)
Oh and by the way, your videos are awesome!
Greethings from Dayton Ohio...
What means sprite? It is a image?
I get the ERROR: Screen Height / Font Height Too Big when i try to run olcConsole game engine i visual studio. Any suggestions anyone? :)
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.
@@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!!
People will watch pokimane but not these .....anyways could you please make c++ beginners programming how to get started.....😃
This make in fpc(pascal) with freebsd and dont have problems.
Make this when have 19 years.
good for you
tldr I got bored
Source code to lamers
Shit.