Learning SDL2 in 48 Hours - GMTK Game Jam 2020
HTML-код
- Опубликовано: 1 июн 2024
- 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 2 days I was able to put together a simple game, and I learned a lot along the way!
Check out Cursor Custodian here: polymars.itch.io/cursor-custo...
→ Source code: github.com/PolyMarsDev/Cursor...
Twitter: / polymarsyt
--Chapters--
0:00 Intro
1:03 Preparations
2:06 First Prototype
3:03 i am addicted
3:20 Prototype Code Explanation
4:15 Player Art and Animations
5:17 Adding Gameplay
7:18 Finishing Up and Submitting
7:29 oops
8:03 Conclusion
--Resources/libraries used--
C++/SDL2 RPG Platformer Tutorial for Beginners Part 1 | Setting up SDL2 on Windows - codergopher
• C++/SDL2 RPG Platforme...
Emscripten - emscripten.org/
SDL2 - www.libsdl.org/
--Music--
"Wallpaper" - Kevin Macleod (incompetech.com)
"Moon Base" - Evan King ( • CLASSIC CHIPTUNE (My F... )
"Getting it Done" - Kevin Macleod (incompetech.com)
"Biscuits" - Evan King ( • HIGH ENERGY CHIPTUNE ♫... )
"Alpha Channels" - Evan King ( • CHIPTUNE MENU MUSIC ♫ ... )
"Sneaky Snitch" - Kevin Macleod (incompetech.com)
--If you liked this video, here are similar ones you might enjoy!--
Vimlark - Making a game in 48 hours! - GMTK Game Jam 2020 (Indie Game Devlog)
• Making a game in 48 ho...
KaleChippsDev - Making a [Story] Game in 48 HOURS! | GMTK Game Jam 2020
• Making a [Story] Game ...
BenBonk - The Making of Package Patrick - GMTK Game Jam 2020
• The Making of Package ...
Sam Hogan - I Made a Zero Player Game
• I Made a Zero Player Game
Randall - Programming a New Physics Engine for my Game
• Programming a new phys...
Dani - I Made a Game in 48 Hours!
• I Made a Game in 48 Ho...
Blackthornprod - LUDUM DARE 42 - Making of EVOLUTION
• LUDUM DARE 42 - Making...
Jabrils - 🖥️ Making A Game in 48 Hours!
• Making A Game in 48 Ho...
part 2: ruclips.net/video/iEn0ozP-jxc/видео.html
wowie
Noice
Lol no one sees this also im 3rd
Yeet
5th
1:44 Congrats. You made the dvd screensaver.
WILL THE SMILEY HIT THE CORNER !!!?????
@@mateololero4091 lol
@@mateololero4091 yes.
CORNER HIT CORNER HIT
@@mateololero4091 **turns off tv** no.
Geez learning a new framework for a game jam, wouldn't expect anything less from you haha. Nice work!
Haha thanks! Not as crazy as making an entire cellular simulation for a game jam though ;)
Hi I also watch u. Soooooo ye :)
You both did amazing this jam!
Edit: spelling
oh HI sam hogan i love ur vids!
Sam Hogan why r u not verified yet ????!!
"The square moves away from the cursor"
*-Social Distancing 2020*
SD Familia lol
So true...
social distance
Lol
The squares/rectangles are just racist against all other polygons!
When the html port said ‘h bestyyyy’ I felt that
h BESTyyy
@@matthewmehring5946
h
BESTÿÿÿ
"Because this is a real programming language, unlike python"
"Python Sucks :O"
*hurt snake sounds*
Evelyn Patrick why he say that python not epic
hurt male sounds
Python is E P I C
imagine having to end with useless semicolons
@@EPICgamer11 Imagine having to deal with syntax errors
- Scratch gang
At 1:50, there was a cricket outside my window. The timing was so impeccable I had to rewind to check. :D
Lol
Now that's an ePiC bRuH mOmEnT, if I've ever seen one
Lol
I dont get it the timing of what
@@ovizcarra8667 the cricket sound effect, search it up
7:28 you think that's bad, I submitted my first Ludum Dare game with 20 seconds left to spare (I was on a trip and during submission hour I was going through customs at the airport)
Chipflake
Game name?
It really said “Bestyyyy”
@@ImSorryAmanai what?
@@nullFoo the glitch
"Because this is a real programming language, unlike python"
Oof felt that one..
Dude, uncool
I like python
@@samuelding7854 Don't worry, I do too. It's what I learned OOP with. It'll be with me till I die.
Same
i before I used gamemaker studio 2, i used scratch, which i’m pretty sure runs on python
"pizza plane" dont you mean
g e o m e t r y d a s h w a v e g a m e m o d e
lol
I thought the same
blast processing intensifies
Yes.
Shit i want that icon
Every time I watch someone make a game without a game engine...
My nerdy brain lights up in flames!
I only know how to use Unity, I think that I will lose my mind if I had to make my own RigidBody.
@@Choco____1 its not that hard dude
Oh, really? Well, maybe I'll try myself sometime.
@@Choco____1 well i will give you a tip visit this channel: DaFluffyPotato and watch his tutorial series
@@Choco____1 just apply real physic.
But that make the game boring anyway
"not python"
Me who codes in python: *hurt noises*
hahahah *it's funny cuz same*
Same
I try to code in python but do better in game maker, and c#
"Sad snake noises"
I do to (see my comment)
8:20 this was actually a problem I had with my first jam. A tip to anyone starting out: have other people play it because you're probably too good at your own game.
underrated as frick bro, you deserve to have well over a million subscribers
@@88sync2 Ik He has 15k subs, I'm just saying, he deserves more because he puts so much effort into editing these videos....
@@88sync2 ok, sure, i'm just saying he does......... whats wrong with that......
Thats nice
I'm impressed that you choose a new library each game jam! I can see the benefit of it; you're time boxing your analysis of the library while making something complete without procrastination.
I like the concept of the game. Given your own personal goal of learning a library, does that mean you forego the design step I see from so many others?
Really enjoyed your Dev log, thanks for sharing! 👍
Thanks! Recently the extent of my design step in game jams has been coming up with a basic mechanic, and I make up the rest as I go haha
"BORING! SHUT UP, NERD" -Some guy from Dani's videos
Love the idea of a ghost, maybe the left click could be a sound the ghost makes to cause the player to 'jump' in surprise
bruh if there was a story to this is be like
"its been three days and already ive had to jump 400 of theses weird platforms that seems to never end, my legs ach in tiredness as i see the death courser getting close. another brace for jump but will i have the strength to make it this time?
“We have to put semicolons there because this is a real programming language, not python”
Correct me if I’m wrong, but you can use semicolons in python. It’s not required, but you can.
Lol, I was thinking the same thing
Doesn’t PEP8 complain about them?
Imagine thinking semicolons are the mark of a real programming language though; I guess that makes css a real programming language :D
Time to make a game using jquery!
@@dwhiffing Not a mark, but a requirement. CSS is a programming language in the same way that Bubblegum (esolangs.org/wiki/Bubblegum) is a programming language.
Add a feature where if you hit something, then the character follows the mouse for a certain amount of time. So if you make the mouse a ghost, you can collect something that makes the ghost blue (like pac man) and if the character touches the blue ghost you die.
Love the concept, love the art style, would love to see a revisit to this game eventually.
Also the people that complained it was too fast may have a mouse sensitivity super high.
Wait, you can change the mouse's sensitivity?
@@CoolModderJaydonXYou didn't know that???
@@Konataware No. I figured that was baked into the mouse.
Poly Writes: "Python Sucks"
Flappuccino:
I tried your game... was pretty cool. The mechanics and art was awesome. :D
Thanks for trying it out! Glad you liked it :)
GOMTRY DASH
When he said python sucks...
I felt that. ):
And also it doesn't btw.
Syntax Error:
I felt that ):
^
Expected opening parenthese
Also Python is good
Python ftw
@@Yolwoocle Frick yeah
python is cool don't worry :)
@@PolyMars Frick yeah
3:03 I 100% agree with this man
+1
This is really awesome!
I've always been intimidated by the SDL library but your source code puts it into a much easier context!
Thanks for that and the video
"This is dani's typing background"
Oh how stupid I was
m i l k
Is it just me or is that typing background looking kinda T H I C C
Thos comment lookin kinda THICC, (insert stoopid billy robot here) frick u billy.
@dookie I mean that's basically everything on bid channel so it makes sense
@dookie he also makes games but ok
codergopher's video series taught me a lot. I wish he continued making it.
3:21 "I like you're funny words magic man"
No likes or reply? I’ll fix that
sfxr looks like a lot of fun! Been in need of some customizable retroish sfx, thanks for showing it off :3
This game looks very fun! I wish there was also a reason to move anywhere but forwards (to the right). The first suggestions which come to mind: 1) click (or hold LMB / RMB) above player to duck, 2) long pit, a "bridge platform" for which is located higher than you can jump. Then there'd be some block, walled from the left side, but open from the right side. Jump on it and then on the bridge.
These are awesome ideas, thanks for the suggestions! I’ll try to implement ducking and vertical climbing sections whenever I update the project since they’d definitely add a lot to the game :)
@@PolyMars Awesome, looking forward to seeing that. ;)
Khud0 - Indie Game Dev kinda sounds like a mash of the google Dino game and robot unicorn from adult swim. An interesting concept
@@OpticSpycrab_OG I've never seen the robot unicorn before! Thanks, I've checked it out. Yeah, the ideas are certainly similar, but this time the character runs away from your cursor. :)
Khud0 - Indie Game Dev it is indeed a neat idea add in some combat or more difficult platforming then I see a fun game that I could play in my offtime
I’m depressed you never said that the Square was social distancing.
🤣
It's a no no square
just cause the virus's still spreading dont mean it aint a dead meme
@@tri_wjbu *NONO DON TOUCH ME THERE THAT IS MY NONO SQUA-*
@@ReimuFumoPicture i can see right through your lies (im talking about the user name)
I love that someone shows that a gamejam submission don't works good all the time! Great video!
I legitimately screamed when he mentioned “puffle round-up”
The cart minigame and the ninja card stuff were my bred n butter
Godspeed
First 3 min and we learn python sucks.
Jk lol
Love SDL2! I open sourced a game engine that used it, and thanks to help from the community, it has been ported to 9 platforms, so cool!
0:57 Bfdi music makes me nostalgic
Not just bfdi.
Omg I love how his drawings are so simple, yet so cute ^_^
Looks really good! Awesome work especially considering you made your own engine.
Really nice work!
“But, what next?” *ad plays* “TACO NIGHT”
"Are ya coding son?"
Polymars:yea dad I'll finished this in 2 days
"Good"
*Close door*
*Meanwhile in Yandere dev stream His Dad joined to the stream chat*
"are ya coding son?"
*Banned him from letting him know what's a definition of coding*
Dad: ...
This meme will never due unless love letter is released I heard it will be free to play
@@deathshot7623 it only ends when the protagonist realized what his mistakes and apologize this will never end.
Drama everywhere (つ✧ω✧)つ
“Banned him from knowing the definition of coding” what does that even mean?
@@voidpickle5684 it means yandere dev is a bad coder and its why the game runs like shit. Poorly optimized
If you want you can still use semicolons in python...
Not that someone would ever want to.
im confused on how you have only 21K subs, Your videos are too good for that!
Cool! Inspired me to make a pretty cool game of my own. Love it!
Sooner or later your games will be more portable than DOOM! You could pretty much port this game to anything
playing doom on the calculator be like
I think you could even play this on ps vita with touch controls
Considering Terrifried's impressive 5 consoles, i think it could go much further.
is it just me or... you’re heavily underrated
"Well it's like a smily face, and you see it like bounces off of the walls" My favorite sentence of the video XD
the guy: "you put a semicolon because this is a real programming language, unlike python"
me: *finally someone who understands me*
:'(
My personal experience with SDL2 in my own projects has been largely positive. I was thinking of ditching it at one point because it seemed like it would ultimately be too high level at the end of the day for my usage, but then I learned a lot of games I know and actually like, such as Don't Starve, actually uses SDL2 and manage to make a very well-performant game so I've redecided on that. :D
also dead cells
SOMEBODY: PYTHON SUCKS
ME: SILENT SCREAMS
if u wann aget good at programming then python is not that good. but its is defiantly the best fro beginners
@@dranonjagaming8365 Yeah- certainly not beginner friendly imo if you have any intention to expand out to other languages. The syntax is far too different, at best you might get to Lua from it.
@@starman8853 I started with python and for some reason java seems perfect.
Python is so painfully slow for any real work
It is not a true programming language but the python sucks was a joke
nice work ... keep going !!!!
cool game! I liked it a ton!
Cool video!
I would have two ideas, if you like:
Let the player character make an axious face, when the cursor comes closer :-D
Make him run into the opposite direction IN GENERAL (so it would never stop and the player is always forced to make an input or watch out)
No one :
Me : *thinking that those dislikes are those guys who doesn't understand that when he said "phyton suck" that it was just a joke*
Python
A time thingy for u
Intro: 0:00
Preperations: 1:03
First Prototype: 2:06
i am addicted: 3:03
Prototype Code Explanation: 3:20
Player art and animations: 4:15
Adding Gameplay: 5:18
Finishing up and submitting: 7:19
oops: 7:30
Conclusion: 8:04
*epic*
*pls pin this it took time*
Well u dont need to do that, read the description
A small update I could recommend is adding a random limited spawn of enemies, some that jump, some that fly, some that walk, and some that just stay in place, I believe that would add some difficulty but to counter this you could simply give your little guy a laser that blasts these enemies away, but only shoot straight forward meaning you'll have to jump to hit the flyers. It wouldn't be hard to implement considering you know how to and it would give use to that ghost idea, giving the gloomy background purpose. 10/10 would try it out
Python: "How dare you insult me like that!"
Monogame is a c# framework that sounds similar to what you described as you wanting; high level enough to provide drawing functions n stuff, low level enough that you have to write your own physics, sprite handling, etc.
also my hot take is that I hate the way python and c++ both look. No brackets or semicolons? Disgusting. "::" and "
how about cocos2d-x if you want c++
I’m subscribed to all your channels 🌟
Dude the title and the thumbnail is soo attractive and cool
"The reason we end this line with a semicolon is because this is a real programming language, unlike python"
I already know I like this guy
You are annoying
@@samuelding7854 agreed
I don't even know python damn :(
This is a good vid! Very entertaining, Also you should try to make a 3D game.
i whatched this whole video thinking this was steven
but now i found another youtuber to whatch :D
Thanks for the code :) Just made a million.
Your videos seem to be interesting.
You got a new subscriber UwU
I have an idea: In most jams, you can use anything people can download. So..... Make a game.... In scratch (or some other block based coding platform) Think about it: It’s not advanced, so you’ll need to think outside the box. You can download scratch files and also upload
Edit: No-one is going to read this, why did I comment it?
Cool idea... scratch is my go-to coding platform...
Scratch more like bore ragnorok
@Saltwater toaster Just because the scratch games you have played (or made) are boring, does not mean that scratch is, itself, boring. You shoulden't make generalizations like that based on a small and biased sample size.
thestarchypotat my guy
You can make some very advanced stuff with scratch, it was my intro to programming.
YES
I use sublime text for my website and I absolutly love it, it's so good
Liked the MOMENT you mentioned Club Penguin
3:13 python would be very upset if python could read that
You should include explosions when the cursor is clicked! Show the player what the guy is running away from! (Or make something scary appear on screen)
Creepy, I had the exact same inspiration for my first level for my game in GMTK this year, the Cap Kingdom, same colour scheme too
I like the concept, I think that it is simple enough so that it could be used for a mobile game
"Python Sucks :O"
FINALLY SOMEONE SAID IT
@@spit2u744 I just love how triggered the python community gets from a 2 second offhand joke lol. The guy in the video literally made the slightest complaint about its syntax, and the comment section erupts lmao. Ah yes, telling someone to "shut [their] fucking mouth up" just because they agree with a syntax complaint lmao.
@@EnderGeneral149 No, it wasnt a joke, if you use Python, you are either really smart (python is not confusing for you) or really dumb
@@spit2u744 I wrote in Python and let me say, it is a fucking nightmare
Edit: to clarify, I wrote in JS for over a year and recently learned Java
i am sure pyhon is not for games, and other programs too.
its not very good when its alone
my cousin works for some spanish company and writing python
he never said he was working on making a program
usually servers and stuff
@@couldntsetpass2901 the it is not a programming language wasn't a joke
The python sucks written on the paper was a joke
i have no idea what all this coding stuff is but im entertained
I love SDL a lot. I use it all the time
"Because this is a real programming language, unlike Python"
Me; *_what did you just say_*
It is true though python is not a proper programming language
But that doesn't mean it sucks unlike what was put on PolyMars paper
@@KPoWasTaken ♪ What can I say except, ♪ Ḓ̷̨̻̂̈ ̷͈̻͇̃͝E̸̝̲̕ ̶̘̊̂̕L̶̬̇͊̂ ̶̣̝͎͑̀͐E̷̥̠̅̇ ̸̼̂Ț̵͂͋ ̶̮̣̈́̚E̴̖͈͛̍ ̶̼̇ͅͅ ̸̻̞͓̽́́ ̷̥̖͒̽̆ ̷̩́͛̏ͅ ̷̲̅ ̵̖̲̕͝T̶̫̒ ̶̫̮̟̄̅H̴̙̹̀͌͋ͅ ̴̖͐̐͝ͅI̴̬͖̣͝͝ ̸̧̤͎̊S̸͚͙͗͌
@@_fragment let me think about that
no
Get your "After Sam Hogan commented on this video" ticket!
Me : *Interested in coding stuff*
Poly : *starts speaking about it*
Also me : Ye, I quit.
thanks, this is dope
3:08 so assembly language is no real programming language.
3:12 im offended
I'm offended of your stupid grammar
@@bluemike1215 bruh
@@DevHedron it's "I am offended"
@@bluemike1215 Are you like 10?
@@DevHedron no I’m 25
*textures go BRRRRRR*
-polymars 2020
The new and improved dani.
I was thinking the weird gui at the end when he submitted looked kinda, out of control...
What i learned in this video:
-Textures go BRRRR
-Python sucks :O
i love the: TEXTURES GO BRRRRRRRRRRRRR from dani at 3:10
0:04 geometry dash wave
fr fr
Why do I feel like I'm cheating on Sam Hogan
You are. And so am I.
*Don't tell him*
Lmao denial
This man deserves more subs
My team and I ended up learning Godot over those 48h as we ran out of time before hand. We understand your pain
6:14 G R U B H U B
3:04 i can't even describe how relatable that is
I don’t understand anything from these videos but they seem cool and I like them
I totally understand this 😁
It is okay PolyMars you tried to do it in 1 day so don't feel bad about it.
Man, I love C++!
i always wanted to play a game like this when i was younger
To make it easier, you could make a circle that works as the radius of the cursor to move the guy. You could also make a person with low opacity at the same place as him that shows how high he’d jump if you clicked right now. You could add another mode where you can’t see it for people who want the challenge though.
Your intro music sounds great
Nice video shapeplanet