Should I use C or C++ for my games?

should I use C or C++ for my games?

Attached: R14kkDj.png (650x522, 25K)

Other urls found in this thread:

open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1108r0.html
twitter.com/NSFWRedditImage

Use Haskell

Binary

Use Javascript

Install Gentoo

Use assembly

Install GNU+Gentoo

The G in Gentoo literally stands for GNU.

Use HTML

>C or C++
Use what ever you want, best case you'll end in the endless pit of wanna be famous developers, average case you'll drop your project

I like using C++ for my games. However, if you are asking that question, you should not use C or C++ for your games. Just use C# with Unity like every other brainlet.

are you willing to do everything from scratch?
If the answer is yes, then yes

potato

Install Gentoo-OpenBSD, Gentoo without GNU bloat

Don't ever use C.
If you don't like some feature of C++ just don't use said feature.

>C or C++
Nope, use X Y A & B like a professionnal gamer.

Attached: NEdJCcABnfvCKFAvUH8i4R-320-80.jpg (320x180, 7K)

Maybe wasd

>Don't ever use C.
>If you don't like some feature of C++ just don't use said feature.

This. Fuck. How many times I found a C++ thing I didn't like, thought "I don't like the way C++ works, I'll write plain C" and after writing 30 lines of error handling, bounds checking and more stuff that shouldn't be necessary on any sane language, I give up and come back to C++

C, it's just easier because there is less choices to be made. Everything is just pod structures and functions. With c++ you immediately start thinking pointless shit like whether should I lamda this or template that should I make a new class for this or include it in the existing one. There is a 10 different ways to do everything in c++, I believe decision fatigue is a thing. Btw the best most efficient way to implement something in c++ is going to look something like pods and functions anyway.

>With c++ you immediately start thinking pointless shit
sounds like you is the problem

go back to /agdg/ cris

If using c, whether the problem is inside my head or not, solves the problem, it is good enough for me.

Fair enough. But isn't decision fatigue only a thing if you are actually forced to make a decision?

C++. Function overloading, virtual functions, and abstract virtual functions are so nice for game related concepts.

THIS. Eclipse and Java were designed for games development in mind. The best games on Xbox are written in Java.

Any serious developer will choose C++.

Gamedev here, just use whatever the fuck works.

This guy loves to write the same shit 10000x on the code.

Just wait for Jon Blow's new language to come out

Godot and C++ is the way to go

C with C++'s OOP
and some STL data structures while you're there.
nothing else.

C
it's way more fun

The GNU in Gentoo literally stands for GNU

Use whatever you're better at. If you're equally skilled at both, use whatever you like better. If you're bad at both, quit being a retard. If you use whatever the fuck language Jow Forums chooses for your and it's not something you're familiar with, comfortable with, or a language you enjoy, you'll end up fighting the language more than you fight the problems you're trying to solve making a game and you'll be more liable to quit.
That you had to ask at all is a bad omen from the start.

Attached: 1529016838790.jpg (960x960, 138K)

Whatever you are most comfortable with, whatever you do some fat autist on welfare that doesn't have any skills will tell you how what you are doing is wrong.

Single person asking whether to use C or C++ for their solo game development.... It doesn't matter, you'll never get it done.

>developing game in C
Don't even do it. C++ is better, but don't fucking develop games in C. Graphics alone in C is a pain in the ass. I haven't done any graphics work alone in C for years, but don't even get me started on the shit ton of rc files I had to write years ago.

Probably neither

>implying it even exists

Gentoo is a species of penguin you retard

3D/Unreal? C++
2D/Unity C#
Godot C++ or C#
Homosexual? Java/Python/Lisp
Got something to prove? Brainfuck/Assembly

How the fuck are we supposed to give you advice if you don't tell us what you want to do? Fuck off tell you tell us what kind of game you want to make.

Attached: sLe13h3.jpg (1224x1445, 195K)

C++ , Unreal is good desu

C++
You can use C++ as a better C, basically, and still call functions from the C library if you want.
C++ design principle is that you don't pay a cost (in complexity, performance, etc.) for what you don't use.
There is no reason to use C except where you cannot use C++ (embedded systems, platforms with no good C++ compiler, etc.) Otherwise C++ is a better approach with no downside (because, again, you can write C++ that basically looks like C, if you wanted to do that).

t. write audio apps in C++ (and sometimes I use old school calloc/free for audio buffers, if I need to)

>he doesn't do everything in scheme

We're talking about things that exist

>2018
>not writing 8086 assembly in at&t syntax

Fortran

are you high?

Use a god damn scripting langauge or game engine you tard. Building a game from scratch is fucking retarded.

It's literally GNU bloat on top of the openbsd kernel

>C if you want to be a better programmer
>C++ if don't want to use an bloated engine
>Unity/Unreal/Gamemaker if you want to learn and use bloated software for your dumb little game
>Godot if you want to make a game

Attached: ayo.jpg (680x598, 54K)

TELL ME HOW THE FUCK WOULD THAT HELP ME??????

