@@cherryberry1345 this was probably a privated video 9 hours ago, he commented, and 9 hours later (aka now) he unprivated the video to be released to the public
@russori57583 жыл бұрын
anything but golfed
@AntChannel3 жыл бұрын
@@cherryberry1345 was programmed i think
@Tantandev3 жыл бұрын
Idk why but watching people create stuff without game engines is always oddly satisfying
@OGA-b4l3 жыл бұрын
hey Tantan, please create more rust games :) love to watch your videos
@klanehz62913 жыл бұрын
Hi tantan
@Dorbellprod3 жыл бұрын
It truly is.
@PolyMars3 жыл бұрын
this is so true
@inv41id3 жыл бұрын
Imo it's the bestest way of making games... though I personally think of it as writing a custom engine for the game, not as "not using" a game engine
@_Guigui3 жыл бұрын
I love how your game was so good it decided to take the entirety of the available ram
@not_herobrine37522 жыл бұрын
unused ram is wasted ram
@jased84612 жыл бұрын
im running it and its currently taking 32gb and counting help
@not_herobrine37522 жыл бұрын
@@jased8461 goated setup
@achtsekundenfurz78762 жыл бұрын
There's also that innocent look... It wouldn't look out of place on the SNES with those shades of green and 2D shapes. You could build a golf level that looks like a Super Mario World screen. Inside a program that leaks more RAM than the SNES ever had - in a single frame.
@sophiacristina2 жыл бұрын
@@not_herobrine3752 I guess i never waste my ram, i even use virtual memory so there is more to not waste!
@Dorbellprod3 жыл бұрын
I haven’t yet seen anyone talk about your game art, seriously, it’s very clean
@bytblox33663 жыл бұрын
frrrr
@EpicVideoGamer77713 жыл бұрын
was thinking the same thing
@WinterNox2 жыл бұрын
Why does he draw them blurry tho
@Dorbellprod2 жыл бұрын
@@WinterNox because anti-aliasing is pretty cool I suppose
@WinterNox2 жыл бұрын
@@Dorbellprod He over uses it imo
@barj3 жыл бұрын
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 :(
@Chadderbox3 жыл бұрын
I might be able to help you there
@yeppiidev3 жыл бұрын
@@PolyMars haha nice deal nope
@RobLang3 жыл бұрын
Savage.
@frosty76743 жыл бұрын
Just make everything public in a class, or overload lot of functions or kinda just badly organize your code and you're done. No need to pay $20,000
@yeppiidev3 жыл бұрын
@@frosty7674 lmao
@nishantmogha76793 жыл бұрын
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.
@coronaklledmebot48562 жыл бұрын
ok mogba
@greg773892 жыл бұрын
Yeah but then it becomes pay to win since more RAM = easier gameplay
@nishantmogha76792 жыл бұрын
@@greg77389 You can complete the game with more ram but that wouldn't help with the overall score. More the memory leak lesser the score.
@ZqTi02 жыл бұрын
@@nishantmogha7679 Then there has to be an inital score or a set time limit. More RAM = more time to play = more score to accumalate.
@anon_y_mousse2 жыл бұрын
That would certainly be an interesting form of code golf. Shorter code, shorter play time, win!
@MansoorCodes3 жыл бұрын
The king is back 👑
@wit28173 жыл бұрын
YOUR the king!
@mukeshjain75143 жыл бұрын
No your the general
@echratus3 жыл бұрын
@@wit2817 you're * jk jk
@TheSpekeyMan3 жыл бұрын
Hi
@Furetto1263 жыл бұрын
Oh hello there
@joshkanyinda55693 жыл бұрын
I love that you included the actual math in these videos. I try to pause and think how it works in a math equation.
@stxnw3 жыл бұрын
u have to THINK? how old r u?
@joshkanyinda55693 жыл бұрын
@@stxnw he included the Pythagorean theorem and slope form into code? I read it to understand how the hell he did it. I’m 15 btw.
@stxnw3 жыл бұрын
@@joshkanyinda5569 oh ok then it’s fine. i was like that at 15 too
@prodbytukoo2 жыл бұрын
If you are interested in getting into gamedev, you will be using the Pythagoras theorem all the time, and try to understand the atan2(x, y) function, it's really important. I recommend you getting into interesting pre-calculus stuff, mainly trigonometry, it's used a ton in everything. For example sin(angle) returns a 'y' position and cos(angle) returns a 'x' position of a circle, that's something that usually high schools don't teach, but it's very important. The movements of the ball of this game are for sure using sin(angle vs mouse) for 'y' velocity and cos(angle vs mouse) for 'x' velocity. If you graph it you will see that if you draw a line for each position in the circumference starting from the middle, the length will be the same, which in linear algebra is called magnitude, this means that the force that it is applying is the same for each direction. Hope you find it interesting, good luck.
@sonialucy15 ай бұрын
You might as well toss in some differential equations
@CunningBard3 жыл бұрын
Polymars: * hears the theme * Polymars: My disappointment is immeasurable and my day has been ruined
@silverthehedgehog89893 жыл бұрын
Next Year: we need a new Game Jam idea! Game Jam: No we do- PolyMars: YES, YOU DO.
@SoicBR3 жыл бұрын
Most MBs of memory leaks per second any% speedrun
@SummonerArthur3 жыл бұрын
You know this is just BEGGING to be ported for the nintendo ds, right? I mean, two screens... Stylus...
@PolyMars3 жыл бұрын
ohno
@slomg_3 жыл бұрын
@@PolyMars you have to do it now (◕ᴗ◕✿)
@slitnotgm3 жыл бұрын
@@PolyMars port it for nintendo 3ds. *now.*
@sweetcorm3 жыл бұрын
@@PolyMars oh yeah
@rogerwinright22903 жыл бұрын
@@PolyMars Now, it must happen
@Goodgis3 жыл бұрын
Another banger as always. Great work, Dude!
@vurtua73 жыл бұрын
I literally love your use of graphics to visually explain how your code works. 10 outa 10
@devilxnuxify3 жыл бұрын
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
@programaths3 жыл бұрын
LDTK, which spit out a JSON. So you even have a very competent level editor!
@giovanniluddeni6633 жыл бұрын
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
@PolyMars3 жыл бұрын
oh that's interesting, thanks!
@greg773892 жыл бұрын
But IRL the golf ball will do some bouncing at higher speeds, meaning it has no ground contact at those times and thus will have less friction than a slower moving ball. Plus, you'd actually be simulating a particle moving through a fluid of a certain viscosity rather than simulating a ball rolling on a rough surface.
@silience40952 жыл бұрын
Friction is independent of speed tho.
@fuji_films2 жыл бұрын
@@silience4095 Well, not really. Friction in a fluid is directly proportional to the speed, when v is small, or to the square of the speed, when v is big. Look up, for example, Stokes equation for a sphere moving into a fluid.
@silience40952 жыл бұрын
@@fuji_films That is aerodynamic/hydrodynamic drag. Also, there's pressure drag, friction drag, wave drag, and induced drag. You're talking about the total, which is only partly due to friction. So, no, I wouldn't say that friction can be used interchangeably with drag. They don't mean the same thing. In the comment thread, we are talking about the classic friction. Static, rolling, and sliding. None of those 3 depend on speed.
@Maxforce12Maxforce123 жыл бұрын
"So basically I wasted 48 hours" Ahh yes, the life of coding
@Lee14G3 жыл бұрын
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!
@slumberdemon3 жыл бұрын
When the world needed him the most he returned
@troyc333 Жыл бұрын
You didn't waste 48 hours writing a game in C++. You gained 48 hours of invaluable knowledge and experience of coding in C++. Well done!
@topiaz3 жыл бұрын
Yay, a new PolyMars video! Maybe I guess this night could get better after all! Also, you're so close to 100k, Glad you've gone so far! edit: yay poly got 100k :>>>>>>
@OrigamiSpotLikeSubShare3 жыл бұрын
He got it!!!
@wateryagarvideos51863 жыл бұрын
113k now. Lolz.
@OrigamiSpotLikeSubShare3 жыл бұрын
@@wateryagarvideos5186 Yeah lol!
@LeftoverAtoms Жыл бұрын
Thank you for getting me into C++! Now I know what a real programming language feels like after using C# for years.
@citrinesanimations3 жыл бұрын
Pog you’re about to hit 100k!! Good job buddy!
@PolyMars3 жыл бұрын
thank you lego man!!!
@yeppiidev3 жыл бұрын
@@PolyMars wait what last time i saw you, your sub count were on 50k how did your subcount go high
@Ansh77K3 жыл бұрын
@@yeppiidev yt reccomended his video a lot ,
@StrongLoneWolfPack2 жыл бұрын
Was getting into c++ myself finally and in a breif handful of frames you solved my compiler needs, thank you
@lolliepop1123 жыл бұрын
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 ;)
@nikkiofthevalley3 жыл бұрын
Pointers, pointers, pointers!
@celmaibunsamper42832 жыл бұрын
@@nikkiofthevalley i think every1 hate pointers..
@nikkiofthevalley2 жыл бұрын
@@celmaibunsamper4283 At this point (ha!) I hate them even more than I did when I posted that, I've had to do a lot of pointer arithmetic and binary operations recently
@karankumarmageswaran15502 жыл бұрын
@@celmaibunsamper4283 fr
@milktobo74182 жыл бұрын
@@celmaibunsamper4283 If you hate pointers then C/C++ is too powerful for you. Stick with scripting languages.
@mrmath5193 жыл бұрын
I lovve your videos, they motivate me so much to learn new libs and c++ itself!
@redcubedev3 жыл бұрын
the 200 megs / second are probably the funniest thing i heard all day love your videos
@haukauntrie3 жыл бұрын
"Don't get me wrong, I'm still gonna steal his code." Too relatable.
@cobblebrick2 жыл бұрын
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
@sc4tt3rbr4inZ3 жыл бұрын
7:09 hey thats me
@WannibeManisha3 жыл бұрын
Really liked the game concept. Too bad about the memory leaks but it's definitely a learning experience! Great stuff!!
@Skeffles3 жыл бұрын
Fantastic spin on the theme! It's unfortunate about the memory leak because it looks great. Also you're so close to 100k subs! You'll get there soon :D
@CharcoolDev3 жыл бұрын
He is back! Great video polymars, great attempt 2 of the challenge
@logosking28483 жыл бұрын
Would've been chadly if you simply said the memory leaks were a feature and not a bug. Also you make great content. I've learned a lot about game development and art design from you. Your games always look really nice and have a really consistent style.
@rocket27392 жыл бұрын
Whoever is brave enough to use SDL deserves a medal
@GamesBySaul3 жыл бұрын
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
@EricWAtchesVideos3 жыл бұрын
I ran valgrind on the resulting binary. The only memory leaks were in the Intel DRI graphics driver on my system. There were uninitialized variables for SDL funtions called which should be initialized in anything that would be released. But, this is a quick game example. I did find that the strokes counter should have used std::str.append() instead of +. Also, I wouldn't want to make it too easy, but if the mouse is moved outside of the window area (or screen if you use SDL_WINDOW_FULLSCREEN) it stops increasing the stroke power. I might accomplish that via keyboard or fix this.
@nothingiseverperfect3 жыл бұрын
Omg I started laughing so hard when you said it didn’t work because of memory LEAKS LOL THAT WAS SO UNEXPECTED WHY DID THAT HAPPEN?!? I THOUGHT IT WAS GOING SO WELL LMAO
@ThatNiceDutchGuy2 жыл бұрын
The memory leak is a bonus feature, it is all connected you know. 😂 Well done, none the less!
@chameleonedm3 жыл бұрын
Respect for the name, Twinigolf is lowkey gigabrain
@kilgarragh3 жыл бұрын
When used improperly old things like c and even c++ can cause issues, be slow, break systems, and be very insecure… But when harnessed correctly C is one of the fastest most efficient and powerful programming languages you can write
@anthonyyang633 жыл бұрын
Love the dream speedrunning music!!! XD
@КостяКиндалюк3 жыл бұрын
Your videos with making games with SDL are so amazing that I want to launch Visual Studio and make some games with SDL2!
@kyonas60472 жыл бұрын
its so funny last time i watched this vid i knew nothing about game dev and now somehow im using SDL2 to make a game and now i can relate to everything in this vid lol
@Keyshooter3 жыл бұрын
i can see it in a near future "so, i use java to avoid memory leaks since the garbage collector should take care of that for me but i still got memory leak" just kidding tho, great job making it, will try it for sure
@mahyellaw3 жыл бұрын
i relate too much on your reaction to the theme lol. great video as always man, also you're close to 100k! :DDD
@metalbroga3 жыл бұрын
I liked it because you didn’t used any engine, just some c++libs! That’s cool! I’ll check your channel for more content like this, it’s my first time here
@nineephe3 жыл бұрын
The editing is just top notch! I really like your style.
@10dvvks.d.r.tharun153 жыл бұрын
well done, I participated in that game jam too, really excited to see your work for the upcoming brakeys game jam 2021.
@mohammadshaf43903 жыл бұрын
Dude I am not into game dev that much but your content is great love the humour and sarcasm I was waiting for your video plz upload more often ✌
@ZygerGFX3 жыл бұрын
i really like the way it turned out. not using an engine is a challenge in itself but this game is actually very fun. awesome work !
@Qwetzxl3 жыл бұрын
Ayyy the king returns pog
@dragon_pro694203 жыл бұрын
5:40 Among us!
@geniuspig1748 Жыл бұрын
You mean m o g u s💀
@RyzhaBalahadiaАй бұрын
I saw it
@Willeexd13373 жыл бұрын
Congratz to 100K subs!!
@DylanMatthewTurner3 жыл бұрын
It was a fun jam for sure. My brother and I participated as well
@SprintKeyz3 жыл бұрын
Wow! 100k! Congrats, keep up the great work!
@alexismandelias3 жыл бұрын
I'd love to see a video where you fix the memory leak. Should be a fun experience.
@SparkY-Minecraft3 жыл бұрын
Yo almost 100k! An early congrats !!
@nukeemyeah72933 жыл бұрын
“ I guess it was a learning experience or something” lol
@kenni2ever3 жыл бұрын
Happy 100k Poly!
@idedary3 жыл бұрын
Cool, can't wait for you to review Opera's GX "No-Internet" Jam. I'm also participating :D
@Unpug3 жыл бұрын
100K! Congratulations!
@PossiblyAxolotl3 жыл бұрын
Niiiccceee I’ve always wanted to have memory leaks in my games but could never figure out how to get them to work
@rallyman943 жыл бұрын
Great video, as always!
@notironicallycasters3 жыл бұрын
7:31 IM IN THE VIDEO
@YessoN-YT2 жыл бұрын
x)
@notironicallycasters2 жыл бұрын
@@YessoN-YT tu fais quoi ici ????
@YessoN-YT2 жыл бұрын
@@notironicallycasters Toi aussi tu fais quoi ici x)
@notironicallycasters2 жыл бұрын
@@YessoN-YT tu connais ce youtuber ?
@eboatwright_3 жыл бұрын
Ayyyy Congrats on 100k! I remember when you were at like 200! :D
@lefantastique593 жыл бұрын
When I saw you didn't unload your level when it's finished I knew something would happens with memory leaks lmao
@andeemengaming50003 жыл бұрын
lololololol
@friedrichmyers7 ай бұрын
I like how the Physics is simple but yet the game is so creative. I guess I should also start by making simple games first, in order to finish the projects on time.
@nextProgram3 жыл бұрын
Looks sick. Did you figure out where the memory leak was coming from?
@PolyMars3 жыл бұрын
yeah, I apparently can't use SDL properly- I was creating a texture from raw pixel data every frame without destroying it
@WinterNox2 жыл бұрын
@@PolyMars I'm not a programmer >:(
@Unit_002 жыл бұрын
@@PolyMars this applies for a lot of things in programming, but generally resource loading/initializing is very intensive, and you should do it just once somewhere in a constructor or something like that
@Hexedbug3 жыл бұрын
poly mars videos are always a treat
@immortaldev14893 жыл бұрын
I highly recommend using visual studio instead since it shows the amount of memory being used by the application, or just have task manager running when you run the program
@benqbtw88813 жыл бұрын
Congratulations on 100k!
@DRcrow-um5bh Жыл бұрын
7:59 I don't know C ++ I am just Learning C. So, I won't understand even if I look at it 🙂🙂
@justyose96163 жыл бұрын
Congrats on 100k subscribers!
@ThePolyEarth3 жыл бұрын
Hello? Poly mars?
@macmoholic62833 жыл бұрын
3:51 what task board are you using? I haven’t found one I like yet, but the one you’re using is unfamiliar to me
@user-vz1yu1rz4k3 жыл бұрын
Trello
@platinumdiamond73 жыл бұрын
I wish I could be on your level of programming. I'm an amateur at Godot a separate game engine
@OGA-b4l3 жыл бұрын
Then learn to make a game without a game engine Right now i am making my own simple engine with plain C and OpenGL with the GLFW library I have learned so many things because of the decision to not use a game engine
@michaelsanjaya25533 жыл бұрын
@@OGA-b4l Hello, im kinda new to programming. If i want to make my own game, should i first study using game engine such as unity or not using game engine like SDL with c++? Thank you
@OGA-b4l3 жыл бұрын
@@michaelsanjaya2553 well if you want to make a game you should use a game engine But if you want to learn how to program and maybe get a job later, learning how to make a game engine (or how to make a game with a library) will teach you so many things about programming in general If you use a game engine you will learn how to program in that game engine but most of your skills will be useless ouside of that engine If you make your own game engine or use a library like for example: SFML, Allegro or SDL you learn how to reder object and make your own systems TL;DR: if you want to make a game, use a game engine like unity or godot BUT if you want to learn how to program, making your own engine or using a library will teach you so much and will maybe be able to get you a job. Have a great day and tell me what you are gonna do
@michaelsanjaya25533 жыл бұрын
@@OGA-b4l Thank you very much for the detailed explanation! I think im going to do the 2nd option that is make my own game engine because i love to code. Is there any recommendation for the library in c++ or just start learning SDL like in the video??
@OGA-b4l3 жыл бұрын
@@michaelsanjaya2553 you said you were new to programming, then i would go with SFML. There are a lot of tutorial here on youtube and it is a lot easier then SDL.
@B8Code3 жыл бұрын
Can't wait for you to get your 100k Plaque btw great video 👍🏼
@brainfl23603 жыл бұрын
You don't need to fix memory leaks, just give it a description like: "Use less than () strokes or the game will crash" :)
@richardszoghy19073 жыл бұрын
Me watching this instead of working on my coding homework (which is a game using only C and SDL2): *Nice!* Also, it wasn't 30 minutes since one of my "class"mates told me how she is afraid to make memory leaks and fuck it all up. Either life has a good narrative or Google has a good algorythm to recommend videos. Anyways, really nice game! I love the speedrun timer!
@askcookie13 жыл бұрын
Next challenge: Learn to integrate LUA(or other scripting language) interpreter with any engine, then learn this scripting language and use it as main game logic code.
@defaulttool3 жыл бұрын
pretty sure he did that in the pixel art one
@Austinkeith20102 жыл бұрын
and then import the code to roblox. (Roblox code is in lua)
@etaigabbai3 жыл бұрын
Congrats on 100k!
@shinystick2413 жыл бұрын
How the hell are you so creative?
@dawndev27403 жыл бұрын
Congrats on 100K subs!!
@carsextendedwarranty2 жыл бұрын
0:22 *he touched the lens so many times...*
@GarkadeXD2 ай бұрын
I’m triggered XD
@Nate273 жыл бұрын
Dham good vid, you just earned a sub my man!
@PolyMars3 жыл бұрын
thanks!!
@cooperthedoggo5 ай бұрын
Who else is watching him code insted of actualy coding
@CooperDaDoggo25 ай бұрын
same bro
@sfmAmqaqmqeasm23563 жыл бұрын
Congrats on 100k my guy
@ScratchRZL3 жыл бұрын
5:41 when the UI is sus
@CowsDaBest3 жыл бұрын
Top quality editing! Also, you're so close to 100k!
@christophercampbell68843 жыл бұрын
2:26 That's what she said.
@apekz35922 жыл бұрын
LMAO
@geniuspig1748 Жыл бұрын
😳
@sliver55543 жыл бұрын
congratulations 100k!!!
@MouldMachiningPro2 жыл бұрын
use full man.
@NikoTeam-ks9ht3 жыл бұрын
Love the video and the explanation of how the game works, good work
@Tonals3 жыл бұрын
Note for programmers:steal everyone's code
@sergioenriquediazortiz51313 жыл бұрын
{yes}
@maskedredstonerproz3 жыл бұрын
1:21 NO WAY, THAT CAN'T BE, NO NO NO NO NO, could it?? could it really be that PolyMars is a man of culture??
@urbigboywilly3 жыл бұрын
3:20 ratio
@Markus_included3 жыл бұрын
4:40 Why didn't you use a class as a container for each level?
@makra420693 жыл бұрын
These challenge videos keep getting more interesting xD