John Jackson
John Jackson
  • 48
  • 526 326
Writing a Poor Man's Reflection System in C99
Let's write baby's first reflection/introspection system in C together.
Gunslinger: github.com/MrFrenik/gunslinger
Project Repo: github.com/GameEngineering/reflection_example_YT
STB lib: github.com/nothings/stb
Music use:
- "Piano Meme Compilation - Charles Cornell":
ua-cam.com/video/Amq1DEa-OFM/v-deo.html
Переглядів: 11 070

Відео

Header-Only Game Framework in C | Game Engineering
Переглядів 23 тис.3 роки тому
Overview of my header-only, c99 game framework "Gunslinger". Demonstrates how to use it to create a small example and then Pong. Be sure to like and subscribe, that way I can continue to make more content like this. 00:00 Introduction 00:38 Purpose/Philosophy 02:24 Why? Why c99? 03:25 "Engine" Context 03:57 Application Description 04:28 Math 05:10 Containers 08:09 Platform Layer 08:49 Graphics ...
"Why do you use C-Style Naming Conventions?"
Переглядів 7 тис.3 роки тому
"Why do you use C-Style Naming Conventions?"
Vectors - Game Tools
Переглядів 4,9 тис.3 роки тому
Vectors - Game Tools
Binary Serialization and Pixel Art in C and OpenGL | Game Engineering
Переглядів 34 тис.4 роки тому
Binary Serialization and Pixel Art in C and OpenGL | Game Engineering
Recreating Noita's Sand Simulation in C and OpenGL | Game Engineering
Переглядів 303 тис.4 роки тому
Recreating Noita's Sand Simulation in C and OpenGL | Game Engineering
Enjon: 3D/2D Game Engine, C++ / OpenGL DevLog #UI Editor
Переглядів 5 тис.4 роки тому
Enjon: 3D/2D Game Engine, C / OpenGL DevLog #UI Editor
Enjon: 3D/2D Game Engine, C++ / OpenGL DevLog Launcher Options
Переглядів 9124 роки тому
Enjon: 3D/2D Game Engine, C / OpenGL DevLog Launcher Options
Enjon: 3D/2D Game Engine, C++ / OpenGL Sandbox Environment
Переглядів 1,8 тис.4 роки тому
Enjon: 3D/2D Game Engine, C / OpenGL Sandbox Environment
Enjon: 3D/2D Game Engine, C++ / OpenGL DevLog: Simple Ball Rolling Game
Переглядів 8 тис.4 роки тому
Enjon: 3D/2D Game Engine, C / OpenGL DevLog: Simple Ball Rolling Game
Enjon: 3D/2D Game Engine, C++ / OpenGL DevLog World Demo Scene
Переглядів 2,3 тис.4 роки тому
Enjon: 3D/2D Game Engine, C / OpenGL DevLog World Demo Scene
Enjon: 3D/2D Game Engine, C++ / OpenGL DevLog # Testing User GUI Windows
Переглядів 1,3 тис.4 роки тому
Enjon: 3D/2D Game Engine, C / OpenGL DevLog # Testing User GUI Windows
Enjon: 3D/2D Game Engine, C++ / OpenGL DevLog #8
Переглядів 3,4 тис.5 років тому
Enjon: 3D/2D Game Engine, C / OpenGL DevLog #8
Enjon: 3D/2D Game Engine, C++ / OpenGL DevLog #7
Переглядів 2,6 тис.5 років тому
Enjon: 3D/2D Game Engine, C / OpenGL DevLog #7
Enjon: 3D/2D Game Engine, C++ / Random-Thing
Переглядів 1,8 тис.6 років тому
Enjon: 3D/2D Game Engine, C / Random-Thing
Enjon: 3D/2D Game Engine, C++ / OpenGL: Box Spawner Example
Переглядів 1,6 тис.6 років тому
Enjon: 3D/2D Game Engine, C / OpenGL: Box Spawner Example
Enjon: 3D/2D Game Engine, C++ / OpenGL DevLog #6
Переглядів 4,1 тис.6 років тому
Enjon: 3D/2D Game Engine, C / OpenGL DevLog #6
Enjon: 3D/2D Game Engine, C++ / OpenGL DevLog #5
Переглядів 3,8 тис.6 років тому
Enjon: 3D/2D Game Engine, C / OpenGL DevLog #5
Enjon: 3D/2D Isometric Roguelike Game Engine, C++ / OpenGL DevLog #4
Переглядів 11 тис.6 років тому
Enjon: 3D/2D Isometric Roguelike Game Engine, C / OpenGL DevLog #4
Enjon: 2D Isometric Roguelike Game Engine, C++ / OpenGL DevLog #3
Переглядів 9 тис.7 років тому
Enjon: 2D Isometric Roguelike Game Engine, C / OpenGL DevLog #3
Enjon: 2D Isometric Roguelike Game Engine, C++ / OpenGL DevLog #2
Переглядів 25 тис.7 років тому
Enjon: 2D Isometric Roguelike Game Engine, C / OpenGL DevLog #2
Enjon: 2D Isometric Roguelike Game Engine, C++ / OpenGL DevLog
Переглядів 27 тис.7 років тому
Enjon: 2D Isometric Roguelike Game Engine, C / OpenGL DevLog

