Why I made a Game Engine for my 2D platformer (C#)
Vložit
- čas přidán 25. 08. 2024
- Or, 19 minutes of pedantic complaints about other game engines which work fine 9 times out of 10.
Discord, come say hi: / discord
Check out our game, PSYCRON: store.steampow...
Opening/Credits music: • I'm That Fool
Background music: • Desk Jam No. 1 || From...
Some links to check out if you wanna build your own game engine:
www.unrealengi...
unity.com/
godotengine.org/
I am glad to let you know that as one of the 30-something programmers watching this, I did appreciate the XNA -> Monogame bit. I love Monogame, been super great for all my 2D stuff (as you mentioned all the competition's 2D handling is disappointing)
I've started using monogame with another framework called nez (has useful stuff for scenes, entities and components, collision detections, etc.) and I am liking it a lot so far. It even has support for Tiled and when i don't like the way something works or need something new I can always just go and modify the code
MonoGame rules! The only real feature I've felt missing is being able to draw primitives.
I tried monogame and after it gave me the same weird glitches XNA did occasionally I went back to SDL2 but I'm looking at using RayLib for audio
Same LOL :)
Dealing with audio for Psycron sounded like it was a huge pain, but goddamn you must have done something right because the audio in Psycron was genuinely a 12/10. It felt like it was on another level compared to similarly-scoped/priced games.
I know building a custom engine feels like one of those forbidden techniques that your master tells you to never use, but it's seriously super fun. I went from Unity to a more custom setup in the last few years and haven't looked back. Owning all your tools and getting to just slot in whatever other libraries you want is really empowering. I've got nothing against Unity just like I'm sure you've got nothing against GMS, but not having to contort yourself around an engine's workflows is really freeing. Anyway, good luck!
Also I know you shelved the Psycron postmortem but if you ever think about releasing it you can count on at least one person (me) watching it!
Thanks for the kind words, happy to hear you enjoyed the PSYCRON audio a LOT of time was spent on that haha. "not having to contort yourself around an engine's workflows is really freeing" 100%! I'm about a yearish removed from where the video documents so really feeling a lot of the advantages of that now. And who knows, maybe the PSYCRON retrospective will happen some day :)
Wow, hi to everyone who's had the CZcams algorithm feed them this video!
Realized I should've added this sooner but I've got a Discord if you want updates on videos/to say hi: discord.gg/g9yBwWnAK7
And the "previous game", PSYCRON: store.steampowered.com/app/1368410/PSYCRON/
I was a game engine programmer in the industry for 8 years, and I will happily work around the weirdness of Unity to not have to do all of that work. The companies I worked at all had custom engines, and they were all a huge mess after a few years of working on them, so I guess it's just who's mess do you prefer to live with lol. Much luck to you all on your journey!
Fr I am by no means an expert but I do know a thing or two about unity and game engine development (made a crappy engine of my own in Java) and I can say that doing a bit of extra work in unity to suit your needs would have been far easier. Unity has a support for making your own render pipeline so you can make a pixel perfect renderer with that also there are ton of assets in the asset store which makes it a lot easier to make games
What about now after the "incident"
Might be worth the effort now. 🥲
This comment didn’t age well 😂
@@ItsVenti Everything he said still applies since none of it had to do with the finances behind anything. The reason Unity even thinks they can do that bullshit is because OP is completely correct and most companies have shit game engines that are way more broken than Unity, but that also goes for Unreal, Godot, etc., so long story short just use a game engine from an actual game engine company if you can't afford to support a game engine like they can because that's both ignorant and arrogant.
Now that I think about it, I should probably build my own game engine
Good idea!!!
You might be late but you uploaded on correct time for algorithm.
im actually shocked that unity didnt do the 2D stuff you wanted. most people move to it because it has the best 2D tools right now. i did enjoy the video though
Unity 2D dev for many years here-
I feel like Unity is a good engine for 2D, but there's so many limitations that make it a pain in the butt if you want to do cool things that would seem basic but are not. In the last 2 or so years of development for me, I feel like 90% of the things I've learned have been wacky workarounds for roadblocks that Unity puts up for seemingly no reason. I've been slowly trying to figure out how to make my own engine for a while now just so I wouldn't have to deal with the problems that Unity poses.
unity doesnt actually have real 2d, its just orthographic 3d, which makes it slower to render and can cause other problems that developers usually would never encounter in a real 2d environment
Nah I think godot has the best 2d tools
Unity is very limited on 2D. Especially isometric 2D
@@rawallon I knew i would found at least one godot guy here. Now we have 2.
loved this video! I honestly feel like I've gone down a very similar path myself (like I literally did the exact same progression of GMS2 to Unity to godot to openGL and now to monogame), so this spoke to me a ton. I'd love to see another video with an in-depth view of how you extended the framework to suit your needs!
Ty! & Yes, lots lots more on the way, they just take ages to edit ;-;
Godot has official C# support but glad you found something that works for you
and it's terrible C# support at that :(
@@GouShin1 Why does Godot have terrible C# support?
This was quite entertaining! I am not very interested in the programming anymore - even when I was, my main job in our modding team was sprites and PR. Nevertheless, this video had popped up in my recommendations... and I found a new great channel to subscribe to!
As another 30-something programmer (well technically "spatial analyst", but lets not let that get in the way of a good story), that writes Python and Nim in my day job, whilst *RE-LEARNING* ALL of the C# I forgot in my Bachelors Degree in my 20's.........., I laughed my arse off watching this, esp. the PyGame bit (sorry PyGame...). Extremely well put together, funny, and poignant. I also loved the XNA...MonoGame reference. Keep it up! Also, subscribed. ❤
3:46 weezer
As a GameMaker user, I honestly can't even recommend GMS to anyone. I only use it cause it's literally the only programming language I know and switching to another one is tough atm. I feel like GameMaker would be so much better if it was open source, like Godot is. It's why so many people love engines like Godot, Unity, and Unreal, to name a few, cause it's made by the community, while GameMaker gives no care to its userbase, only the money they can generate from them.
We GMS users are just NOW getting functions like foreach loops and extended audio feature after like 6 years?? I always get embarrassed when I see people like "Switching from GameMaker to Python!!" and it makes me wish I spent my youth learning better engines like Godot or even C++ than to waste years learning an engine from a money-hungry cooperation that just doesn't care about you.
Game engines in general is basically just picking your poison, seeing which one will cause less mortal damage in the long term. They all have their pros and cons. I just so happen to choose GameMaker. Or you can just make your own poison and have you be your own worst enemy lol. Nothing is perfect, sadly.
Make the switch to Godot imo especially when it hits 4.0 release. gdscript is very similar to python and is very absorbable. I'm primarily a Unity developer and have some old projects in GMS that I want to revisit and was going to do this in Unity but found it a fun little project to convert these to Godot 4 :)
Programming language syntax is fairly universal as well, GML is pretty close to Javascript which is similar to python / gdscript so I think you'd have an easy time moving across.
I suggest you to try to play with pico8 it will help you get grasp on how normal languages work, and than go for C# with unity or godot.
Unity is garbage for 2D@@KanykaAiM
@@KanykaAiMbest option is GameMaker defold godot or own game engine for 2D
100th sub !! very interesting video, hope to see more in the future !
This video made me realize that I had started on another project I wouldn't finish due to scope. I have a ton of old projects that I started on that were much, much smaller. I'm going to try and finish one of them and release it somewhere first. Thanks bud!
Ah this takes me back.... interestingly I am re-writing a game now in Unity that I first wrote using XNA about 15 years ago I also had to write my own physics engine in C# and write my own Networking for a multiplayer game, but I used C# at work for talking to all kinds of IoT and Embedded hardware devices so the networking was actually the easy bit. Now I mostly just stick to existing tools and libraries but doing it yourself can be really fun for the experience.
Thank CZcams gods for showing me this gem of a channel :)
Alex, I must say that I really needed to hear about making the dream game bit. Kinda refreshing tbh
I have a few things to say:
1) I just found this channel and I am very much subscribed now
2) GameMaker has an Audio Engine called BARD made by Greg Lobanov for Wandersong, and if you ever return to that godforsaken engine you should check it out
3) Maybe try Godot again sometime after 4 comes out? It may very well have all the things you need
4) this video is absolutely wonderful
Godot that this point for smaller creators has pretty much anything anyone would ever need, the Linux ecosystem is now strong, with GIMP, Krita, Inkscape, Blender, Godot now. All of these pieces of software used to be horrid and the more they've iterated on them they've improved drastically.
You can get shaders, some of them MIT and free to use from ShaderToy, all in GLSL compatible with Godot's OpenGL and Vulkan.
I can't believe you have so few subscribers.
I'm sure you'll grow super fast on this platform, amazing video!
Hi alex haha, great that ytb recommends me your channel! Cant wait for more updates and good luck!!!
I've actually been working on a puzzle game in my own engine for a few months now, and the engine I built uses SDL2 and OpenGL and when you mentioned that how hard OpenGL is to fully understand and use effectively I laughed out loud, because I absolutely agree with you. When I wrote my renderer I was constantly caffinated off like 7 monster zero's a day (because I couldnt afford a coffee machine or redbull) and I have no recollection of how any of it works. It does work though, just not for 3D. I am really hoping this game takes me at least a few more months before it's published so I can delay working on 3D rendering as much as possible...
I am glad you spent the time to discuss how hard engine making is, because its absolutely true. I think alot of gamedev videos gloss over it and make it look easy, but when you actually try it, its 100x harder than you expect. There were multiple points where I wanted to quit and just go back to unity, but its pixelart 2D support and it being insanely slow to work with stopped me every time. Now I am glad I did it, but it took alot out of me, and took multiple rewrites over the last 15 months.
Great advice for beginner game developers! Very cool and high quality video
Very underrated video!! Super entertaining and well edited!
"i'm writing own engine in c#"
- it could be monogame
"sdl, opengl, vulkan..."
- oh well, nevermind
*xna logo appears*
- oh wait, i was right
it may have officially died 10 years ago but you can never escape the ghost of xna and it's offshoots
video is great my dude althiugh i am not coder ,I stillenjoy the whole video idk why also this video recommended out of nowhere
I have to tell you, that this video really opens up my mind. I'm very grateful to find your video, i hope that you keep making videos. I think you're really a great content creator. The fact that i almost never comment on a video, is the proof that your video is so good that i have to leave a comment for it.
Congrats on 1.2k+ subscribers
This is like the 5th time I've seen the exact same XNA/MonoGame joke from you, and it never fails to send my sides to orbit.
EXTREMELY underrated, you need more subs. Great video
Finally a indie dev that's down to ground and actually seems like he has a reason for making an own engine (unlike people using questionable frameworks for the first-best programming language they learned - yes, I've been there too, LWJGL)
Less than 1000 subs? I’m surprised. Excited to see this channel grow!
That was actually really fun to watch! Keep it up my g and you'll get waaaay more views soon
Fingers crossed
Have a great day!
only 296 subs ? this channel is super underrated.Keep up the good work dude
This video was great. And yes, I greatly appreciate the xna reference
Used GM since version 8 as well. Yea, I agree with everything you said there, the future of this game engine looks grim for professional developers.
Been working with Unity for a couple years now in a project and I fell in love with C# while working with it.
As you said, 2D rendering in Unity can be a mixed bag, even when working with HD artwork (which is our case).
Godot has really good C# support too, I've been playing with it and it's pretty great, and the documentation for C# is just as complete as GDScript too. As for the Console Export, for us is not a huge concern at this moment since we're focusing on PC Games (We do know that it is possible to do it if necessary, there are third-party developers who specialize in porting Godot games to consoles).
I don't think I'll ever come back to GM unless I really need to tbh.
GM was never been anything else than grim for pro devs, really...
GameMaker 8 was incredible I remember being like 10 years old just making nonsense games
However I’m now turning to Unity and C# because it seems like it will be more productive but hey idk we’ll see
Thank you for saying this about starting small and not directly aiming for a dream game! It's really shocking how many devlogs there are that starts the wrong way just because the person has not finished just a single simple game yet.
Finishing a project is a skill you have to learn! It's easy to start
these videos are incredible. you deserve way more subscribers dude
This was such a good video. I laughed more times than I can count. I actually started with Pygame (Which is just SDL anyway) made a few arcade clones with it, and felt very meh about it.
C# and Monogame has been fun. The documentation is pretty good. The learning resources for it are far more sparse than something like Godot, or Pygame. But they are out there.
Going from Multi Paradigm in Python to Purely OOP was a bit to wrap my head around, but one day it just clicked.
Love the GC though. While one day I would like to fully grasp the ins and outs of Memory management, it is nice being able to offload the stress of that while I learn how to code/Build a game/ Make music/Draw all at the same time. And even with that overhead, C# is still pretty speedy.
I should write my own engine!
Welcome fellow MonoGame dev! I've been using MonoGame for a few years now and I love it!
There is another cool reason to develop a game engine, for learning purposes, regardless of you actually finish or use it. After attempting to make a game from scratch in college it was super insightful.
As someone making a GLFW wrapper right now to create my own game engine, I feel your pain.
Godot do have c# support tho 😩
A course on openGL is the hardest class I took in my CS degree. I was more stressed about that then OS, Algorithms, etc. I think I generally was tearing up while trying to debug some assignments it's so tough
hah hah - I work in the games industry and while I'm not specifically a rendering engineer, I often have to debug rendering issues. And yes. Nothing worse than having a black screen, no errors. Nothing to go on. Absolute nightmare! ;)
@@zoeherriot I've experienced this when I was learning OpenGL. I always spend a lot of time to debug my OpenGL code when it doesn't work and no errors.
This was absolutely fantastic! I lost it at the tangent, it's painfully accurate. Part 2 coming soon?
Yes! Many more in the pipeline, they just take a long time to edit haha
i love that you featured footage of chicory a colorful tale!
i never did that to them... you have empathy... you already know what you need to say...
Watching this while writing my own engine
SDL2 actually does have some pixel shading functions. They are primitive but you can do pretty much anything with it.
I really need to study that stuff as pixel shaders would be useful
Sonic Colors Ultimate was actually made in Godot. Only big project that comes to mind.
i like the video but it could have had some obscure niche meme or skit in it?
OpenGL isn't really bad when you actually understand it. At first it seems overwhelming but once you observe the purpose of each system it comes as logical. Vulkan is much lower level (in fact, I'd call it a GPU API, not a graphics API) but still very logical with added control and verbosity. Debugging is pretty trivial with RenderDoc too, which is an invaluable tool to any graphics programmer and allows for capturing and debugging API calls and data. It's definitely not a territory for everyone, only people seriously interested in graphics programming should ever touch this stuff.
Top notch humor. 10/10 Will laugh again
Wow that's an awesome achievement man!!!
Hm ... I was not sure about this, but this video makes me think ...
I SHOULD WRITE MY OWN GAME ENGINE!
It's nice to hear someone else say the same thing I always do, even if paraphrased "If you haev to ask if you should build a custom engine, you don't. if you have to ask which engine 'is best for your dream game' it literally doesnt matter you wont be making your dream game just learn to make anything first" haha got a ton of hate for that before XD
wait a minute you’re not going to believe this but I was straight up the 1000th subscriber, I finished the video and was like “wow this guy’s cool” and hit subscribe and saw the number go from 999 to 1K
no idea how the algorithm works and why im here but great video
I always wanted to try frameworks (bevy, pygame, löve) instead of a game engine because it makes me look like I have big brain, but i really liked godot scenes (and I don't have a big brain)
I am plagued by the opposite issue. I've only used frameworks all my life cuz I'm too much of a boomer to figure out how to use actual game engines lmao
Making games with a framework is really a pain, having an UI to edit tilemaps, colliders, user interface, managing scenes, entity positions and shit, just makes lot of sense. Imagine making a cutscene without something like the animation player in godot
The concept of Godot Scene is basically OOP. I think it can be applied to your engine easily if you use OOP Language.
I think you would be surprised just how simple it is to use a framework. Learning a game engine is really tough compared to learning a framework.
@@BoardGameMaker4108 well to be fair I've been playing around with Löve2D and their documentation is really really good, I'm thinking to make some experimental stuff with it
thanks for shattering my dreams :)
Making your own engine is a long and tiring process, I wish you the best on your journey
I’m starting to think this guy’s a weezer fan
...me too...i get the strange feeling he really likes weezer
fwiw this video is me toning down the weezer influences lmao
Thought i might just mention that you can get your hand onto consoles using godot, but it's not so streamlined as game maker because you have to do it through a third party.
Also no direct support for fmod like programmes though I have heard that some devs have got stuff like that to work. But the inbuilt audio mixer had been enough for me until now at least.
Point is some previous game maker game devs have enjoyed the change to godot when they have it a shot, not sure but it might be worth making a demo project in it and see if you like it.
Sounds more effective if you want to make games then makeing a engine from scratch at least
I got burned out of game dev after my most recent release now I'm making my own engine with 0 plans to use that engine to make a game.
holy what this video is crazy
I use Godot as my game engine of choice and the thing with godot is you said it uses GDScript. They have a thing where you can write C++ in Godot with GDNative. It also supports C# if you get the mono version.
THIS VIDEO WAS SO FUN I LOVE THIS GRAAH
funny too cause when unity decided to crap out i like did the very radical decision of going on my own, terrible decision but im enjoying it i guess :)))))
I really think that game companies should invest in making their own game engines that’s good due to how inefficient games are nowadays that thousands of dollar hardware can barely run them…
Id like to point out that Stride Engine is also out there.
My personal recommendations are MonoGame as a 2D and 3D Framework and Stride as a 2D and 3D Game Engine, both are C# based, open source and can run with only code, no editor (optionally in Stride) if you want.
Awesome vid Alex! Looking forward to hearing about the switch to FNA and if you've tried Monogame.Extended or Nez
Thank you! I'm familiar with Extended/Nez, but wanted to keep things fairly simple. Part of my reason for going with monogame was to learn about the bones of engine development. Nez and extended are great, but they tackle a lot of the problems I wanted to learn about firsthand.
Very cool video Alex!
Monogame is a nice choice.
Did you tried or checked along the way some others, like ORX, Love2D or Cocos2D for instance before landing to this one?
They are all good 2D engines / frameworks closer to what you were looking for too it seems.
Yeah! I looked at a LOT of frameworks and engines I didn't mention here, otherwise the video would've taken even longer to come out. I still think C#/Monogame (now FNA) was the right choice, but the reason for that'll maybe become a bit clearer in future videos. I want to go back at some point and do a video checking out all the other ones people have mentioned here (especially Love2D and Godot).
GM's audio has been lacking for SO LONG but it is painful that so much of Alex's requests were added after this video came out
LOl, i didnt really wanted to make a own engine because smth like unity wasnt enough for me i just have fun writing it and learning new stuff
Welcome, I've also recently decided to try out MonoGame (coming from Unity). Have to """"just"""" port all my existing code into an engine that does what it needs to do (and nothing more)... Also using ECS though, which seems to be easier to get into than Unity's very verbose version...
Why is your channel so underrated?
honestly
17:15 YES lmao I love Monogame/Xna
I can agree that making your own game engine or framework is not from the faint of heart. It takes a certain brain/person. I have built a 2D game development framework named Velaptor. It is open source and you can indeed build games with it. I personally love it but if your goal is to make a game, don't create an engine or framework.
holy cow dude... you unlocked the second level when it MATTERED? holy shit... my guy... you must have seen the edge of the world... i know... can we just get along... i want to get along with somebody that is farther ahead than me... yeah... bc everybody else is just joggin my nuggin... you understand?
Man I feel your pain on this one. There are so many half-baked solutions in the game dev community and it's infuriating! There 100% could be better tools out there but the barrier to entry is ridiculous. Like you have to have a proper math degree and simultaneously have 5-10 years of programming experience. The cherry on top is nobody wants to make a pong clone and nobody wants to play it so the "todo app" of the game world end's up being a side scroller. It's like teaching an underaged kid to drive an 18 wheeler. So anyways I just went with web dev.
At least now I notice all the weezer memes in here
I feel SO MUCH same what you talk about in this video. Started out with GameMaker, got frustrated. Used Unity for a while but didn't seem to get anything really good finished with it, at least not pixelart. Godot is still a mess and uses odd scripting language like python and lua. It has Mono support for C# but all the help forums and documentation is full of gdscript. Looked C++ and SDL, which kinda works, but is a pain in the ass to setup and learn. Though I don't mind the learning. But oh gawd the error messages are bad and crypted. Now I'm here stuck with MonoGame and XNA or FNA starting small game for testing it out. The fact that Terraria was made in XNA, Stardew Valley uses MonoGame and Axiom Verge etc.. is a sign from gamedev gods it's the way. let's see... :D I wish I was just better with pixelart or art in general, you only learn it by doing just like programming.
I should write my own engine
Hey, could you please share the resources where you learned MonoGame? Cause i really want to learn MonoGame too, but i dont know how :(
Sure! RB Whitaker's monogame and XNA tutorials are where I started out: rbwhitaker.wikidot.com/monogame-tutorials
letteraly me working at my game engine in OpenGL while i wach this video
First game i make willbe a banger ngl. The only problem i have is the music. I Am a good programmer and got only A's in art. i first started the game in java and made everything from scratch (no frame works, only java swing and AWT used) . Now im using unity, just for making it publishable on consoles
i haven't watched the video yet but i can tell you as an ADHD monkey it is much easier to write your own engine over several months rather than spend 10 minute reading documentation. i love C and raylib.
This is exactly the video I was looking for! As someone who went GameMaker -- > Unity --> ? and has been debating what the optimal path forward is I think this helped me out a ton. Thank you so much for this!
you are proficient in game maker? homeland security wants to know your location...
I gotta say, I went into this with skepticism, but it definitely seems like a good alternative to Gudough lol.
it'd be pretty funny if you released this as a usable game engine for other people to use
Very entertaining and informative video.
Trying to get a square to show up on screen with c++ opengl actually broke me
[Game]: A new Godot User feels _Shame_ for you. Congratulations!
GameMaker still uses a graphics API that's decades old.
The Dragon troll thread :D
Hello my old friend, Cornflower Blue.
C is not a pain in the ass imo. And all the reasons you used to defend that are actually the reasons why C is good. OOP is highly overrated imo, and most of the time overcomplicates code. You won't need thousands of design patterns books in C, it is simple yet powerful enough to do whatever you want. I do agree that OpenGL is a pain in the ass to work with.. but not because of C but because the shitty state based interface they decided to use. Vulkan while still a C library is way more friendly to use (although too much setup is required to get something fast up and running).
Not to mention it will be way faster than most languages, although you may not need it for a 2D game.
I do agree that C may be overwhelming at first since you can easily mess things up, but you end up getting used to it.
I'd recommend checking raylib, sokol headers and gunslinger. Amazing C99 frameworks that will get you fast up and running. If you really want OOP you can always use c++, all of those libraries will work.
I did appreciate that bit