Things that make this a kofybrek game: 1. Tire skid sounds when mario changes direction 2. Mario gets cool glasses when defeating a goomba 3. Mario's eye tells us that he has seen things that he cannot unsee
For input control it's best to use a delta_horizontal and delta_vertical for instance. So when you press the left key, delta_horizontal += -1. If you press the right key delta_horizontal += 1. This means that when both keys are pressed, they cancel ech other out. No need for defining every edge case with a different if statement (which is slow).
@@Kofybrek And if you really want to flex, you could make an array of bools which are the current state of every (relevant) key press. So make an enum MovementDir { LEFT, RIGHT, UP, DOWN, numKeys }, then make an int keys[MovementDir::numKeys]. Add some logic to the SFML keypressed that determines whether the key is down this frame. Then just do if (keyPressed == SFLM_left_key) keys[LEFT] = isDown; And then you can do delta_horizontal -= keys[LEFT]. No need for any if statements for handling the input in your game logic.
@@SanderVermeer Why stop there, just hack the sf::Event to get the info, store that info in a 64-bit integer, and read straight from the bits using ASM code with comments in binary
I saw some of your videos, I like the way you talk about the topics of each video. You are such a spectacular developer and you can see the dedication to the details (srry 'bout bad grammar)
Hey man, I absolutely love how this turned out! And also the fact that you explained every thing that you had to do for the game, it really helps break things down into very simple and meaningful tasks! My opinion on you using c++/sfml for coding games is that you're based, keep it up! 😁
UPDATE!!!! I UPLOADED THE NEXT PART: th-cam.com/video/6SnGgsgV_GY/w-d-xo.html This video took a long time to make. So if you enjoyed it, please press the like button and subscribe if you wanna see more videos like this in the future. It really helps me out. Also, consider supporting this channel on Patreon for exclusive content as well as early access to future videos and projects: www.patreon.com/Kofybrek
Thats so good , I like it so much 👍🏻, I think you can make it better with a good mic because its so enjoyable and really good mic will make you a legendary content creator 💙👍🏻.
l've heard you from your minecraft video in c++ and l can't stop watching your videos!! Congrats from Greece! :D Edit: l didn't mean minecraft video l'm sorry hehe
@Kofybrek in your personal experience: Do you think is better to make a tilemap by setting and drawing a single VertexArray or by drawing a rectangle multiple time? Im trying to find an efficient way to create one but i could only code a tilemap generator with multiple rectangle shapes drawings
That complex collision check can be done with simple bounding boxes. Level format is a bit odd, I would just use simple indexes for tile types lookup for sprite, collision, etc, and store as a 2 dimensional array, significantly reducing code complexity and reducing errors. Since Mario and Goomba are similar you should have them both inherit a base class to reduce code duplication. Why are you loading from disk death sprite every death instead of just preloading it and on the fly rendering whatever state Mario is in?
@@puppergump4117 My comment mostly geared towards the overly complex code. The part of not loading death sprite is just basic common sense, not really an optimization, and it would also simplify code. If you load everything you need up front, then when you need them you can directly reference them, without loading every time you need, which will make for some very ugly code.
to be honest i dont watch your videos for the nollage of coding, i watch it for its entertaining and very funny idk why, you should try make Donkey Kong the original one, replie please
@@puppergump4117 Generally game engines are the way to go, not always. Some games are unique enough in design it makes more sense to make your own. Minecraft is extremely simple, but can benefit greatly from a custom engine. The point of my comment though was that MC isn't terribly complicated, just need a basic 3D engine that takes heavy advantage of culling, deterministic world generating code, perlin noise or something similar, and a basic physics system.
KOFYBREK RISE FROM THE DEAD PLEASE I NEED MORE C++ SFML VIDEOS
Things that make this a kofybrek game:
1. Tire skid sounds when mario changes direction
2. Mario gets cool glasses when defeating a goomba
3. Mario's eye tells us that he has seen things that he cannot unsee
For input control it's best to use a delta_horizontal and delta_vertical for instance. So when you press the left key, delta_horizontal += -1. If you press the right key delta_horizontal += 1. This means that when both keys are pressed, they cancel ech other out. No need for defining every edge case with a different if statement (which is slow).
That's a pretty great idea... I'm gonna try that in my next project.
That's a really good idea!
@@Kofybrek And if you really want to flex, you could make an array of bools which are the current state of every (relevant) key press. So make an enum MovementDir { LEFT, RIGHT, UP, DOWN, numKeys }, then make an int keys[MovementDir::numKeys]. Add some logic to the SFML keypressed that determines whether the key is down this frame. Then just do if (keyPressed == SFLM_left_key) keys[LEFT] = isDown; And then you can do delta_horizontal -= keys[LEFT]. No need for any if statements for handling the input in your game logic.
@@SanderVermeer Thanks! I will use this when I need to work with a lot of keyboard inputs.
@@SanderVermeer Why stop there, just hack the sf::Event to get the info, store that info in a 64-bit integer, and read straight from the bits using ASM code with comments in binary
I saw some of your videos, I like the way you talk about the topics of each video. You are such a spectacular developer and you can see the dedication to the details
(srry 'bout bad grammar)
Hey man, I absolutely love how this turned out! And also the fact that you explained every thing that you had to do for the game, it really helps break things down into very simple and meaningful tasks! My opinion on you using c++/sfml for coding games is that you're based, keep it up! 😁
UPDATE!!!! I UPLOADED THE NEXT PART: th-cam.com/video/6SnGgsgV_GY/w-d-xo.html
This video took a long time to make. So if you enjoyed it, please press the like button and subscribe if you wanna see more videos like this in the future. It really helps me out.
Also, consider supporting this channel on Patreon for exclusive content as well as early access to future videos and projects: www.patreon.com/Kofybrek
Awesome... got here from Reddit btw... cool post
Please make a Tutorial I am suffering to learn SFML
This comes up as tutorial but you just talk around what you did which requires a full understanding so not really a tutorial.
I'm using your videos to cope with the fact that code bullet isn't coming back.
What is code bullet ?
oh my god, this is AMAZING!
bro’s a c++ master I hope I can be like u one day
Bro your content is amazing haha ! LOve it.
Good job!
4:42 Same, it's so cool to see the smoke and mirrors in games sometimes
Amazing work, thank you!
You deserve a lot more subscribers.
Thats so good , I like it so much 👍🏻, I think you can make it better with a good mic because its so enjoyable and really good mic will make you a legendary content creator 💙👍🏻.
Yes, I'm planning to buy a new microphone once I reach my Patreon goal, since I don't have the money for it right now.
you tube is broken brother !! your videos deserves millions of views!!!
But instead Jake Paul gets millions
You just blow my mind. It is awesome
yey new video!!
You sir....are one smart guy! Very nice video!
It's amazing 🤩
Voce merece o mundo, amigo!
Good work brother.. 😲 (Alexander)
l've heard you from your minecraft video in c++ and l can't stop watching your videos!!
Congrats from Greece! :D
Edit: l didn't mean minecraft video l'm sorry hehe
You mean my raycasting video?
@@Kofybrek yes
Love the humour, style & content. Get ready for a well deserved exponential increase in subscribers...
We will never know what kofybrek has to say after each video :(
can you please make a tutorial video about how to use sfml with c++ for making game
sir. you saved me. now i know how to start my homework. thanks a lot
Such great content hope u upload more
I will!
SUPA MAIRO ON THE PS4 UAOOOOOOOOOOOOOOOOOOOOOOH!
Anything console-related would be a struggle to make
Sick.
you make me laugh
Excellent
Cant wait for part 2
7:51 - Bro did the wall cling storage
Nice work!
your video is so great !!!
This is amazing
@Kofybrek in your personal experience: Do you think is better to make a tilemap by setting and drawing a single VertexArray or by drawing a rectangle multiple time? Im trying to find an efficient way to create one but i could only code a tilemap generator with multiple rectangle shapes drawings
I've never used VertexArray to draw tiles. I think it's easier to use rectangles.
That complex collision check can be done with simple bounding boxes. Level format is a bit odd, I would just use simple indexes for tile types lookup for sprite, collision, etc, and store as a 2 dimensional array, significantly reducing code complexity and reducing errors. Since Mario and Goomba are similar you should have them both inherit a base class to reduce code duplication. Why are you loading from disk death sprite every death instead of just preloading it and on the fly rendering whatever state Mario is in?
Why are you pretending that this was done for any reason besides getting ad revenue on youtube? There was never any intention of making anything good.
Probably because his computer can run 16000x what this game uses and there was no need to optimize it anyways.
@@puppergump4117 My comment mostly geared towards the overly complex code. The part of not loading death sprite is just basic common sense, not really an optimization, and it would also simplify code. If you load everything you need up front, then when you need them you can directly reference them, without loading every time you need, which will make for some very ugly code.
@@xeridea Maybe he did that on purpose to make people angry, seems like something he'd do
I tend to ignore “ … is just” comments but your comment is pure garbage. You probably don’t even know what a pointer is.
"It works." Every time my code compiles.
Him saying goomba is hilarious
Man , you made me love c++ more
sweet engine
Hello. Good video :D
Very good
very pog video
cool
Watch out, Nintendo might try to make you spontaneously disappear.
I thought you were making a nes emulator lol. Would like to see it done with sfml.
wonderful !!!
We're getting sued by Nintendo with this one🎉
Hey. You could make a tutorial how to write simple C++ games with SFML... I WOULD LOVE IT cuz I need this)
I'm thinking about doing it.
@@Kofybrek OMG. I will hurry in complete learning C++ 😂
I approve it !
awsome but what app you made tuxtures with?
Aseprite.
Great video! thanks!!! When I compile solutions a error message appears : " Clamp is not a member of STD"
You need to use C++17.
@@Kofybrek Unfortunately it's the first thing I looked at but the error persists
@@creative1978 Strange. Maybe you're not including the correct libraries.
@@Kofybrek Thanks for the reply. However I solved it by writing a small function instead of clamp
Hhha fun and cool
"please work... oh yeah"
Hi bro, you always use chorno library in your c++ game, do you install the library or it is built in?
It's a C++ standard library like
to be honest i dont watch your videos for the nollage of coding, i watch it for its entertaining and very funny idk why, you should try make Donkey Kong the original one, replie please
Glad you enjoy it! People have already suggested Donkey Kong so it's on my list of ideas.
@@Kofybrek good to know
Where did you made this game in which application i want to know i am also making it in C++
I use Visual Studio.
This is neat, but why didnt you use the tiled editor for the maps?
I thought about using it. But it's only 1 level, so I don't think it's worth it. If I decide to add more levels, I'll use it.
Hi! This is a great video but I can't built the source code.
3:27
Seems strange that nintendo didn't already sued you
What is the tool that used to draw the mario?
Aseprite
U use visual studio code or visual studio
Visual Studio
@@Kofybrek thanks
Thank you very much for the video. What about a super simplified Minecraft?
I was thinking about doing that. I need to learn OpenGL though. But I will do it!
MC is far more complex, but doable, as shown in this video. MC from scratch no game engine 48 hours. th-cam.com/video/4O0_-1NaWnY/w-d-xo.html
@@xeridea Well there's really no point to using no game engine since you'd just write your own in the process of making something
@@puppergump4117 Generally game engines are the way to go, not always. Some games are unique enough in design it makes more sense to make your own. Minecraft is extremely simple, but can benefit greatly from a custom engine. The point of my comment though was that MC isn't terribly complicated, just need a basic 3D engine that takes heavy advantage of culling, deterministic world generating code, perlin noise or something similar, and a basic physics system.
Is this C++
Listen i don't know programming but I've some plans and no I won't try to make these at first but I'll learn
What's the language please
C++ and I'm using SFML for graphics.
@@Kofybrek Thanks
Your my Nye thicher
The colors are way too saturated with your textures
Well, I like bright colors.
Bro In which app have u made mario game???
I use Visual Studio Community.
The video has begon hope i will not be dissapointed
Update: was not dissapointed
Sdl2 is better
I hate coding heres should coding be
A)-show*(true)*collision*(false)*jump)fix
-friction(false)rick)starts(true)rolls
bro cant even draw mario
I tried my best!
@@Kofybrek you swap the red and blue
Amazing