GraphX Alpha 2
GraphX Second Alpha
Introducing:
- Custom Phong shader
- Support for multiple lights of various types (point, spot, and directional)
- Theatres (GraphX version of game scenes/levels/maps)
- Better rendering pipeline
Shortcomings:
- Forward-rendering
- OpenGL only
- As far as I know, GPU code is single-threaded
- Phong lighting instead of Blinn-Phong lighting
Upcoming:
- Actors should use Mesh pointers instead of Meshes
- Theatres might use a custom filetype to store data for creating and adding Actors, Meshes, Materials, etc.
- Blinn-Phong lighting
- Either deferred-rendering (which is far too complex for me right now) or better forward-rendering (preferable, currently)
- Removing as much OpenGL specific code from the main file as possible
- On that note, abstracting rendering functions to isolate OpenGL code and allow for different API usage
Building Notes:
If you want to compile the engine for yourself, here are some things to make note of:
- I did not initially program this with Windows in mind, but you can build an executable using CMake, clang, and the Microsoft Windows SDK/build tools/whatever the hell DLLs and shit you need. I specifically designed the CMakeLists to not use Visual Studio because I have a petty vendetta against it, as a Linux snob (sorry, but Sublime Text is based). Your mileage shouldn't vary by much, but it might.
- You might notice
make linux_testandmake windows_testcan be run, but will fail at the very end. All the "test" rule does is compile the code like normal, run the program with a custom Zsh script, before finally deleting the program after being run (which probably isn't necessary and might change immediately after me writing this). The custom script I wrote just runs the game using GameMode and MangoHud, and takes in a number parameter as input to set the FPS cap in MangoHud. You don't have that script, which is why it will fail. If you want that script, it's only one line so here you go:
MANGOHUD_CONFIG="fps_limit=${1}, gl_vsync=0, vsync=2, gamemode" gamemoderun mangohud --dlsym $2
Preword:
When publishing this release, I wrote a few paragraphs of information that I would end up adding to the README. However, since I did initially write it up for this release, I'll keep it down below as well.
Rant:
When I started this journey, I had very little programming experience; a few basic Python programs (like, command-line output basic), some shell scripting, a bit of web-design, and some fun ventures in Blitz3D (which I highly recommend to anyone interested in the programming side of gamedev). Needless to say, I was in no position whatsoever to think to myself, "hmm, you know what? I want to learn C++ and OpenGL/Graphics Programming at the same exact time! Surely, nothing will go wrong". I am here to tell you I am lucky that I have autism and an autistic intrigue and passion for programming, because if I didn't, this project would have permanently died before a week's time.
DO NOT DO WHAT I DID.
If you want to learn something, especially learn how to make something, don't fucking jump into the deep end. You'll burn out so quickly that you'll never want to touch that thing ever again. I know this because I did just that with Blender, Unity, UE5, programming, video creation, video editing, working out, voice acting, animation, drawing, and so much more. It took years for me to pick some of those things back up, and some of them I still haven't tried since I burnt out on them. I am lucky that game engine programming just so happened to be an autistic hyperfixation of mine. That's quite literally the only thing that kept me going while essentially learning the most difficult three things you can ever learn: coding, C++, and graphics programming. Thank god I didn't try this on Windows.
Oh yeah, my final word of advice:
DO NOT USE WINDOWS TO LEARN HOW TO PROGRAM!!!!!!
Holy fuck is Windows just the worst for beginners; Visual Studio, the Windows libraries, and shit like VisualC++ are all fucking awful for beginners. When you have to learn how to fucking open up and configure Visual Studio before even writing "Hello World!", you know there's a problem. Fuck Visual Studio, fuck solution files, fuck what it does to your beautiful project folder, fuck Microsoft and their stupid unique required libraries for executable compilation, and fuck the NT filesystem for existing.
Rant over, you can all return to your desks.
Special Thanks:
Big shout out to LearnOpenGL, StackOverflow, and Desmos for teaching me everything I need to know.
Huge thank you to the Game Engine Black Book on DOOM, and autistic thank you to John Carmack for programming DOOM; ID, Valve, and their game engines were some of the biggest sources of inspiration for me doing this whole thing.
Kudos to sadmansk and his game engine for being a helpful reference during the first few days of this project.
Thank you to UE5 and Unity for making me annoyed, passionate, and foolish enough to say "this sucks, I dislike this, and I could do better".
Thank you to Godot for being a potentially helpful reference once I understand more about what the hell I'm doing, but mainly for being open-source, well made (mostly), and having a clear and concise chart detailing their graphics rendering pipeline.
Finally, but most importantly, thank you to my dad for giving me his love of problem solving, a passion for knowledge, and "Algorithms in C: Third Edition" which is a very good read (that I have yet to finish).