I’d like to know if C++ can be used for backend web dev/ game dev because when you start learning the language all the tutorials say it’s a good language for games but I’m assuming that that’s not just text games and that there’s some way to style them. Thanks for reading.
You can use C++ with Unity to make games.
I think you’re thinking of C#, C++ is more Unreal engine. If you want to use C++ for game dev and you don’t want to use a game engine you will have to use a library like SDL, or straight OpenGL. OpenGL gives you direct access to the GPU, but it’s pretty involved.
You can use both C# and C++ in Unity.
Yeah, but Unity is more intended for C#, and if you want to use C++, Unreal engine is probably a better option, although it is definitely more involved.
Ok, I had to endure pecters from my friend to get this info:
To use C++ for game dev, it’s Unity or Unreal Engine. C# and C++ are both available on each game engine, but Unity is more beginner-friendly. (Quick note: Unity is losing users as they charge people once you make x amount of money. Something like what Replit is doing) Unreal’s graphics are quite good (you can use Blender designs on both, IIRC).
C# is easier to start with, but C++ is more widely used. FCC has tutorials IIRC, but then, they have tutorials on absolutely everything.
Anyway, yeah. It depends what you want to do.
P.S. You don’t really use C# on Unity. It’s their own script IIRC, but it’s C# with the physics parts. For Unreal, you import Unreal’s library IIRC.
@HenryMiles3 Do C++, it’s useful in programming. Another friend says it’s too difficult to do C++, though.
No it is C#, it just uses libraries that Unity has written to work with their game engine. And has some extra tags.
Is there a way for me to make a styled game with c++ on replit?
Spring Boot is a Java framework and you can use it for backend. You may be able to find some stuff, but C++ is not the best for web development. Learn Node.js if you want to do backend stuff.
Well, lots of people use C++ for desktop applications, but it’s not used for web development.
It’s definitely used for web development, it’s just not easy for a beginner, and there are many alternatives that while will cost some speed, will make up for it in readability and the ease with which you can add functionality.
A great article on C++ for web development: C++ Web Programming. A great article on writing a HTTP server in C++: Building an HTTP Server From Scratch in C++ | by Osamudiamen Azamegbe | Medium Here are some more resources: A simple HTTP server from scratch c - Make an http Server - Recommended books? - Stack Overflow
That’s CGI, which can basically be used for any language, so if I wanted to use that, I’ll use Python for it, which leads to me thinking “why not use Flask instead?”
I mean, the reason why not is to learn, and the user asked about C++, it is presumable they know that this will be very difficult, so they evidently want to learn how to do the same things higher level languages do at a lower level.
Yes, you can use C++ for web development, as many have already pointed out. But should you? Probably not. C++ is a great and complex language, but you’d have to have a really good and specific reason for using it.
You can do anything in C++. Don’t. I recommend Pygame (a Python library).
What I mean is I recommend the other ones (making HTTP servers) over CGI.