The Simplest Game
The Simplest Game
  • 18
  • 102 716
Dynamic 2D Lights - Game & Engine Devlog
In this devlog I show you how I use Screen Space Lightmaps to implement dynamic 2d lights in my C++ engine. I use OpenGL to render the game.
00:00 Gameplay
00:52 Screen Space Lightmaps
01:46 RenderDoc
03:36 Gameplay
zhlédnutí: 1 538

Video

Make Pong in pure C++ in 2 hours
zhlédnutí 595Před 2 měsíci
In this tutorial, I will show you how you can make Pong in pure C using OpenGL to render the game on Windows. GL Extension Headers: registry.khronos.org/OpenGL/api/GL/glext.h registry.khronos.org/EGL/api/KHR/khrplatform.h 00:00 Window Setup 05:55 Rendering 10:29 Gameplay
Gameplay Trailer | 1000+ Enemies Bullet Heaven
zhlédnutí 262Před 2 měsíci
In development gameplay trailer for my top-down shooter indie game with over 1000 enemies on screen at the same time. Developed in C using my own custom engine. Music: How's It Supposed to Feel - NEFFEX
How I'm making my game in C++
zhlédnutí 3,2KPřed 3 měsíci
I'm making my indie game in C and use mostly the win32 api and OpenGL. I will show you my project and build setup and walk you line by line through the Start.cpp file to give you an overview of the project. 00:00 Intro 00:40 Build Setup 03:01 Includes 05:03 Main Function
EXPLOSIVE Enemies | 1000+ Enemies Bullet Heaven - Devlog 2
zhlédnutí 1,1KPřed 3 měsíci
In this devlog I show you the progress on my 2d top-down bullet heaven indie game, where you fight over 1000 enemies at the same time. I use C and OpenGL to make this game.
1000+ Enemies Bullet Heaven | Devlog 1
zhlédnutí 2,7KPřed 4 měsíci
In this devlog I show you the progress on my 2d top-down bullet heaven game with over 1000 enemies on the screen at the same time. I use C and OpenGL to make this game.
Physically Based Rendering (feat. art by @naevrah ) | OpenGL
zhlédnutí 1,4KPřed 5 měsíci
In this game engine devlog I'm showing you my implementation of a physically based renderer in OpenGL and C . Specular BRDF Functions Fresnel Function: Schlick approximation Geometry Function: Smith masking-shadowing function Normal Distribution Function: GGX distribution Check out other artworks by Naevrah! Website: www.naevrah.com Instagram: naevrah ArtStation: www.artstation.co...
I added 4 new stages to my OpenGL game!
zhlédnutí 939Před 7 měsíci
In this devlog I added 4 new stages to my indie game. I'm using my custom game engine written in C and I'm using OpenGL for rendering.
I wrote a game engine to build my game prototype using C++ and OpenGL
zhlédnutí 1,6KPřed 8 měsíci
In this devlog I'm showing you my game prototype "Dodge". I'm using my custom game engine written in C and I'm using OpenGL for rendering.
This is how you can draw a cube in C++ without SDL | Game Engine Devlog | OpenGL
zhlédnutí 4,5KPřed 9 měsíci
This is how you can draw a cube in C without SDL | Game Engine Devlog | OpenGL
You don't need libraries to write a game engine in C++ | OpenGL | Devlog
zhlédnutí 68KPřed 10 měsíci
You don't need libraries to write a game engine in C | OpenGL | Devlog

