this is just bait right?
if not, where does it stop? why rewrite libpng but not the kernel? what about the firmware? should that be rewritten too? and why use existing hardware instead of manufacturing your own?
Welcome to NAND2Tetris, an go-at-your-own-pace course where you learn how to make a complete Tetris game machine from fricking NAND gates
https://www.nand2tetris.org/
https://i.imgur.com/6oYQjEk.jpg
What are the best libraries to learn game dev with c++
If you want to jump into game dev ASAP (and actually be productive), choose either Godot or Unreal Engine and go further from there. Unity3D is trash af recently. If however you feel more like exploring what makes a game engine tick and you can have months or years to waste, then go make your own engine from scratch. At this point, the more appropriate question would be "which graphics library should I pick to start making a game engine?", to which I say SDL (maybe?) Just start a new thread if in doubt.
Repeat after me: don't be a Gankertard, and DO NOT REINVENT THE WHEEL IF POSSIBLE.
>Cocos is also a nice engine you can code right on top of.
pretty sure that has license issues at least thats what anons claimed last couple times it came up.
SIMDJSON for speed because you can. No idea what is the most ergonomic lib. Definitely not boost. Please don’t feed the troll who keeps shilling that POS in here.
SIMDJSON for speed because you can. No idea what is the most ergonomic lib. Definitely not boost. Please don’t feed the troll who keeps shilling that POS in here.
it is more pleasant to use, but the downside is performance.
for config file parsing and most message passing, nlohmann is probably fine, but for parsing big json where performance is important, it falls short.
constructing intermediate dynamically typed document trees is not very efficient. a SAX-like interface is more efficient. And while nlohmann does provide a SAX interface and is faster than not using it, SAX parsing with rapidjson or simdjson is still a lot faster than SAX parsing with nlohmann.
I speak from experience using both those libraries.
it is more pleasant to use, but the downside is performance.
for config file parsing and most message passing, nlohmann is probably fine, but for parsing big json where performance is important, it falls short.
constructing intermediate dynamically typed document trees is not very efficient. a SAX-like interface is more efficient. And while nlohmann does provide a SAX interface and is faster than not using it, SAX parsing with rapidjson or simdjson is still a lot faster than SAX parsing with nlohmann.
I speak from experience using both those libraries.
To me nlohmann sits uncomfortably in the middle.
If I want JSON as a concrete value type, Boost.Json or Rapidjson work fine for me.
If I want the full customizable template experience, I'd rather use something like DAW JSON Link which parses directly to/from structs and often can beat the performance of even libraries like simdjson since it only parses on demand (i.e what is required by the struct you want to deserialize).
>I want to program a game in C++ with an engine
Unreal Engine or Godot. Pick one. >I want to custom make an engine
SDL, SFML, or Raylib. Pick one. It'll give you graphics, audio, and controller inputs. Everything else you gotta do yourself. >I want to make my own multiplatform library for graphics/audio/input
Don't.
use urho3d or ogre, very well designed and actually teaches you something about gamedev.
Don't listen to the soidevs itt recommending godot or something, there has never been a good game made with it.
platform abstraction layer of choice: sfml, sdl, glfw
graphics: abstract it away with bgfx or go directly with vulkan, opengl, directx
ecs (not for the data oriented meme but for managing complexity): entt
useful stuff: stb_image for opening images, assimp for models, sol2 for embedding lua if you want, imgui for debug ui, glm for vector math, i think people use freetype for fonts but tbh id recommend you just make an sdf texture atlas of whatever font you need (you can use libgdx's hiero to generate)
write your own god damn libraries. start with png and jpeg decoders. png is very simple.
>write your codec bro
jesus
this is just bait right?
if not, where does it stop? why rewrite libpng but not the kernel? what about the firmware? should that be rewritten too? and why use existing hardware instead of manufacturing your own?
Welcome to NAND2Tetris, an go-at-your-own-pace course where you learn how to make a complete Tetris game machine from fricking NAND gates
https://www.nand2tetris.org/
If you want to jump into game dev ASAP (and actually be productive), choose either Godot or Unreal Engine and go further from there. Unity3D is trash af recently. If however you feel more like exploring what makes a game engine tick and you can have months or years to waste, then go make your own engine from scratch. At this point, the more appropriate question would be "which graphics library should I pick to start making a game engine?", to which I say SDL (maybe?) Just start a new thread if in doubt.
Repeat after me: don't be a Gankertard, and DO NOT REINVENT THE WHEEL IF POSSIBLE.
boost
bgfx + sdl + opengl
nice bait
This is a joke OP. Do not boost.
For a simple 2D game SDL works well.
I use SDL with the STB libraries for help in 3D as well. I think Source used SDL for a while.
Note if you go this route you will be writing an engine.
Cocos is also a nice engine you can code right on top of.
C++ is also the scripting language for Unreal, if you don't want to make an engine.
what's wrong with boost?
>Cocos is also a nice engine you can code right on top of.
pretty sure that has license issues at least thats what anons claimed last couple times it came up.
Shit take. Boost is actually good.
let me guess..
That
If you're purpose is to learn stick with those
You're not going to make a real game without an engine bud
raylib
Fizzbuzz
how do I de/serialize json files
Boost.JSON
https://www.boost.org/doc/libs/1_79_0/libs/json/doc/html/json/overview.html
Just wait for C++29 reflection.
Fastest JSON library that I know of
https://github.com/simdjson/simdjson
Jinx!
SIMDJSON for speed because you can. No idea what is the most ergonomic lib. Definitely not boost. Please don’t feed the troll who keeps shilling that POS in here.
simdjson or rapidjson are definitely the fastest
but for ease of use I prefer nlohmann::json
Boost JSON is on par with rapidjson while having a modern API with minimal templates.
https://www.boost.org/doc/libs/1_79_0/libs/json/doc/html/json/benchmarks.html
Simdjson isn't really comparable to Boost.JSON/Rapidjson as it only offers read-only access.
https://www.boost.org/doc/libs/1_79_0/libs/json/doc/html/json/benchmarks.html
nlohmann json is the superior JSON library since it actually takes advantage of C++ features onstead of being a Javaesque imperative meme.
it is more pleasant to use, but the downside is performance.
for config file parsing and most message passing, nlohmann is probably fine, but for parsing big json where performance is important, it falls short.
constructing intermediate dynamically typed document trees is not very efficient. a SAX-like interface is more efficient. And while nlohmann does provide a SAX interface and is faster than not using it, SAX parsing with rapidjson or simdjson is still a lot faster than SAX parsing with nlohmann.
I speak from experience using both those libraries.
To me nlohmann sits uncomfortably in the middle.
If I want JSON as a concrete value type, Boost.Json or Rapidjson work fine for me.
If I want the full customizable template experience, I'd rather use something like DAW JSON Link which parses directly to/from structs and often can beat the performance of even libraries like simdjson since it only parses on demand (i.e what is required by the struct you want to deserialize).
You don't, use binary.
STD
Unreal engine. Otherwise, take you pick. You can literally choose any graphics, sound and physics libraries.
https://www.jstor.org/stable/23889305
>I want to program a game in C++ with an engine
Unreal Engine or Godot. Pick one.
>I want to custom make an engine
SDL, SFML, or Raylib. Pick one. It'll give you graphics, audio, and controller inputs. Everything else you gotta do yourself.
>I want to make my own multiplatform library for graphics/audio/input
Don't.
>raylib
imagine having symbol redefinition errors WITH THE FRICKING WINDOWS.H
use urho3d or ogre, very well designed and actually teaches you something about gamedev.
Don't listen to the soidevs itt recommending godot or something, there has never been a good game made with it.
platform abstraction layer of choice: sfml, sdl, glfw
graphics: abstract it away with bgfx or go directly with vulkan, opengl, directx
ecs (not for the data oriented meme but for managing complexity): entt
useful stuff: stb_image for opening images, assimp for models, sol2 for embedding lua if you want, imgui for debug ui, glm for vector math, i think people use freetype for fonts but tbh id recommend you just make an sdf texture atlas of whatever font you need (you can use libgdx's hiero to generate)
Why not just use a high level language? You're probably not trying to run this game on embedded devices.
What algos and data structures do I need for the game part of the game?
nice png, loser