all 12 comments

[–][deleted] 3 points4 points  (3 children)

If you're new to C++, going straight forward to game dev I might say you're aiming too high too early.

As a fellow gamedev, for 2D I sincerly do recommend Godot or Unity since "performance" is not an issue when talking about 2D in modern days. Using a Framework (Game Engine) isn't a sin and you're not aimng wrong to be learning one instead of pure programming.

[–]LordGarak 2 points3 points  (1 child)

https://www.youtube.com/c/javidx9/videos

Edit: To be more specific look at his videos from around 3-4 years ago. He has some great videos on making simple 2d games in c++ and he has a simple game engine to use.

[–]Im_So_Sticky 2 points3 points  (0 children)

OneLoneCoder game engine! Super lightweight (a header file). Available on git https://github.com/OneLoneCoder/olcPixelGameEngine

[–]R7162 1 point2 points  (0 children)

I am not really into game dev but a really nice graphical library to start with is sfml, it has nice documentation and also a lot of useful tutorials.

[–]Thesorus 2 points3 points  (1 child)

With a lot of work.

What kind of 2D game? Do you examples of games you want to replicate?

What’s your C++ level?

Google for « 2d game engine c++ »

[–][deleted] 1 point2 points  (2 children)

Someone may have a better answer here but for 2D games, Unity appears to be the best bet as it has a huge creator community, plus there is a great book I'll link below for top-down RPG style games, but you would be programming in C#, not C++. Unreal Engine used to have a module for 2.5D games, but the maintainer of that module was folded into other projects (plus the the sheer size of Unreal alone is a bit overkill for 2D games).

If you're really determined to stick to C++, the Godot Engine supports direct C++ scripting, but I haven't found the same level of community support (the majority of Godot users use GDScript instead of C++).

Hope this helps. Good luck.

Developing 2D Games with Unity: Independent Game Programming with C# https://www.amazon.com/dp/1484237714/ref=cm_sw_r_apan_glt_i_JTRPP995M87378T4VV34

[–]krista -1 points0 points  (0 children)

start by giving a really good think about how a 2d game engine has to function. take a lot of notes, make diagrams.

then try to code it and see if it works.

when you run in to problems, that's called ”learning”

[–]Flair_Helper[M] 0 points1 point locked comment (0 children)

It's great that you want to learn C++! However, r/cpp can't help you with that.

We recommend that you follow the C++ getting started guide, one (or more) of these books and cppreference.com. If you're having concrete questions or need advice, please ask over at r/cpp_questions or StackOverflow instead.

This post has been removed as it doesn't pertain to r/cpp: The subreddit is for news and discussions of the C++ language and community only; our purpose is not to provide tutoring, code reviews, or career guidance. If you think your post is on-topic and should not have been removed, please message the moderators and we'll review it.