This is pretty amazing. Incredible work. I'll use it to teach my students.
@ultrahalf3 жыл бұрын
Man I wanna document my code like that
@shankar45103 жыл бұрын
I deeply appreciate your effort . Thanks a lot for this.Now I will reverse engineer it and learn it all .
@johnjackson97673 жыл бұрын
Great to hear it. If you have any questions, join the discord.
@ThatOSDevАй бұрын
Slowly I been working on my own. But it's nice to see othes who also use C. I also agree with all your points about C. 👍
@GuilhermeTeres3 жыл бұрын
That's a very good, entertaining and informative video! I have been using gunslinger for a couple of weeks and it's simplicity and features really made it a good and pleasant framework to work with. I can't wait to explore it more, keep it up, John!
@johnjackson97673 жыл бұрын
First.
@wh0d1s-l3 жыл бұрын
bruhhhhh
@chandrakanth42413 жыл бұрын
this is not fair.
@theemeraldfalcon91843 жыл бұрын
Cheater
@johnjackson97673 жыл бұрын
@@theemeraldfalcon9184 I wouldn't dare.
@skaruts3 жыл бұрын
Well, I'm first too. In spirit!
@toffeethedev3 жыл бұрын
You code just like I do and have all the same philosophies, I feel less alone you're awesome thank you!
@LogicEu3 жыл бұрын
This is incredible. Been waiting for this. Thank you! Keep it up!
@buddyze3 жыл бұрын
Just leaving a comment for th yt algo to pick this up quicker. The world needs to see this. Great job my guy
@ishdx93743 жыл бұрын
I love it, it looks really easy and awe
@SoulsGamerBierre3 жыл бұрын
Awesome. This is helping me a lot to make experiments and study. Thanks, John.
@ibrakap3 жыл бұрын
Looks promising i'll give a look, good job mate.
@tommydrager54973 жыл бұрын
wow, thank you for putting so much time and effort to make this accessible and presentable. The amount of content is overwhelming.. but this is defenitly a great creation of yours. Keep it up!
@tochka8323 жыл бұрын
nice work, i surely would check this out, only started playing with c99/11 about two weeks ago, but this looks promising i really like the implementation of data structures as someone who coded in python before, really useful stuff
@10e9993 жыл бұрын
Fantastique! Thanks for this detailed video. I really like your C programming style.
@rlindner813 жыл бұрын
Very neat framework, demo, and game
@yousefali9952 жыл бұрын
I have been looking for a simple graphics framework for C, and finally I found an awesome one! Amazing!
@botbeamer3 жыл бұрын
Really good work man 💯👍 I need to play with this at some point
@voxelrifts3 жыл бұрын
I. Love. This.
@johnjackson97673 жыл бұрын
I. Love. You.
@voxelrifts3 жыл бұрын
@@johnjackson9767 😂sure.
@theemeraldfalcon91843 жыл бұрын
Not first but like 15th or something idk Okay but in all serious, THIS. IS. SO. COOL.
@ChukoByte3 жыл бұрын
Very impressive, keep up the good content!
@ethanviolet13 жыл бұрын
Awesome! we have been waiting paitently for another video :P
@eboatwright_3 жыл бұрын
Ayyy Texas flag at 0:14 ! :D Also, this is really cool! I would probably use it if I used C XD
@boris_raduloff2 жыл бұрын
Absolutely brilliant
@pajeetsingh3 жыл бұрын
How to limit frame rate without using vsync feature? I tried calling (sleep) but it won't work.
@johnjackson97673 жыл бұрын
If you look in "gs.h" under my repo, look for the "gs_engine_frame()" function. I limit the frame time in there based on a user set frame rate, and it should give you ideas on how to implement it for your own stuff.
@pajeetsingh3 жыл бұрын
@@johnjackson9767 Yeah thanks. Got that working using nanosleep instead of sleep.
@SB-rf2ye3 жыл бұрын
really cool work, though it's not strict/pedantic c99 standard conforming, as it seems to use gnu extensions like unnamed structs and unions in your gs_vec structs.
@johnjackson97673 жыл бұрын
Yeah, this is something that's been pointed out and is being changed. I'm considering switching to c11, since it's become more supported as of late.
@SB-rf2ye3 жыл бұрын
@@johnjackson9767 I use a named struct inside union as : typedef union blah_un { float i[2]; struct { float x, y; } s; } blah; Then use it like blah b; b.s.x = 1; b.s.y = 2; Little bit extra typing, but not required to switch to C11.
@commandershepard19443 жыл бұрын
Looks great
@NeZversSounds3 жыл бұрын
Oh, that means no fighting to get GLFW to compile?!! I love Raylib for its ease to use and this looks like Raylib on steroids.
@johnjackson97673 жыл бұрын
Yeah, the default platform layer includes a header only version of glfw.
@skaruts3 жыл бұрын
c99 header-only, sounds quite easy to bind with Lua or Nim (or others). Sounds tempting to me. :) Also especially because of snake_case, which is what I rather use. Raylib, though nice, uses PascalCase, which triggers my OCD...
@johnjackson97673 жыл бұрын
Word on the PascalCase comment.
@nickheyer2 жыл бұрын
Down with OOP
@zedrex35973 жыл бұрын
What things do I have to learn to build something like this on my own someday?
@shankar4510 Жыл бұрын
can you tell me where you started ? your programming history ?
@sirdiealot78053 жыл бұрын
So this is a bit like Löve, only C instead of C++ and Lua.
@KanjiCoder_RTFMАй бұрын
I was trying to use Nuklear and disapointed that glfw is an empty repo that needs to be built ? And Nuklear uses it ? Now I remember why I wrote my own win32 and opengl function pointer library . I just want to compile a single file and be done . No make files and build scripts .
@johnjackson9767Ай бұрын
@@KanjiCoder_RTFM Yes, Nuklear and Dear Imgui don't make assumptions about platform. They provide samples that show how to hookup to various backends for this reason. I vendor glfw, emscripten and Android backends default platforms to get around some of this headache, although that's controversial to some in what a framework should do.
@KanjiCoder_RTFMАй бұрын
@@johnjackson9767 I think for adoptability of a framework , the less brick walls the better .
@KanjiCoder_RTFMАй бұрын
@@johnjackson9767 I don't know what I am talking about here . But possibly make things just "work out of the box" and have a way where the experts who know more about linkers and build systems can do their thing if they so choose ?
@bonus58042 жыл бұрын
I have a question about slot arrays: if I add an item, store the handle in two different places, erase the handle from one place. Now if I use the handle from the other place, it'll be invalid, BUT what if in the meantime, someone added items in the slot array, is it possible that the other handle says that it's valid, although it doesn't correspond to the right item?
@johnjackson97672 жыл бұрын
Correct, this would be something that could be addressed by splitting the handle into a generation and index bit pattern, similar to how a lot of entity component systems work. You'd have 8 bits for the generation and 24 bits for the index, and you check the generation to see if it's valid before use. That way you could delete and reuse an entry 255 times before it wraps back around.
@bonus58042 жыл бұрын
@@johnjackson9767 Ok thanks for your answer!
@michawielgus98273 жыл бұрын
Wow its so clever to put all game data into single structure xd
@johnjackson97673 жыл бұрын
I'm well known for being clever.
@michawielgus98273 жыл бұрын
@@johnjackson9767 well i discovered you just tonight, after watching minecraft remake in pure C in 48 hours (you commented there)
@thanhlongtran91633 жыл бұрын
Why does the user need to define GS_IMPL? I saw this in a lot of other libraries, too.
@johnjackson97673 жыл бұрын
Since it's header only, all of the implementation code is wrapped within implementation guards. So it needs to be defined once that way the implementation will be compiled once and only once.
@thanhlongtran91633 жыл бұрын
@@johnjackson9767 Can't you do something like #ifndef then #define?
@johnjackson97673 жыл бұрын
@@thanhlongtran9163 You could, but then the user has no control over where it's to be defined
@sukhchainsingh38943 жыл бұрын
Amazing.
@sdsdfdu44373 жыл бұрын
Dude you're awesome. I could use this for a 3d game, right?
@johnjackson97673 жыл бұрын
Yeah, definitely. I've updated quite a bit since then (added web and android backends), and I'm currently writing a util for 2d/3d physics. Join the discord, quite a few people there who are using it if you have questions.
@sdsdfdu44373 жыл бұрын
@@johnjackson9767 cool, thanks, I'll check out the discord. Are you writing physics from scratch or using an existing engine?
@johnjackson97673 жыл бұрын
@@sdsdfdu4437 From scratch, so I can avoid any external dependencies
@fleaspoon3 жыл бұрын
Amazing
@vellendev3 жыл бұрын
Do you plan to provide Vulkan as a backend like you currently provide OpenGL as an option, or will you leave that for someone to implement themselves if they need it?
@johnjackson97673 жыл бұрын
It's on the roadmap for one I'd like to provide.
@pedrogabrielnogueira10683 жыл бұрын
How the heck is this even possible? How many years have u studied and programmed in c? Which books have you read? Needless to say the incredible work. I'm starring gunslinger
@johnjackson97673 жыл бұрын
Thanks, man. I've been programming professionally for about a decade, c/c++ are my main languages. Just keep at it, you'll get comfortable with it all.
@pedrogabrielnogueira10683 жыл бұрын
@@johnjackson9767 Aye aye, sir! I'm never giving up neither on C nor C++ T-T C and C++ will never get boring :v
@2k7u3 жыл бұрын
I wish i had these coding skills XD
@maholet3 жыл бұрын
Opengl::opengl_compile_shader::shader: 'gs_immediate_default_fill_shader' FAILED_TO_COMPILE: 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
@johnjackson97673 жыл бұрын
Is this with the pong example or the project template?
@maholet3 жыл бұрын
@@johnjackson9767 It's gs_progect_template on Linux Debian 10. Build of App was ok, but compile of shader has failed at start. "App: ../third_party/include/gs/impl/gs_graphics_impl.h:896: gs_graphics_shader_create: Assertion `false' failed."
@johnjackson97673 жыл бұрын
K, should be easy enough to fix.
@needlessoptions3 жыл бұрын
👀 !
@G33KN3rd3 жыл бұрын
since it's a game framework, perhaps you should rename it to *"Funslinger"* ;) Also, for code naming, `frmwrk` is the same length as `engine`.
@TheRealFFS3 жыл бұрын
But more awkward to type.
@johnjackson97673 жыл бұрын
Lol
@Gabryx_3 жыл бұрын
maybe fwork that is one character less than engine
@tochka8323 жыл бұрын
i don't think that it's a good idea to name things in a certain way just because it's easier to type like, yeah, frmwrk is short, but it's code that many people will use and do they have to guess what all the things mean? frmwrk is kinda alright tho, but if everything is named like that then it's fucked
@PissMasterPlus3 жыл бұрын
@@Gabryx_ Maybe fork, because I'm hungry.
@CNLohr3 жыл бұрын
In b4 one of the rustites say "WHY NOT RUUUUSSTTTT"
@johnjackson97673 жыл бұрын
Wouldn't be the first time. I've enjoyed your vids, man. Thanks for commenting.
@CNLohr3 жыл бұрын
@@johnjackson9767 Would you be up for joining my discord - we are discussing a presentation on idiomatic C in 2021. Would love your input.
@johnjackson97673 жыл бұрын
Sure thing, what's your link?
@AntonioZL3 жыл бұрын
WHY NOT RUUUUSSSSSTTTT Because I don't want to.
@KanjiCoder_RTFMАй бұрын
Can I use this for UI ?
@johnjackson9767Ай бұрын
@@KanjiCoder_RTFM Yes. It has an immediate mode gui extension I've since added that I use exclusively for personal projects.
@KanjiCoder_RTFMАй бұрын
@@johnjackson9767 Cool . I'll keep you in mind . I already stubbed raylib into my current project . But I'll take a look at your stuff the next time I write a project . I am assuming your project would be an easier way to build Nuklear into my C projects ? I saw one of your videos messing with Nuklear .
@lifeless97683 жыл бұрын
why did you stop using visual studio?
@johnjackson97673 жыл бұрын
A simpler text editor is all I need.
@vincenzopanella27053 жыл бұрын
Why reinventing stl ? i see this as a regular occurence,
@johnjackson97673 жыл бұрын
Two reasons: - There's no "stl" for the c standard lib, so it's necessary to write your own implementation for various common data structures or find an equivalent that someone else has written. - There is no such thing as "reinventing the wheel" with regards to software.
@vincenzopanella27053 жыл бұрын
@@johnjackson9767 Well I think there is , writing a set of vector functions over and over again is against software engineering principle, being a software engineer fro 20 and more years I 've come to the conclusion that every piece of new software must be written with less and less code entropy, just my opinion though
@johnjackson97673 жыл бұрын
@@vincenzopanella2705 Most legacy, institutional software *is* entropic simply by nature of it being legacy. There's no avoiding that. One only needs to look at what modern c++ has morphed into to see it.
@vincenzopanella27053 жыл бұрын
@@johnjackson9767 I must say though that the idea intrigues me a lot.