Making a Game With C++ and SDL2

preview_player
Показать описание
Making a Game With C++ and SDL2 - GMTK Game Jam 2021

A year ago, in my "Learning SDL2 in 48 Hours" video, I used the 2020 GMTK Game Jam as an opportunity to try to learn how to use C++ with SDL2 (a low level audio, input, and graphics library that you've probably heard of). In this video, I attempt the challenge again, for the GMTK Game Jam 2021!

---Chapters---

0:00 Intro
0:29 Setting Up SDL2
0:45 The Theme (bruh)
1:11 My Secret Plan...
1:34 Entity & RenderWindow Class
1:46 Drawing a Sprite
2:12 My Game Idea
2:37 Initial Prototype
2:55 Prototype Code Explanation
3:39 Prototype Art
3:49 Tiles & Collisions
4:05 Collision Code Explanation
4:23 More Art & Directional Indicator
4:34 Level Saving/Progression
5:17 wait frick
5:38 Creating UI
6:07 DESIGNING LEVELS FAST
6:40 Sound Effects
6:47 Finishing Touches
7:08 Secret "Feature"
7:33 Conclusion

---Music (in order played)---

"il vento doro" - JoJo's Bizarre Adventure: Golden Wind

--If you liked this video, here are similar ones you might enjoy!---

PolyMars - Learning SDL2 in 48 Hours - GMTK Game Jam 2020
PolyMars - Learning Python in 2 Days - Pygame Community Jam
PolyMars - Making a Game Using Discord's Bot API
Barji - Making a C++ Game with No Experience!
Randall - Programming a New Physics Engine for my Game
CodyCantEatThis - I Made The Legend of Zelda Boss Fights but they’re 3D
Dani - Adding a Dragon Boss to my Game Because Steam is Mad at me
Dani - He said I Couldn’t Make a 3D Game… So I Made One!
Sam Hogan - I Made a Game with Intentional Bugs
Sam Hogan - I Made the Hardest Game Ever
Рекомендации по теме
Комментарии
Автор

I love how your game was so good it decided to take the entirety of the available ram

_Guigui
Автор

Idk why but watching people create stuff without game engines is always oddly satisfying

Tantandev
Автор

Memory leaks could be a really good theme for a game. Just finish the game before the game crashes, or worst your computer crashes.
At the end the score can be calculated based on the total amount of memory leaked throughout the game. The least the better.

nishantmogha
Автор

I haven’t yet seen anyone talk about your game art, seriously, it’s very clean

Dorbellprod
Автор

Dude you're gonna have to teach me how you always get memory leaks in your games! I've always wanted to implement memory leaks but don't know where to start :(

barj
Автор

You know this is just BEGGING to be ported for the nintendo ds, right?

I mean, two screens... Stylus...

SummonerArthur
Автор

I love that you included the actual math in these videos. I try to pause and think how it works in a math equation.

joshkanyinda
Автор

Most MBs of memory leaks per second any% speedrun

SoicBR
Автор

Polymars: * hears the theme *
Polymars: My disappointment is immeasurable and my day has been ruined

CunningBard
Автор

The actual friction law would have the friction to be proportional to the velocity (maybe plus a little constant to lower the final tail of the movement). I think that way the movement would look more realistic

giovanniluddeni
Автор

I havent looked at the code, but seeing it from just this, most likely you are passing a texture by value instead of a reference, this makes your game building duplicates and pushing the memory pretty quick. Been there ;)

lolliepop
Автор

4:34 Maybe it would be nicer if you store level configuration in a JSON file then deserialize them on the fly using libraries such as nlohmann/json or similar. Then you don't need to painstakingly hardcode every level. And by using external data it would be easier to expand your game

devilxnuxify
Автор

I literally love your use of graphics to visually explain how your code works. 10 outa 10

vurtua
Автор

"So basically I wasted 48 hours" Ahh yes, the life of coding

MaxforceMaxforce
Автор

Another banger as always. Great work, Dude!

Goodgis
Автор

Well done. Amazing job. I wouldn't stress too much about the memory leaking. This is how we learn and become better developers. Keep going!

LeeG
Автор

Here's a tip:
Use a debug flag with the compilation command and then use a program like valgrind to analyse the executable. This'll help you track down memory leaks

cobblebrick
Автор

Was getting into c++ myself finally and in a breif handful of frames you solved my compiler needs, thank you

StrongLoneWolfPack
Автор

Great video! I really need to read into memory leaks more, and discover how not to do them, as I've just started doing more C++!
The game looks pretty fun and cute though! :D

GamesBySaul
Автор

Really liked the game concept. Too bad about the memory leaks but it's definitely a learning experience! Great stuff!!

WannibeManisha