Komentáře

  • @user-hy3if4cs2n
    @user-hy3if4cs2n Před 4 dny

    No you dont. But you should because good fucking luck

  • @pedrogabrielnogueira1068

    Bruh is going up to that point when he realises he doesn't need an OS as well

  • @iaminthenowhereinn
    @iaminthenowhereinn Před 13 dny

    bro is ded

  • @coolmanthecool603
    @coolmanthecool603 Před 22 dny

    Now use vulkan, or no opengl

  • @oh-facts
    @oh-facts Před 26 dny

    I have a question. Why are we including glcorearb / glext / khrplatform ourselves? Doesn't windows ship with gl/gl.h? Do those headers not cover everything?

    • @The_Simplest_Game
      @The_Simplest_Game Před 26 dny

      gl.h only includes some of the gl functions. I think only the ones from version 1.0. These are also the ones, that don't have to be bound manually.

  • @oh-facts
    @oh-facts Před měsícem

    Could you touch on creating a modern opengl context + creating bindings for it (including 4.x extensions)? That's the only thing stopping me from dropping sdl since sdl doesn't do everything I need and I'd much rather just do platform stuff myself. I had a platform from earlier games for linux and win32, but I used vulkan then and I didn't have to do all that opengl context crap and its been so painful to do those, that I just used sdl. some nice resource / starting point would be nice.

    • @The_Simplest_Game
      @The_Simplest_Game Před měsícem

      I show my setup for binding opengl functions in my Pong video around this time: czcams.com/video/ZyVH_Yjo8gk/video.html You can bind any function, that is in the glext.h file. There are more header files like glcorearb.h and wglext.h should you need functions from there. These files should also be easy to find on the khronos website. In general I found the win32 documentation quite helpful and depending on how deep you want to go into this topic I would recommend you the @MollyRocket channel. There are some older videos about opengl and windows platform. Hope that helped :)

    • @oh-facts
      @oh-facts Před 29 dny

      @@The_Simplest_Game Hi, I was able to get it to work, thanks. Handmade hero is a gold mine, thanks. I am a bit new to opengl so I had some questions, in case you've come across this before. I decided to update to 4.5 because its more fun to write + compute shaders. But is this potentially harmful because of platform support? I am also making a 2d game, and targetting windows and linux.

    • @oh-facts
      @oh-facts Před 29 dny

      part 2: Do you have suggestions for modern rendering techniques in opengl? At the moment I am uploading most of my uniform data before hand, then indexing into whatever I need. And I implemented pushbuffers / render commands too.

    • @The_Simplest_Game
      @The_Simplest_Game Před 26 dny

      I don't do anything special regarding rendering. I just try to keep it as simple as possible.

  • @B_dev
    @B_dev Před měsícem

    well sure you could be a carpenter starting with no tools but you gotta be sure you want to

    • @Luluskuy
      @Luluskuy Před 22 dny

      This is brilliant analogy, lol

  • @ExodiumTM
    @ExodiumTM Před měsícem

    Rendering a cube with a pure black shadow isn't even remotely close to a game engine, at all. Also, how is Open Graphics LIBRARY not a library? Just code in assembly

  • @oh-facts
    @oh-facts Před měsícem

    are you using opengl 4.5 or 3.3?

    • @The_Simplest_Game
      @The_Simplest_Game Před měsícem

      3.3

    • @oh-facts
      @oh-facts Před měsícem

      @@The_Simplest_Game why not support Mac too if you're using 3.3 anyways?

    • @The_Simplest_Game
      @The_Simplest_Game Před měsícem

      I still want to keep the option open to use 4.x features later. Also supporting mac would take quite some additional developing time.

  • @KamranWali
    @KamranWali Před měsícem

    Awesome video! Like the idea of your game. Also kudos for making your own game engine. That takes some serious dedication and time to do. It is always interesting to see how others implement certain features to a game engine. Looking forward to your next devlog. Keep it up! :)

  • @NowKnownMAWO
    @NowKnownMAWO Před měsícem

    well done, very impressive that you created your own custom engine :) I really like the minimal style of the game. I would add a simple art-style (such as only flat colors, no details, simple shapes) and a lot of "juice" (game-feel) to make it pop-out! I also like the idea of having a map, instead of a huge open area! continue the good work :)

  • @BlatentCheater
    @BlatentCheater Před měsícem

    add coop multiplayer

  • @someguythatlikesultrakill

    This Looks really cool maybe after your done with all important stuff you could add Like a turret Shooting at enemies that lasts for Like 30 Seconds and then its on cooldown

    • @The_Simplest_Game
      @The_Simplest_Game Před měsícem

      Thanks :) I have a list with a couple of ideas, that involve an automated turret. Though I have to consider how much time it would take to implement one of them.

  • @till8413
    @till8413 Před měsícem

    ich sehe einen deutschen akzent, wenn ich ihn sehe!😂

  • @MrCloudage
    @MrCloudage Před měsícem

    Excuse me, may I ask why you chose to stick with OpenGL instead of opting for Vulkan? Are there any particular reasons or special considerations?

  • @nguyenloc180
    @nguyenloc180 Před 2 měsíci

    I'm crying right now

  • @hawkbirdtree3660
    @hawkbirdtree3660 Před 2 měsíci

    When did writing your own game engine become a bad thing? It used to be the norm in early days of game development. Most games I come across could easily be remade with a framework. In the drag and drop approach, you are always limited by what the popular game engine allows you to make, and not what you really wanted. I feel DD encourages a "you don't have to think about what's happening under the hood", and makes it so you never really what understand you are doing.

  • @dongyoblee2668
    @dongyoblee2668 Před 2 měsíci

    You are not transparent either. Skip

  • @compilererror2836
    @compilererror2836 Před 2 měsíci

    "you don't need libraries" my brother in christ, windows.h all jokes aside though this is very impressive

    • @Kawa-oneechan
      @Kawa-oneechan Před měsícem

      My brother in Christ, "opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;shell32.lib;" What does ".lib" stand for again?

    • @TU7OV
      @TU7OV Před měsícem

      That's not a library.

    • @compilererror2836
      @compilererror2836 Před měsícem

      @@TU7OV I mean yeah it’s *technically* not a library but it is a header file you include that provides functions, typedefs and structs (exactly what libraries do except it’s for interfacing with the OS). I think that’s close enough for you to not be *that guy* on a comment with 10 likes.

    • @LamantinoElettronico
      @LamantinoElettronico Před 28 dny

      The title is imprecise as what he meant is "libraries outside of OS functionality" which as you said is still awesomely impressive as the OS doesn't give you much at all in the way of writing a game. I wouldn't know how to do this myself without at least SDL2 and GLFW

    • @etodemerzel2627
      @etodemerzel2627 Před 25 dny

      Yeah, go all the way in and write your own OS.

  • @Ragnemalm
    @Ragnemalm Před 2 měsíci

    You use some keywords that I totally agree with: transparency, educational. I think you have a strong point there. I teach computer graphics, and although I do provide my students with some utility code on top of OpenGL, but it is all *transparent*. No black boxes if I can avoid them, no libraries stashed away where you aren't supposed to read or change them and they are so bit that you can't do that anyway. And this is all about transparency. My students are encouraged to dig into my code, and I try to keep things compact and simple. No GLM, instead a single code file with the essentials, no GLUT or GLFW, instead another single code file (one each for Mac, Linux and Windows). No assimp, instead the smallest reasonably capable OBJ loader I know (smaller than TinyOBJLoader!). Most of these are single header code. I obviously can't have my students digging into the code of OpenGL (although Mesa is open source) but all the other parts. But I am asking myself one thing: Should I skip most of this code and ask the students to write their own? Writing a model loader is a project of its own, but writing your own math library is not very hard at all. So, I totally agree on your approach. I think it is how you learn the best.

  • @lLenn2
    @lLenn2 Před 2 měsíci

    Let's be real. You do if you want to actually make something good.

  • @KoltPenny
    @KoltPenny Před 2 měsíci

    Why you say you don't need libraries then use OpenGL?

  • @OdysseyAviation
    @OdysseyAviation Před 2 měsíci

    Hast du das mit OpenGl erstellt?

  • @qwerty86381
    @qwerty86381 Před 2 měsíci

    Looks great :D can't wait to download!

  • @AltamishM
    @AltamishM Před 2 měsíci

    Nice work so far :) Would it be possible to smooth the camera repositioning when your controllable character moves? It's currently quite jarring. Else, it looks extremely fun!

  • @mugiseyebrows
    @mugiseyebrows Před 3 měsíci

    Writing your own tool is educational, leveraging existing tool is productive.

  • @Aragubas
    @Aragubas Před 3 měsíci

    great now add support for Vulkan, Linux and Wayland 👀

  • @kishirisu1268
    @kishirisu1268 Před 3 měsíci

    Sure, to make a game with moving cubes we dont need any library. Actually you dont need coding also, you can make same game with something like scratch lol

  • @threecolor3010
    @threecolor3010 Před 3 měsíci

    You have a nice voice!

  • @eestela42
    @eestela42 Před 3 měsíci

    Open Graphic Lib...

  • @korigamik
    @korigamik Před 3 měsíci

    Man can you share the source code for the project?

  • @cheer7731
    @cheer7731 Před 3 měsíci

    you are using a graphics lib. Your title does not really make sense

  • @courterart
    @courterart Před 3 měsíci

    wow, this cpp app couldn’t be further than what I’ve been taught project setup wise. Is there a reason you don’t just use Visual studio to compile your project? As a single platform cpp developer myself, I’m very interested in following the development of this project to see how smoothly it goes. I’m all for making the process streamlined and simple for development, you’ve made some interesting choices here. If it works it works, I always say. Good luck on the project and thanks for sharing.

  • @AetherSerenity
    @AetherSerenity Před 3 měsíci

    am i the only one or does he talk like sebastian league?

  • @agaveboy
    @agaveboy Před 3 měsíci

    owww why not sdl ;( opengl is pain

  • @kplays_6000
    @kplays_6000 Před 3 měsíci

    Looks great! Personally, when not using VS Solutions etc., I prefer VS Code - it's a lot more lightweight!

  • @brettrogers4208
    @brettrogers4208 Před 3 měsíci

    My game design teacher said to never use unity builds but to only include header files. Odd, i guess its just coders choice

  • @RoboGameOfficial
    @RoboGameOfficial Před 3 měsíci

    0:50 why not just use VS Code then?

    • @coolmanthecool603
      @coolmanthecool603 Před 3 měsíci

      He already explained, he doesn't want to use cmake, vscode does't manage projects, its just a file explorer terminal and text editor, it cannot compile code, letalone manage it

    • @someever2
      @someever2 Před 3 měsíci

      ​@@coolmanthecool603​ ?? that's not what he meant. he doesn't use visual studio to compile his code, he uses it for text editing. the compilation is done in a batch file, which is why vscode might actually be a better option, it's more lightweight than visual studio. it also has everything that he needs: a text editor, a file explorer and a terminal.

    • @The_Simplest_Game
      @The_Simplest_Game Před 3 měsíci

      I use the visual studio debugger and memory inspector from time to time. Forgot to mention that.

  • @Wyoming307
    @Wyoming307 Před 3 měsíci

    you can use the DirectWrite windows api to render text if you want to get rid of freetype

  • @arson5304
    @arson5304 Před 3 měsíci

    header files exist for two reasons: forward declarations and encapsulation. both c and c++ compilers require things to exist before you can use them in a top to bottom manner; you can get around this by doing what's called a forward declaration, where you define the signature of a variable, function, or class (this is not an exhaustive list of literally everything, but it should give you an idea of what i mean). this signifies to the compiler that this thing doesn't exist yet but it is going to later on in your code, which is a problem that gets passed onto the linker after the compilation step is finished. when you have multiple source files that all share the same code, you will soon find out that things will get very annoying to forward declare which is where header files come into play. now to explain encapsulation, sometimes you don't want a function in one source file to be exposed to another source file because it just doesn't make sense for it to be there. for example, it wouldn't really make sense for a mesh rendering function to be in the same place as enemy ai. with header files, you can describe what's supposed to be accessed from that file instead of leaving people guessing if anybody else was working with your code. this is the same reason public and private exist in classes, you're describing to people who are going to use your class what is and is not okay to directly access.

  • @albertojesusalvaradogarza1009

    imagine this, but in 3D, thats my final proyect for oop, i had a 2D version but using assembly, good job

    • @alexdev404
      @alexdev404 Před 3 měsíci

      Damn and I think that creating a rental system in QT/SQL is hard 😭

    • @albertojesusalvaradogarza1009
      @albertojesusalvaradogarza1009 Před 3 měsíci

      @@alexdev404 dont worry, im not even a good programer, a lot was already made in the proyect, but i have to create the player, objects, etc

    • @alexdev404
      @alexdev404 Před 3 měsíci

      @@albertojesusalvaradogarza1009 gosh well- i hope everything goes well! And thanks, I'll try my best, too!!

    • @ryanlockhart5328
      @ryanlockhart5328 Před 3 měsíci

      weird flex bro

  • @m4rt_
    @m4rt_ Před 3 měsíci

    Btw, you don't need to release/free the allocated memory when you are already going to exit. The OS will handle this, and this will just make it slower to close/exit the game.

  • @txreqbtw
    @txreqbtw Před 3 měsíci

    diing the same in rust

  • @victorgallet3174
    @victorgallet3174 Před 3 měsíci

    Nice video! If I may comment something, actually mesuring the 60fps with getTickCount is not quite accurate, and it depends on the system precision (10-16ms says the microsoft doc in general). You better want to use QueryPerformanceFrequency instead, and set the OS scheduler frequency of the system yourself (and don't forget to make it back to its default value when exiting the program ^^). One more thing, sleep is not accurate too haha. When sleeping(1), you expect that the system will sleep for exactly one millisecond, but unfortunately it's not really the case and it is usually bigger). If you want better accuracy, you can combine spin lock with sleep to not burn the cpu down, and get a pretty nice accuracy (better than just sleeping ^^)

    • @The_Simplest_Game
      @The_Simplest_Game Před 3 měsíci

      Yeah, when I check the fps in Renderdoc it's fluctuating between 59 and 60 fps. I don't think it has to be 100% accurate, but I'm going to look into it in the future. Then it would also be nice to support higher values than 60 fps.

  • @ojima510
    @ojima510 Před 3 měsíci

    You really shouldn't include .cpp files ever. You want to split your code across different source files and only include header files across them. Including all your source files into one means your compiler needs to recompile all your code every time you change anything, instead of only having to recompile the files you edited since the last compilation. It can also make for more readable and structured code if you create clean headers.

    • @victorgallet3174
      @victorgallet3174 Před 3 měsíci

      You are totally missleading... Actually it's called unity build, and the idea is that there is only one compilation unit, the whole program, and you recompile it every time. Just measure the performance, for small/mediums projects, it's quite often faster to recompile the whole project rather than compiling each object files individually and link them together. And you get extra benefit of quick and easy compiler optimizations because it knows the whole structure of your program, and can do a great job at inlining some parts of the code. And nowadays with compilers like zig cc (which is llvm under the wood with a cache system), even in unity build compiler can easily cache files which don't changed to blob and use that in place when generating object file.

    • @potato8236
      @potato8236 Před 3 měsíci

      Honestly, with modern pcs, compilers and build systems I really don't see much of an advantage, especially considering that you can only compile unity builds only single threaded. using ninja on 24 threads is so fast in compiling and linking that I don't think incremental small changes will win in a unity build. Maybe still in a clean build if each translation unit is really small... @@victorgallet3174

    • @victorgallet3174
      @victorgallet3174 Před 3 měsíci

      ​@@potato8236 Just use compiler with caching capabilities, like zig cc, and you'll see you will never need anything other than unity builds. If you actually need to recompile and change lots of code for debug purposes, actually what you need is hot reload (probably compiling to dll and (re)load the module at runtime when file is modified), or jit compiler features (like tcc offers for c). And incremental build was not the solution of the problem in the first place.

    • @ojima510
      @ojima510 Před 3 měsíci

      ​@@victorgallet3174 Oh, I did not realize that this was nowadays actually common practice (sorry, I had no intentions of being "misleading", I was just going of my 10-y/o GCC experience when compiler optimizations weren't that advanced I guess). Guess it's a stylistic choice then, but whenever I see things like this I often feel like I'm looking at a one-person project that will end up stalling within a month due to unreadable spaghetti code (but maybe I'm wrong).

    • @Rupour
      @Rupour Před 3 měsíci

      ​@@ojima510 It seems like he's definitely been working on this for longer than a month. And looking at the structure of the includes, it seems nicely encapsulated. I suppose we'll see as time goes on, but it looks like a nicely structured codebase so far. I agree it looks like a one-person project, but apparently there are a lot of old c libraries that use unity builds, so maybe not.

  • @diegoaredes2721
    @diegoaredes2721 Před 3 měsíci

    Amazing video😮.

  • @qwerty86381
    @qwerty86381 Před 3 měsíci

    Cool :D nice to have readable code

  • @kinershah464
    @kinershah464 Před 3 měsíci

    Yes, you should be able to directly access the video memory and write to it. But if your goal is to create a game, better to use existing libraries, helps in quick prototyping.

  • @dawidbujak
    @dawidbujak Před 3 měsíci

    Hello, I want to create MMO RPG. Will your engine be sufficient for this?

  • @DroopyTantrum
    @DroopyTantrum Před 3 měsíci

    hear me out, what if you added a ability to turn a few random enemies around you into explosive enemies, so you can potentially create a huge explosion if you play your cards right

    • @The_Simplest_Game
      @The_Simplest_Game Před 3 měsíci

      I'm still looking for more options how explosive enemies could show up. Something like this could be an option, though active skills are currently not on the feature list. But there could be a passive effect, that could turn enemies around you into explosive enemies under certain conditions.

    • @DroopyTantrum
      @DroopyTantrum Před 3 měsíci

      @@The_Simplest_Game that would be epic