КОМЕНТАРІ

  • @jay-tbl
    @jay-tbl 2 дні тому

    What kind of optimizations did you have to think about? Things like concurrency for different parts of the world at the same time

    • @johnjackson9767
      @johnjackson9767 2 дні тому

      This is single threaded, so concurrency wasn't an issue. If I were to continue this, then I would thread multiple chunks concurrently and would have to be careful at boundaries.

  • @mastersquinch
    @mastersquinch 28 днів тому

    which monospace typeface are you using in your animations?

    • @johnjackson9767
      @johnjackson9767 28 днів тому

      I took the time to code one up by hand because I'm a moron

  • @CatValentineOfficial
    @CatValentineOfficial Місяць тому

    Now add poison, ooze, mud, plants, balloons, pipes, converters, bombs, switches, and sliders.

  • @eduardocasanova-personal3064
    @eduardocasanova-personal3064 Місяць тому

    Does anyone know the name of a game like this? I purchased it at an office depot when i was a kid

    • @johnjackson9767
      @johnjackson9767 Місяць тому

      store.steampowered.com/app/35460/The_Ball/

  • @1kvolt1978
    @1kvolt1978 Місяць тому

    If you will ever use Win32 API it will become a mess though. MS uses AllWordsStartWithCapitalLetterNoUnderscore style.

  • @Aaws424
    @Aaws424 Місяць тому

    This is very beautiful ❤ thanks

  • @ChernoPhil
    @ChernoPhil Місяць тому

    Thats aweome! Is it possible / allowed to integrate it in a game?

  • @ThisShitWontWor
    @ThisShitWontWor 2 місяці тому

    classicVariable m_publicMember m_privateMember_ FunctionsAndMethods() n_nameSpaceMember

  • @connorjosh2088
    @connorjosh2088 2 місяці тому

    Late to the party but I think that a really good way to simulate velocity would just be to follow the initial rules you made before adding velocity, but multiple times in one frame

  • @sairajk19
    @sairajk19 3 місяці тому

    Nice video, Thankyou very much. These videos are very helpful! Discord link please :) Couldn't find the link.

  • @dimithras
    @dimithras 3 місяці тому

    Came here from Noita. Actually Noita does not have anything new to pixel physics, there've been myriads of sandbox games with a palette up to 100 colors including C4 pixels, electricity and other cool stuff. What Noita is loved for - it's fungal shifting and much more effort on mixing different stuff.

  • @Faby__
    @Faby__ 4 місяці тому

    Wtf this was the best video on particles i've ever seen. Amazing job

  • @gamelovers4974
    @gamelovers4974 4 місяці тому

    Brother what's your discord server link

  • @Ismoh0815
    @Ismoh0815 4 місяці тому

    John, where did the discord link go?

  • @CodeParticles
    @CodeParticles 4 місяці тому

    @John Jackson, Ugh... thank you so much for this video. I say 'ugh' because I thought I was done with OpenGL and could finally move on to Vulkan but NooOoO i gotta go back to OpenGL just for this and then move on. In a way I'm going to be stuck on this mini project just to understand how this works but you gave me more insight to add another tool under my belt so to speak. Cheers~ 👏👏👍👍

  • @NunyaBizznezz6969
    @NunyaBizznezz6969 4 місяці тому

    I did find that interesting

  • @drdca8263
    @drdca8263 5 місяців тому

    Maybe I’m underestimating how fast computers are, but, when you have many particles, how do you make this run at a reasonable speed? Do you do processing on the GPU? Do you have some sort of “this particle’s environment hasn’t changed, so don’t run its code, as it will stay the same” thing going on? Like some kind of “this is where stuff changed last frame” mask?

    • @johnjackson9767
      @johnjackson9767 5 місяців тому

      CPUs are fast enough to handle this. Moving this to the GPU would be the best way to make it scale.

    • @drdca8263
      @drdca8263 5 місяців тому

      @@johnjackson9767 Thanks!

  • @gobro3900
    @gobro3900 5 місяців тому

    What you've created is awesome! I saw a youtuber mention your framework in his video, and I wanted to try it out and well... I have been pleasantly surprised :D. However, I've noticed that the documentations site seems to be down and that the "math.md", "platform.md" & "utils.md" seem to have no documentation in them whatsoever. Is it supposed to be like that? Probably not lol

  • @xylvnking
    @xylvnking 5 місяців тому

    I'm never gonna do this but i like to watch

  • @StevenOfWheel
    @StevenOfWheel 5 місяців тому

    Does anyone know the name of the nuclear reactor sim game which flashes briefly for 2 seconds at 0:11-0:13?

  • @jb14_99
    @jb14_99 6 місяців тому

    Do you think this could be extended to 3D?

    • @NEO97online
      @NEO97online Місяць тому

      yes, it would be like Minecraft. just with a higher tick rate and very small blocks

  • @Halleluyah83
    @Halleluyah83 7 місяців тому

    Супер!))

  • @maixicek
    @maixicek 7 місяців тому

    Very cool!

  • @G0RSHK0V
    @G0RSHK0V 9 місяців тому

    Noita also have ridgid body physics, which is impressive. Even more impressive is the fact that early versions of Noita had surface tension for liquid, so, for example, water in icy biomes formed icicles. And on top of that, Noita uses multiple cores to calculate physics

    • @johnjackson9767
      @johnjackson9767 9 місяців тому

      Absolutely, it's a fantastic showcase of novel solutions to complex problems.

  • @Sbenbobb9
    @Sbenbobb9 9 місяців тому

    Both these forms of media are so rare and I love that you brought them together. I love Noita, and the Powder Toy I've been playing since I was a kid.

  • @chaquator
    @chaquator 9 місяців тому

    i wanna see all of this as pixel shaders, would be an interesting challenge, especially more iterative procedures like accounting for velocity and gravity

    • @johnjackson9767
      @johnjackson9767 9 місяців тому

      I would rewrite this in compute shaders, or at least double buffer and multithread it.

  • @Gamester-vy1qp
    @Gamester-vy1qp 9 місяців тому

    This is so cool!

  • @oamioxmocliox8082
    @oamioxmocliox8082 9 місяців тому

    ;))

  • @sushismitcher225
    @sushismitcher225 9 місяців тому

    This is sooo cool. I made it with python and Pygame, and it works perfectly. It game me so many ideas for games. You just earned a sub.

  • @andrewalexart
    @andrewalexart 10 місяців тому

    8:40 "and this is easy enough to do!" me: fuck it... :D

  • @ryanben3988
    @ryanben3988 10 місяців тому

    I love it❤....and I want to make one that can work on embbeded devices, and a starting point would be to take your code and run it on the GPU to increase performance.

  • @mworld
    @mworld Рік тому

    Nice, but tabs suck and should be banned in source code.

    • @johnjackson9767
      @johnjackson9767 Рік тому

      lol lmao even

    • @mworld
      @mworld Рік тому

      @@johnjackson9767 I've worked on large code bases that had a mixture, it looked horrible. Not to mention how bad it looks in diffs.

  • @Kenbomp
    @Kenbomp Рік тому

    Didn't explain very well the actual code to what the brush paint did

    • @segsfault
      @segsfault Рік тому

      it just puts pixel wherever the mouse is clicked...

  • @shankar4510
    @shankar4510 Рік тому

    can you tell me where you started ? your programming history ?

  • @jorgegimenezperez9398
    @jorgegimenezperez9398 Рік тому

    Just wow

  • @ppok2490
    @ppok2490 Рік тому

    I think it will take me some few re-reads through the source code to actually wrap my head around it. You have definitely changed my perspective on macro usage in C, particularly on how flexible you can make your code (although something tells me this might lead me down to another unwanted rabbit hole of excessive macro use). I can see how this is a "poor" man's reflection system though, cheers! XD

  • @dandymcgee
    @dandymcgee Рік тому

    Awesome! Looks fantastic.

  • @markbeaver4806
    @markbeaver4806 Рік тому

    Fair job My fair thumb up for you

  • @WarClonk
    @WarClonk Рік тому

    Hey man, I was interested in developing a game with gunslinger however since it is written in C and it is a header only library, I cannot use it in C++. Or is there maybe a way to make it work, like compiling C and then linking it like a normal library? Otherwise I guess I will have to do some OpenGl Sorcery because SDL doesnt seem to be capable to handle my task. Anyway, I absolutely loved your video on pixel physics. I have seen lots of games with it and always wondered how it works. I Hope you continue to make similiar videos seeing how popular it was!

    • @johnjackson9767
      @johnjackson9767 Рік тому

      You can use gunslinger for a c++ project. I have made sure that it compiles for both. There's are example projects in the gs_examples repo that compiles for c++ as well if you want to look at that.

  • @cs_calzone
    @cs_calzone Рік тому

    the browser and mobile game "Powder Game" by Dan Ball was my favourite example of a particle physics simulation before i played noita. to my knowledge its the originator of games like "the sandbox" on phone. the game itself has very cool interactions and particle simulation physics, relying very heavily on the showcase of wind and explosive force. its really facinating and i reccomend a mess around in it

  • @linusaxelsson3940
    @linusaxelsson3940 Рік тому

    Do you have any thoughts on player interaction/physics with this?

  • @mrbenjiboy9527
    @mrbenjiboy9527 Рік тому

    I wasted so much time on powder toy as a kid

  • @mitchwar2065
    @mitchwar2065 Рік тому

    This is very impressive!

  • @bibliusz777
    @bibliusz777 Рік тому

    this is disappointing

  • @mr.fishfish570
    @mr.fishfish570 Рік тому

    I haven't watched the video yet (sorry lol) but that game... The Powder Toy... Let's just say I'm glad you showed me

  • @maxpoppe
    @maxpoppe Рік тому

    why not iterate over the particles instead of the entire grid, which has empty cells?

    • @johnjackson9767
      @johnjackson9767 Рік тому

      You could do that with a sparse chunk system, but that was more involved than I wanted to get into for this.

  • @pixellino5009
    @pixellino5009 Рік тому

    Man, Where's your discord ?

  • @thomasrosebrough9062
    @thomasrosebrough9062 Рік тому

    6:16 isn't smoke just *water* upside down, not sand?

  • @lmao_ur_mum
    @lmao_ur_mum Рік тому

    7:02 average sublime user

  • @alexfrozen
    @alexfrozen Рік тому

    There are fragment shaders, good. But no vertex shader?! C'mon!

    • @johnjackson9767
      @johnjackson9767 Рік тому

      It's a standard quad vertex shader. It's in the repo provided. C'mon.

    • @alexfrozen
      @alexfrozen Рік тому

      @@johnjackson9767 I just read main.c diagonally. Maybe in some other file?

    • @johnjackson9767
      @johnjackson9767 Рік тому

      @@alexfrozen Yes. There are multiple source files, ones specifically for the render passes.