I use Steam for my games :)

Attached: gamer girl.jpg (960x801, 142K)

>HURR DURR

open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1108r0.html

virus link dont click

Your engine will be C/C++ and your data will be Python/Lua/JS.

C will be easier in the long run, don't let pointers scare you. People are under the impression that good C++ involves no usage of raw pointers, but in gamedev that couldn't be any further from the truth. Especially when you consider half the middleware out there is written in C.

that being said these two anons make a good point, you can still write C-ish code in C++. If stack overflow CIA niggers have a problem with this they need to realize that in the game industry anything goes

This. I unironically used node.js and html5 canvas for my gaem. It was a pain in the ass but it works and still easier than c/c++

Orthodox C++

visual novel

I recently took the plunge and made my C++ engine-code into straightforward C.
Things I have seen during this process:
C++ is not needed.
My code is now cleaner.

It was pretty easy, since I practically programmed C in C++ anyhow.

> Graphics alone in C is a pain in the ass.
What the hell are you talking about?
OpenGL is a C Api, so you will be writing C Code anyway.
Also it's not hard at all. Graphics in C super straightforward.
Declare your data. Know your data-transforms.

>you can still write C-ish code in C++.
You can, but if you have don't have much of an idea about C vs C++, then you will probably end up using C+crap.
For anyone learning, just write C.

C++. You will spend your entire time in C tracking down memory leaks, fucking with strings and trying to construct useful structures without template containers or object orientation to help you.

Pretty much this. Nobody will care what your game is written in if it sucks. Use unity or unreal and focus on making good art, story, etc.

You are a fucking faggot and should end your existence.
At this point I only feel resent for C++ fuckers.

MIPS desu senpai.

C++ definitely. OOP seems like it would be incredibly useful in game development

Use Rust with Piston engine.

This. A good pick is also Javascript + three.js, expecially if you want to learn how stuff works on a lower level.

Stop with this this bullshit, the answer is Racket

Someone link the Write in C song

Then just use ren'py with python and focus on making a good story and art

Stop this shitty meme, please. A basedboy making technically insignificant indies waking up one day and telling other people how his language is the good one is the most pathetic thing ever.

Use the most recent C++ standard for getting rid of boost like dependencies. Especially recommending C++17 for std::filesystem. Start by writing a good logger/tracer and use as many assertions as possible if you're writing things from scratch. Get gtest and try to write unit tests for every component you finish. Proceed with resource loading, especially async loading with callbacks and shit. Don't overthink about early optimization but be always aware that you may need to change lots of things for the future. Write a very simple renderer and try to optimize it by stressing your scene. If you are so knowledgable about graphics APIs, make the renderer as abstract as possible for future underlying API changes.

fpbp.

Wow, you're dumb.
Many of these things one can maybe do if you have a large team of full-time employees.
If you are on your own you will never get done this way.
Or else have fun trying to write Unit tests for your renderer or for your physics engine, or even better, your net-code.
Protip: This will take much longer than even writing those components.
Making your renderer (a common bottleneck) as abstract as possible is a dumb fucking idea.
Making it "abstract" when all it does is send data to your graphics-card is idiotic.
A smarter way is to make it so that the interface matches what opengl (or whatever API) expects. This makes all your code simpler, since at some point you will have to transform that shit anyway.
> callbacks and shit.
Kill yourself. Just end your life you fucking piece of shit.
Callbacks are so fucking retarded, I want to punch whoever thinks they are a good idea.
You don't need a callback for asset loading in games because the frame-boundaries are always clear.
Just set a flag somewhere when a thing is done loading, and only when the flag is set, decide to render.
When something is about to unload, then unset the flag.
Fucking easy, and simple. No dumb inverted control-flow necessary.

>absolute state of Jow Forums

Callbacks are necessary when your specific resources (mainly meshes, textures, sounds) need to be uploaded to different devices after loading into the RAM is complete. Your async loader is not responsible for that, but the resource implementations and their callbacks.

No, they aren't necessary.
I have already explained to you how.
I don't want to deal with brainlets like you, so I will just close the thread now.
Have fun writing "unit tests" you fucking retard.
I don't care anymore. Anyone who gets tricked into writing C++ by bullshitters like you fucking deserves it.

>just set a flag bro
>poll it every frame
>uhh why is atomic polling killing my performance, WHAT COULD BE HAPPENING TO ME?

Do you want to set up invariants in a constructor and neatly clean up in a destructor, or do you want to create init and clean functions, pass structs to every function and have to free char*s?
Tl;dr use c++

This. You can have a vector of Enemy objects that all perform some function, DoStuff, and specific enemies can all inherit from Enemy and each have their own override for DoStuff.

just so it's out there, you CAN write a game in C
github.com/Mark-Weston/platformer
github.com/Mark-Weston/libdragon

Attached: platformer.webm (1366x768, 2.3M)

If you want to use a game library, then cpp + sfml. If you want to build EVERYTHING from scratch, then C.

or, you know, SDL/Raylib/Allegro