[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Game dev thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 13
File: game-dev-venn.png (167 KB, 640x640) Image search: [Google]
game-dev-venn.png
167 KB, 640x640
I hear a lot of people claim C++ is the end-all-be-all to game dev, but plenty of other languages are used. Comments?
>>
>>43154977
C# ya dingus
>>
>>43154977
They're right.
>>
>>43154987
OP here, that's what I thought, but I still hear C++ for some reason that no one can explain.
>>
>>43154977
>gamedev intersection of masochism
Don't complain, at least things you make are fun.
Probably even socially gratifying when your friends find it fun.
>>
Sounds about right.
>>
>>43154977
C++ is a horrible language. Check out some of the other threads on /g/ and in the archive to find my posts about why it sucks so hard.

Oh well, at least it's not Java.
Just use C and save yourself a lot of hassle.
>>
>>43155124
It's because people need both objects in gamedev and low-level access (mainly to make things fast).
And not many things fit that description: C++, Objective C, and D.
Most do C++, but D is probably better.
>>
As someone intending to get into graphics and engine programming (I suspect these types are still and always will be virtually nonexistent in New Zealand, despite the gaming industry exploding), what programming language(s) should I learn?
Still C++?
>>
>>43155434
Yes
>>
>>43155398
COME DOWNSTAIRS DINNERS READY
>>
File: spongebob excited.gif (83 KB, 480x270) Image search: [Google]
spongebob excited.gif
83 KB, 480x270
Hay guys, what about Python?
>>
>>43155124
C++ is the industry standard for AAA titles that need maximum performance due to what the other anon said. These days it is used more because the industry is so invested in it than any other reason. Solo or small-teamed indie game developers are much more likely to use something like C#.
>>
>>43155518
Python is slower than my dick when I try to masturbate.
>>
>>43155474
I don't understand what you're trying to say.
>>
>>43155434
engine programming? you're gonna need more mathematics than any other language
>>
>>43155518
Yes, but anything above 2d will require the heavy parts in C.
>>
>>43155550
not surprising

it's past your bed time
>>
>>43155641
>someone on the Internet thinks that a certain language is horrible
>quick, I had better call him a child
>>
BYOND's HTML5 client is the future
>>
C# is for Unity faggots and nobody else. Real niggers make their own engine.
>>
>>43155361
It takes more time to make a game from scratch than it does any other software and for most games there is a 98% chance it will never even pay off.
>>
>>43155864
>make own game engine
>spend so much time game isnt done

we have a shitty engine though thank god
>>
>>43155883
>my job is the hardest
I don't agree.
>starving artist
try starving free software developer
>>
>>43155932
I didn't say it was the hardest, I said it was the most time consuming.
>>
>>43155534
how's that ED going for ya?
>>
>>43155951
It's relative to amount of features.
There are dead-simple games (like flappy bird), and there is uber-complex system software (like linux)
>>
>>43155534
Nothing's THAT fast.
>>
Lua?
>>
>>43155883
Lolno. Games aren't what takes the longest.
Try operating systems, malware, compilers, DEs, standard libraries, etc.
>>
>>43155789
Not him, but you have no idea why you think Cpp (or Java, for that matter) is horrible. You're just parroting what you think the /g/ hivemind wants to hear.
>>
>>43156214
Anyone mind spilling the beans on this secret while we're all hear?
>>
>>43156214
This
>>
>>43156207
>DEs
Good point, didn't think of that.
Needs all the skills that a single gamedev needs, but doesn't result in a game.
However, the result here is nicer to look at than other software (re: >>43155361
).
>>
File: 1379048009904.jpg (29 KB, 720x720) Image search: [Google]
1379048009904.jpg
29 KB, 720x720
>>43156233
>while we're all hear?
>we're all hear?
>hear?
>>
>>43154977
[qt]3.14 thong with blender.
>>
>>43156258
> He's not hear
> 2014
> Not being hear
>>
File: 1379058320065.png (228 KB, 704x396) Image search: [Google]
1379058320065.png
228 KB, 704x396
>>43156271
I can't here a fucking thing you're saying right now...
>>
>>43156277
Ear, ear, it's okay
It wasn't anything important anyway.
>>
>>43156295
It's not? I thought some faggot was going to try to explain why he hated C++ and Java?

If you say it's not important, though...
>>
>>43156311
I think he gave up, he's not in hear anymore.
>>
>>43156327
Now, here hear young man.
>>
>>43156327
It's just as well, I didn't want to here any of his little kid bullshit anyway.
>>
C++ is the best for now, you have both performance, and object-oriented.
>>
>>43156339
>>43156344
I'm confused ear, who's who ?
>>
>>43156311
OP here, I would like to know.
>>
>>43156258
chinese cartoons arent you one heck of an intellectual
>>
>>43156418
Don't you mean...
>OP ear?
>>
>>43155398
>Thinks Java is horrible and worse than C++
>Proceeds to say C is the best language ever
This is how you identify a technology poser. Any developer with half a brain knows the only truly horrible language is JavaScript.
>>
>>43156444
Yeah, but horrible language aside, Android might take over as the number one (consumer) OS if Windows doesn't step up its game, so Java might become good to know regardless of how horrible it is.
>>
>>43156419
prejudices arent you one heck of an intellectual
>>
>>43155883
Unless you are trying to make a generic game engine with as few hardcoded things as possible, then no, they can be quite fast to develop specially if it's a small indie game.
>>
>>43156365
I'm just chiming in, I'm >>43156250.
As for C++, it sucks: It's unsafe, its syntax is bloated and has too many features.
It's old news, it's just that it is established due to C.
And while I like C (at least it knows its place), it too is all the more archaic, and the reason we're still dealing with it is actually that it's build in POSIX.
And while I use POSIX, it too is all the evenmore archaic.
And the reason why we still suffer it? Legacy, and programming operating systems is hard.
We have no cross-platform driver interface, it's just too much work.
Plus, even a brave enough team would risk developing another lisp machine that noone would use.
And how to monetize it? That's even harder.
>>
>>43156465
Java isn't even that horrible if you don't depend on badly designed API. I agree a good portion of the standard library is cryptic as fuck, but actually the Java syntax is one of the nicest I have ever seen, even better than C's.
>>
>>43156489
>has too many features
It hasn't.
C# has the roughly the same amount. It's just that, unlike in C++ they fit nicely together.
>>
>>43156444
This man has seen some shit
>>
>>43156760
More specifically, JavaScript
>>
>>43156854
I wonder if we all just started calling JavaScript JavaShit everywhere if ECMAScript comittee and browser makers would react?
Try to peer pressure them into it: JavaShit considered harmful.
Lobby for a low-level code, and against asm.javashit.
PLEASE RID ME OF JAVASHIT!
>>
>>43156854
http://i.4cdn.org/g/1406061934932.jpg
>>
>>43156910
>JavaScript is declared deprecated by the WWWC
>New scripting language with a nazi standard and a small standard library gets developed
>It's statically typed and actually OOP
I would masturbate so hard in that case.
>>
>>43156963
You should rather go to confession, masturbation is clouding your understanding:
There should be no language, there should only be bytecode.
Then you could write in whatever language you want.
>>
>>43157037
But that would make the web closed source, anon. It's still a good idea though, as it could make web programming very flexible and probably much faster.
>>
>>43157089
It's still non-free now, it's just that you can see its source.
This way that's just going to be more apparent.
Who knows, maybe it turns out for the better, because right now, people have a hard time empathizing with rms when he says non-free JS is bad.
But yeah, user scripts would suffer on small sites. As for the big ones, APIs are a standard nowadays.
It's not ideal, but it's probably necessary to get rid of JS
>>
>>43157166
>It's still non-free now, it's just that you can see its source.
I know, but you can still study it for personal use. You might not be able to use it, but you could learn a thing or two.

>But yeah, user scripts would suffer on small sites.
Maybe functions and variables could be named as strings in the bytecode (I think Java does that, when decompiling stuff it restores original method and field names, so they might be defined somewhere, like a header file or something) to allow easy access to them. You would still have to figure out what does said function do and replace it entirely, though.
>but it's probably necessary to get rid of JS
Completely agree. I would prefer to see a good and secure bytecode implementation with strict security policies than a shittily implemented scripting language.
>>
>>43157313
consider the following:
LLVM IR as web bytecode format
webkit already uses LLVM as a jit format
for legacy browsers emscripten exists
there is already a good stable of languages that compile to LLVM
>>
>>43157364
[Furious masturbation intensifies]
>>
>>43156611
After a while I've come to appreciate the features that C++ uses, though I admit that if used wrong (and in a project with lots of contributors or workers, it WILL be used wrong), you a potential clusterfuck of a design.

PPSSPP succeeded with its emulator though, and its in C++ (for the most part). Why all the hate?
>>
hurr hurr blender game render
>>
>>43157906
hurr hurr gpl and undocumented shit
>>
>>43155518
See: Mount and Blade.
>>
>>43155518
look up PyGame
>>
>>43156203
Löve uses Lua.
>>
>>43155525
>C++ is the industry standard for AAA titles that need maximum performance due to what the other anon said. These days it is used more because the industry is so invested in it than any other reason. Solo or small-teamed indie game developers are much more likely to use something like C#.

Why would small teams be more inclined to use C#?

What about Bombermine.com, which is Bomberman in HTML5 iirc? =X
>>
>>43160675
>Why would small teams be more inclined to use C#?
Easier to use and still fast enough.
>>
>>43154977
>C++ is the end-all-be-all to game de
Sort of. Game ENGINES are mostly written in C++, but the actual content is almost always scripted, usually with Lua.
>>
C++ is deprecated in favor of D, even Carmack speaks highly of D and uses C++ only because he can't transition all his tooling and all the other devs. If you're starting from the bottom then have the decency of giving your game the D.
>>
>>43160725
>Carmack
deprecated
>>
>>43160752
Why? Because AMD drivers were shit when Rage wad released?

We're talking about the guy who single handedly removed the latency killing VR with his time warp
>>
>>43160781
>time warp
that was Dr Frank'n'furter.
>>
>>43156444
>there is only one horrible language
>>
>>43156214
>>43156242
How do you know that?
I have my reasons for disliking C++ and Java.

Why do you lie on the Internet?
>>
>>43160857
Because most everytime someone posts something like this >>43155398 it always turns out that they either never managed to learn the language / were told it was bad by people who'se opinion they happen to value / don't understand the design decisions of the languages.
It works everytime, they always end being proven wrong or silly and up moving the goalpost until it's just shitposting in arguments.

You're statistically wrong.
>>
>>43160889
>they always end being proven wrong or silly
>You're statistically wrong.
Not him but this made me laugh
>>
>>43156214
>You're just parroting what you think the /g/ hivemind wants to hear.
Rather, it seems that it's not what the hivemind wants to hear. Around a year ago, /g/ didn't have any of these C++ fuckers, and it seemed everyone liked C.
Now (especially during this summer; coincidence?) there are lots of C++ people.
I hate C++, and I hope to stop new programmers from using it and to stop people interested in it from exploring it.
My reasons are:
>It's a huge language
>It takes a very long time to learn, and even seasoned C++ programmers admit they don't know the whole language
>It's incresingly used by people who only know Java or the C++ paradigms, and nothing of the original object oriented design or how to use function pointers/structs in C
>Java-style object oriented language, which has no real productivity gains, and rather just encourages bad layout in code
>The namespaces are a horrible mess and tricky to deal with
>RAII
>With each release they add more features instead of simplifying what's already there - developers are forced to put up with these new additions
>It was designed for one purpose, and now it's being used for a purpose it wasn't intended for; the original purpose (superset of C) isn't 100% true either.
>Existing compilers are slow and inefficient
>The grammar isn't entirely context-free
>only choices for libs is shit like Boost
>Taught as an introductory language just because it's popular - it's one of the hardest languages in current use today.
>Designed and maintained by a committee, not anyone trying to solve a real life problem
>There are contemporary alternatives like Go, or just C99.
>It teaches programmers to be lazy by giving them a language with everything in which only does half of what they want. Rather than learn how to write bespoke solutions, they use things such as Vector to solve problems in a "meh, it's good enough" way.
>>
>>43160996
>hating C++ for RAII
b8/10
>>
>>43161013
Please explain why you think so; what evidence is there that it's bait?
>>
>>43160996
I am trying to create my own C and C++ implemetation (compiler and standard library), I finished the C standard library in a few days and the C compiler took me about one week but I was not able to finish the C++ implemetation, there are so much stuff in there that makes it impossible for someone to implement it form the start. I would even had to change my parsing technique complitely to parse it effectively
>>
>>43161020
>makes it impossible for someone to implement it form the start
And yet gcc and clang exist.
>>
>>43160996
>Go
http://yager.io/programming/go.html
http://cowlark.com/2009-11-15-go/
https://blog.habets.se/2013/10/Why-Go-is-not-my-favourite-language
>>
>>43161020
>I finished the C standard library in a few days
post sauce
>>
SDL or SFML ?
>>
>>43161031
Go isn't as good as C, I know this.
It's better than C++ though.

If the only argument is "no generics", chances are that if you need generics and you can't think of a better way to design your program, you're not much of a programmer.

>>43161020
I am aware that C++ can be very difficult to implement. Godspeed.
>>
>>43161044
>chances are that if you need generics and you can't think of a better way to design your program, you're not much of a programmer.
top bait
>>
>>43160996
>C++
>object oriented language
le_trash.tiff
>>
File: StandardLibrariesSizesCPP.jpg (103 KB, 1710x860) Image search: [Google]
StandardLibrariesSizesCPP.jpg
103 KB, 1710x860
>>43160996
>summer
I really want to stop reading there, but I'll humor you

>I hate XXX
Why are you so strongly against it ? Did C++ kill your entire familly ?

>>It's a huge language
That's just your opinion, not an argument against the language. That's also objectively not true.
I don't like potatoes because they are round therefore potatoes are bad and everyone should stop eating them.
I don't like C++ because it's big therefore C++ bad and everyone should stop using it.

>>It takes a very long time to learn, and even seasoned C++ programmers admit they don't know the whole language
True for most "modern" languages. The grammar is easy to learn except for those couple of edge cases, but the libraries are huge.

>It's incresingly used by people who only know Java or the C++ paradigms, and nothing of the original object oriented design or how to use function pointers/structs in C
Hating a language because of it's userbase makes no sense to me. You have everything you could want from the userbase, a good compiler, a good doc, active participation. Why'd you care if beginners make mistakes ?

>Java-style object oriented language, which has no real productivity gains, and rather just encourages bad layout in code
Opinions. In my experience, it's the contrary. C++ gives you freedom and is multiparadigm, your job to write good code with that freedom.

>The namespaces are a horrible mess and tricky to deal with
Opinion. The namespaces are easy to use and practical if not abused.

>RAII
Opinion. Widely seen as a wonderful thing and strong argument for using C++

And I'll just stop there because of char limit and tiredness.
>>
>>43161044
Instead of working around language failures like lack of generics, I prefer to use better languages.

>It's better than C++ though
Nah.
>>
>>43161057
>C++ gives you freedom
Does it respect my four freedoms though?
>>
>>43161038
Let me polish it and I will post it on the DPT in a few days

>>43161029
and?
>>
>>43161067
Yes. The GANOO COMPLER COLLICTION guys made sure of that.
>>
>>43161057
>The grammar is easy to learn
Not true for C++
>>
>>43161046
>le bait maymay
I'm not going to assume that you don't have an argument, but if you do, why didn't you post it?
Why did you say "top bait" instead of countering the point?

>>43161051
This is what I was trying to say. There is no better way for me to phrase it than "modern object oriented".

>>43161057
Not just my opinion, it really is a large language in comparison to its contemporaries.

>long time to learn
Go, Python or C doesn't take nearly as long to learn as C++.

>good doc
I disagree. The compilers aren't good, either. Beginners will be the ones writing the C++ code of the future, so it's important for how they learn if I will want to use the libraries they have written.
I also don't think it's morally correct to teach people C++.

>namespaces
They are abused frequently, though. The :: is also horrible.

>>43161059
I guess it's my opinion against yours. "Better" doesn't mean anything. Go is small, and helps bridge the gap between interpreted languages and systems programming languages. This is the reason why I like it. It's less complex than C++ and one can use pointers without worrying about GC. Those are my reasons. It's just opinion.
>>
>>43161100
>I also don't think it's morally correct to teach people C++.
SJW plz go
>>
>>43161119
Only SJW use C++ in the first place, teaching people to be SJW is not morally correct
>>
>>43161119
>thinks that something is morally wrong
>therefore SJW
It's funny because I disagree so much with the SJW shit.
I'm anything but a SJW, and "social justice" is subjective. I don't try to push my morals on other people. Fuck SJWs.
>>
>>43161127
Only SJW make posts like this. Not killing yourself is not morally correct.
>>
>>43161100
>he thinks C++ is an OO language
laughinggirls.jpg
>>
>>43161147
I don't know what to call it then; do you have a better name?
I know it's not OO by the original sense of the word.
>>
>>43161135
Nice bate
>>
>>43161168
u2
>>
>>43161158
Nigger oriended
>>
>>43161158
>Multi-paradigm:[1] procedural, functional, object-oriented, generic
>>
>>43161172
ur mom
>>
>not using C/C++
enjoy your 20 fps
>>
>>43161187
I only consider "object oriented" as what Alan Kay defined it to be. If I'm correct, he invented the term and [one of] the first object oriented languages, Smalltalk.
C++ is not oriented around objects.
>>
>>43161187
Nice! You know how to use the wikipedia
>>
>>43161205
>C/C++
>Error: language not found
>>
>>43161205
>implying 20fps isn't plenty for my solitaire game
>tfw no qt pi gf to play poker with
>>
>>43161205
Objectively the two best programming languages.
>>
>>43161262
>C++
>Best
>Even good
>>
>>43161262
>objectively
>best
objectively a contradiction in terms
>>
>>43161100
>I guess it's my opinion against yours.
It's not an opinion that Go lacks generics.
>Go is small
So is lisp and assembly. Small doesn't mean anything when the language is shit. Small does not mean simple.
>systems programming languages
Go fails at this too.
>can use pointers without worrying about GC
Except interior pointers rape the GC and null pointers rape the type system.
>>
>>43161297
>and assembly
Not x86 assembly, that shit is bloated
Use a real RISC instead
>>
>>43161297
>opinion
I was referring to how you said "Nah" to Go being better than C++. This really is just an opinion.

>small
Lisp is a good language. Too small isn't good. In my opinion, assembly languages are too minimal for one to use to do practical things. Go and C are not.

>systems programming
It doesn't fail, it's just not the best. Use C.

>Interior pointers
I didn't know this; I guess you're right. I don't have the time right now to read into it.
>>
>>43161294
no way?
>>
About to start working on my own game/engine/dicking around project.
Think I'm gonna roll with C++, OGRE and Bullet.
Anything else?
>>
>>43161343
>Too small isn't good
Small is bad metric for judging a language. Small doesn't mean simple or better. Lisp is smaller than C and Go but good. Assembly and C are smaller than Go but they're all shit.
>it doesn't fail, it's just not the best. Use C.
It's worse than Real Time Java at systems programming. Go is only a "systems" programming language by Rob Pike's retarded definition that includes application software. C is another pile of garbage made by the same group of people, by no coincidence.

I have to give the Go team some credit, it takes some ingenuity to create a language as bad as C. C and Go are manifestations of atavism in the programming world. C and Go fanboys are dullards who worship regression and have brain damaged notions of what "simplicity" means.
>>
File: bait-bigger.png (17 KB, 625x626) Image search: [Google]
bait-bigger.png
17 KB, 625x626
>>43161590
>>
>>43161590
I second >>43161610
>>
>>43161653
It'll take a while to sink in. One day you'll realize C and Go are shit and stop associating "small" with simple.
>>
>>43161673
>implying i ever said small == simple
>implying you're a faggot
>>
>>43154977
Well if you're making little games then sure, you could use pretty much any language. But if you want to make modern, high performance games, then C++ is the only option.
>>
>>43155518
I want muh game to run, not to walk.
>>
>>43161698
So have you implemented them in Python and they were too slow?
>>
>>43161697
>modern, high performance games
Buzzwords
>>
>>43161716
>If I say "buzzwords" I get to stick my head in the sand and ignore the truth

I hate C elitists as much as the next guy, but you're dumb as fuck if you think you're going to get better memory management anywhere else. Let me know when they port a high performance game to Java or Python and I'll eat my hat.
>>
>>43161745
>http://en.wikipedia.org/wiki/Jake2
>Jake2 is a Java port of the GPL release of the Quake II game engine
Bon appetit.
>>
>>43161692
He did not imply it but he is
>>
>>43161785
>Quake II
>high performance
>in 2014

Wow okay, so your head is still stuck in the 90s?
>>
>>43160705
This is pretty much the best way to do any king of modern dev.

Performance code in C/C++
Glue/scripting in Lua/Python/Ruby/etc.
>>
>>43161745
There are lots of languages with manual memory management
>>
>>43161785
Java: Now fast enough to run a game from 1998!
>>
>>43154977

The latest consoles are powerful enough to handle medium intensity indie games written in Java, Python and C#.

C++ will still continue to be used for high performance game engine components.
>>
>>43161785
>implying modern
>implying high performance
it's neither. old graphics, old gameplay, frame rate drops during explosions.
>>
>>43156444

Confirmed for seasoned veteran. Every symbol typed in JavaScript is another slap in the face for me.
>>
>>43160675
C# is simpler, you don't have to worry about low level stuff, also runs with unity. Seriously, if you learn the languages you will understand why big games need C++ and small games are great for C#
>>
>>43161810
>>43161899
>>43161937
all dat damage control
>>
>>43161590
Are you seriously telling me that C isn't a simple language?
Smaller languages are generally simpler. Nobody said "small therefore simple" or "simple therefore small". It's just a rule of thumb.
C and Go work with that rule.
Please learn before you shitpost on imageboards.

Why do you think C is a pile of garbage? What do you think should be used instead for the same task? Please don't humor me by saying C++.

I think C was a good language for its time and it's a good language for our time.
Fuck off with your python javascript bro bullshit.
>>
>>43162197
u mad?
>>
It's getting tiring for me to constantly remind everyone that the language and tools used in any project are absolutely arbitrary.

The only thing that matters is cost. If a cost benefit analysis came to the conclusion that NVIDIA's next high performance lighting engine would be cheaper to write in VBA they'd be hiring VBA dev's the next day.
>>
File: girls_laughing.jpg (43 KB, 600x363) Image search: [Google]
girls_laughing.jpg
43 KB, 600x363
>>43162197
>I think C was a good language for its time and it's a good language for our time.
>>
>>43162197
>it's a good language for our time
Daily reminder that C is the language of Heartbleed.
>>
>>43162289
>absolutely arbitrary
>The only thing that matters is cost
So what is it? Arbitrary or guided by costs?
>>
>>43162290
>le laughing girls means that you're wrong!

>>43162320
Bad programming is also the language of Heartbleed. What's your point?

>>43162208
I don't even get mad anymore. I've realized that I'm on the Internet, and the things I say don't really have an affect. I'm just your next Anon. If I fuck up then I can just continue posting.
There's no reason to be mad about programming languages, of all things. Who fucking cares? It's shit you type into a computer.
>>
>>43162351
>bad programming is also the language
Please ignore this, I meant to say:
>bad programming is also a cause
>>
>>43162330

The language and tools are guided by cost analysis. In this way they are arbitrary.

The reason why C++ is so enduring in game development is because large studios will have tens of gigabytes of libraries and frameworks accumulated over years. Moving all of these libraries to other languages would be extremely expensive.
>>
>>43162374
Such a shame C++ was the language which made it.
>>
>>43162351
Would Heartbleed exist in a language with bounds checking by default?
>>
Just use whatever has sdl binding.
>>
>>43162394

Its a bigger shame that JavaScript made it.
>>
>>43162374
>large studios will have tens of gigabytes of libraries and frameworks
not really
>>
>>43162435

There's this really cool thing called programming that you should try sometime if you want to contribute to conversations on /g/.
>>
>>43162401
openssl wouldn't exist at all because forced bounds checking would be to slow.
>>
>>43162401
This has to do with the implemetation having automatical bounds checking or not
Some implemetations have this
>>
>>43162480
Only it wouldn't.
>>
>>43162496
Only it would.
>>
>>43162480
Do you have benchmarks to back up your claim?
>>
>>43162401
I don't know about the specifics of the bug. You are probably right.
Most features of any language, if used in a certain way, can be considered "bugs". Bounds checking isn't in C, and it was a mistake that people didn't check the code properly.

This doesn't really say anything about C, just about people not being as careful as they should be with a language which doesn't have bounds checking.

>>43162434
I would rather have nothing instead of Javascript in browsers. In my opinion it's a stupid idea to have a function where you execute some unknown code (that is, it's downloaded and run by default for the great majority of people) inside a web browser.
Pages would be much snappier and responsive without Javascript, too - simply because the programmers of such websites have no way to put in something which slows the browser down (Javascript/some scripting language).
I heard people are trying to bring other languages which run on top of JS onto the web. Now that's a shame.
>>
>>43162520
I have my ass if that's what you want.
>>
>>43162558
Then your opinion is as good as useless. You must have pulled it out of your ass like your post suggests.
>>
>>43162545

The web needs an entirely new language to replace HTML, CSS and JavaScript.

They were never fit for purpose and never will be.
>>
>>43162520
Try it yourself.
>>
>>43162585
This is why I'm making an alternative to the web. I posted extensively about it in a thread yesterday and a few days ago I made a thread about it. You may be interested, or not. I don't know.
The thread from yesterday: https://rbt.asia/g/thread/S43140501#p43141954

My thread from a few days ago: https://rbt.asia/g/thread/S43087314 (this is also linked to in the above thread)

I'm on holiday right now so not much work is being done at the moment. I may create a /g/ thread in the future.
>>
>>43155911
People make engines because it is fun.
Just like how other people make video games because its fun to.
Deal with it.
>>
File: obligatory.png (24 KB, 500x283) Image search: [Google]
obligatory.png
24 KB, 500x283
>>43162669
>>
>>43162545
It says a lot about C. It says C doesn't have do bounds checking on arrays, which says it's inherently less secure than a language that does bounds checking. Being more careful is not a solution. People are careful and still make mistakes because no one is perfect. It only takes one mistake to create a security hole. The only reliable solution is to guarantee bounds checking at the language level.
>>
>>43162669
Why aren't you on the irc faggot?
>>
>>43154977
>but plenty of other languages are used. Comments?

in the basement.
>>
>>43161042
SDL2.
SFML is C++ garbage.
>>
>>43162682
Actually, the whole point is that it doesn't replace the web. If it did, or if it attracted the same kind of people, I would consider it a failure and leave it to its own devices.
Thankfully I'm a pessimist and I'm sure it won't become popular at all.

>>43162707
Which IRC? I'd go there if I knew where.
>>
>>43162669

You don't need a HTTP replacement, you need a GNU version of Dart that comes as an easily implemented module and compiles to asm.js
>>
>>43162669
holiday where?
>>
>>43162755
Japan.
>>
>>43162750
>You don't need a HTTP replacement
But http sucks, so why not replace it?
>>
>>43161489
Don't forget OpenG..
>OGRE
Why.
>>
>>43162762
check your email
>>
>>43162766

As much as I would like to see one, it would take decades for it to become popular.
>>
>>43162766
I had exactly the same thought.
There's also no obligation to stick with HTTP for a web replacement, so it's fun to experiment and maybe think of some better ideas; even if HTTP isn't bad.

>>43162781
This is the first time I'm posting my email on 4chan. Please send.

>>43162787
Doing things for fun doesn't require what you're doing to become popular, just that you and some others can enjoy it.
>>
>>43162766
Just use SPDY. It's made by Google, so it's guaranteed to be ad-free.
>>
>>43162829
Original HTTP (aka 0.9) isn't bad at all.
$ nc foo.bar 80
GET optional.domain.tld/address
... reply goes here ...
connection terminated

Very simple interface for fetching documents from a server. And the specification fits neatly on a sheet of paper.
http://www.w3.org/Protocols/HTTP/AsImplemented.html
>>
Is opengl C++ only, or can I use it to make a simple 2d C graphics engine
>>
>>43162787
This is true, we must find a way to make it popular

>>43162940
Seems better than the current http actually, but it could be better imo
>>
>>43162940
I like this; I'll check it out.
Thanks. If you're interested of what comes of this "project", check /g/ over the next few weeks. If you're not, ignore me please.
>>
>>43162977
OpenGL is a language-agnostic API

>inb4 tips fedora because agnostic
>>
>>43162977
OpenGL is specified in terms of C functions.

>>43163011
It really isn't.
>>
>>43163011
>OpenGL is a language-agnostic API
That's why the specification is in C, right?
>>
>>43162829
I send you a email
>>
>>43162991
I have no idea what project this is. I just saw HTTP and thought I'd take us all back to a time when the protocol made sense.
>>
>>43163046
>That's why the specification is in C, right?
But it isn't?
>>
>>43163049
Sorry, the "project" I'm thinking about is an alternative to the web, which may or may not be on the HTTP protocol. This is what I was debating with myself and a few others in past /g/ threads.
I hate what the web has become, and I don't think there's much of a solution other than closing one's gates on the web (which is a big barrier for entry, and sacrifices anonymity) or starting afresh, which is what I'm trying to do in the hope that it doesn't become popular.
Sorry for the confusion, anon.
>>
>>43162774
Because it was recommended to me (by the lead programmer of Ronimo among others) to get an idea for engine architecture design. Best way to learn is to try a few existing ones out and he really liked OGRE. They made The Blob with it.
And I imagine it would be nice to have some structure in place already and build around that, instead of having to design everything from the ground up.

But yeah, otherwise I'd just go with OpenGL.
>>
>>43163057
Here.

http://www.opengl.org/registry/doc/glspec44.core.pdf
>>
>>43163073
>lead programmer recommends own engine
D'uh. Ogre3D has a really mediocre design because of an over-reliance on singletons.
>>
>>43163060
Maybe you'd be interested in the 9p protocol. Not for the "web" but as a study of how to write a simple protocol to get one thing done well.
>Description: http://man.cat-v.org/plan_9/5/intro
>Implementation: http://plan9.bell-labs.com/sources/plan9/sys/src/lib9p/
It really does put modern protocols into perspective
>>
>>43163086
It merely uses C syntax.
>>
>>43163102
That's what it means for spec to be in C.
>>
>>43163123
Oh. The API is still language-agnostic though.
>>
>>43163129
It's not. It just is not. If you want to implement OpenGL in java, what package name do you use according to spec?
>>
>>43154977
>math = computer science (low level)
>masochism = time (not that much)
>art = visual effects (shitty ones)
>>
>>43163089
Well what's a good graphics engine then?
I highly doubt I would be able to come up with anything better myself.
>>
>>43163147
That's the same question as to how function names are mangled in C: Not part of the OpenGL Spec, but of the specific implementation.
>>
>>43160996
>c99
>not gnu11
>>
>>43163186
OpenGL spec has everything you need to unambiguously implement it in C, and none for other languages. It's not language agnostic.
>>
>>43163194
>>c99
Not a context-free grammer either.
>>
>>43163194
>GNU
harmful
>>
>>43163194
gcc-4.9 -fdiagnostics-color=always -g -gdwarf-4 -Og -Wall -Wextra --std=c11 -Wpedantic -Wno-unused-parameter -fno-diagnostics-show-caret -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer -Wno-unused-function -fcilkplus -pthread -lpthread -D_XOPEN_SOURCE=700
>>
>>43163234
>-fsanitize=undefined -fsanitize=address
good man/woman/kid
>>
>>43163249
Is this bad?
>>
>>43163258
On the contrary, it's very good as it provides a detection mechanism for bugs that easily happen in C/C++. And contrary to using valgrind it doesn't slow your game down to a crawl.
>>
File: 1405067506766.jpg (7 KB, 200x200) Image search: [Google]
1405067506766.jpg
7 KB, 200x200
>Seeing logically sound recommendations
>shitposters
>trolls
>shills
This thread is the daily dose of /g/ second only to the one with OP and his autistic kid
>>
>>43163286
Clang wiki says typical slowdown is 2x, so it's not quite useful in production.
>>
>>43155525
>AAA titles
>maximum performance
>>
>>43156444
Whats wrong with javascript?
>>
Lua + Löve
>>
what language do those super meat boy indie developers use?

those games always seem to run well
>>
>>43163595
Originally Flash, then C++
>>
>>43163595
>makes an observation about a game running well
>therefore it must be the language
You can get the type of performance with that sort of game even with Lua or some shit.
For something more advanced you'll want C, or if you're retarded C++.
>>
>>43163488
>>43163286

(noob question, feel free to insult my lack of real knowledge) but isn't is possible to debug using those tools and run the debug version on a really beefed computer (to compensate the slowdown) and then strip these tools from the final version ?
>>
>>43163644
>you'll want C, or if you're retarded C++
b8/10
>>
>>43163658
Of course it is. Just compile your final version without those switches. It's what I do actually.
>>
File: bait.png (67 KB, 623x624) Image search: [Google]
bait.png
67 KB, 623x624
>>43163663
>>
>>43163672

Ok. And wouldn't using stuff like smart pointers actually lessens the problem of memory leaks ?

Or building a homebrew garbage collector to get rid of the hardest leaks ?
>>
>>43163734
>And wouldn't using stuff like smart pointers actually lessens the problem of memory leaks ?
It would. But it's not only about memory leaks but also buffer overflows and other undefined behavior-
>>
File: 1405137288592.jpg (28 KB, 358x239) Image search: [Google]
1405137288592.jpg
28 KB, 358x239
>>43163734
mfw fresh Java devs going into c++ don't even know about gc
>>
>>43163766
Didn't think of that.

>>43163771
What ?

Second year of CS here... not really an expert yet. Never worked on large projects.
>>
File: muh wonky DEVIL textures.png (415 KB, 1600x790) Image search: [Google]
muh wonky DEVIL textures.png
415 KB, 1600x790
>>43154977
>tfw want make graphics engine in C++
>last Hurdles
>textures aren't loading correctly because fucking DEVIL
>iluGLloadimage function works perfectly fine
>it only works for square textures and formats the rest fucking up the UVs
>make function
...#Loading func...
glActiveTexture(GL_TEXTURE0);
ILuint imageID;
ilGenImages(1, &imageID);
ilBindImage(imageID);
ILboolean isload=ilLoadImage((char *)nPath.c_str());
if (isload)printf("\nItloaded\n\n"); else{ printf("\n\nNOOOOOOOOOOOO\n\n"); }
ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
GLuint textureID;
glGenTextures(1, &textureID);
glBindTexture(GL_TEXTURE_2D, textureID);
glTexImage2D(GL_TEXTURE_2D, 0, ilGetInteger(IL_IMAGE_BPP), ilGetInteger(IL_IMAGE_WIDTH), ilGetInteger(IL_IMAGE_HEIGHT), 0, ilGetInteger(IL_IMAGE_FORMAT), GL_UNSIGNED_BYTE, ilGetData());

...temptexindex[0] = textureID;

....temptexesindex.push_back(temptexindex);


>you will never properly texture your waifu
>>
>>43163852
No AA/10, but looking good.
glhf
>>
>>43160996
I learned C++ over the summer, shit isn't hard.
Once you get used to the syntax its fucking butter.
>>
>>43163852
>C++
there's your problem
>>
>>43163999
When did /g/ stop liking C++?
What is the better alternative?
>inb4 someone recommends the next letter with only 5 libraries
>>
>>43163852

What the fuck is "il"?

Some wrapper around GL?
>>
http://benchmarksgame.alioth.debian.org/u32/benchmark.php?test=nbody&lang=all&data=u32

>everyone hating on C++
I'll just leave this over here
>i wonder what language would best be used to create a vast number of objects in a dynamic environment

Unless you want to create a game in Fortran.
>>
>>43164034
/g/ never liked C++. The hivemind seems to have intensified though. Probably because Uriel killed himself and the weekly catv spam.
>>
>>43164034
>When did /g/ stop liking C++?
/g/ never liked C++

>What is the better alternative?
C

>>43163996
Yet you don't know C++
>>
>>43164034
/g/ never liked C++ because it is complex and requires care and skill to use properly, as well as longer term discipline to keep those skills sharp.

/g/ creams over C# and obscure things they know they'll never learn but won't be shamed for not learning because nobody else knows them either.
>>
>>43164070
Its an image loading library that is deprecated, not that there is much else to be developed.
It has wrapper functions that pretty much load the image into a texture completely in a header called "ilut.h" although the texture has to be 128x128 512x512 anything^2 or it will warp it.
Or you can construct your own, which I'm attempting to do correctly


>>43164155
>>43164158
I thought the new thing was D?
>>
>>43164155
I like this guy.

>>43164116
You cherrypicked a benchmark in which C++ would look good over C or similar languages. By your logic, we should use Fortran to write games.
>>
>>43161031
You just got beat by your own link
>So Go is not my favourite language. It comes in second after C++. And for many if not most projects I prefer to use Go.
>>
>>43164180
D and Rust are horrible.
Erland and C are nice.
Go isn't really suited for games, but meh.
Scheme is fun to make text-based adventure games in.
C++ is complex and full of features, most of which one doesn't need. Each release adds more features which more people don't need.

This is my personal experience.
If there was "C++ lite", I'd use it - but I guess that's C and I already use it. C++ is too complex and enterprise-y for my tastes, although you may like it (why, though, is beyond my feeble mind).
>>
>>43164180
Right, C# is just the ultra lazy tier introductory language (that isn't python or ruby cause those are for faggots). D is one of those obscure things that nobody will call them on.

Why should D exist when C++ exists? Of course the language only goes as fast as you allow it to, so benchmarks don't always apply anyway. It's really really easy to slow your programs down to shit when you're fumbling about like a tard.
>>
>>43164182
>I enjoy coding C++ more
>>
>>43164202
Why should C++ exist when C exists?
>implying one can help fumbling like a tard when using C++
>>
>>43164213
>but I won't ever use it for my projects
glad he doesn't enjoy C++ to the point of delusion!
>>
>>43164201
>D and Rust are horrible.
Why? And how is C nicer?
>>
>>43164216
But C++ is a variant of C! To get the additions of C++, one simply has to create C++ from C.

To be fair, C++11 is fucking amazing. If you could just.... forget the last 30 years ever happened and just learn C++11... everything would be fine.
>>
>>43160996
I'll bite, since nobody else has (completely).

>huge language
Good.
>long time to learn
First 2 years at uni.
>increasingly used by people [who are terrible programmers]
This is true for literally every language, especially C.
>Java-style
This could not be further from the truth. Java and C++ are completely different.
>namespaces are a horrible mess
Only if used incorrectly.
>RAII
You prefer memset() and resource leaks?
>add more features instead of simplifying
The new features are what allows the language to become simpler.
>designed for one purpose
The purpose was to bring high-level features into C without affecting the low-level features.
>compilers are slow and inefficient
On my system, my last-year-top-tier SSD drive is the bottleneck of compilation. My game engine (100+ files, heavily templated) takes 8 seconds to compile from the SSD, 5 seconds from ramdisk, 2 of which are from linking (which is basically the same in C and C++).
>isn't entirely context-free
What? Neither is C. Not that it matters anyway.
>shit like Boost
False; I've gotten away with never using Boost. There are many alternatives.
>introductory language just because it's popular
No, the reason is because it's multi-paradigm. There exists no programming technique that cannot be taught in C++.
>maintained by a committee, not anyone trying to solve a real life problem
Many people involved are real-world professionals who volunteer their time to develop C++, because they use it in their profession to solve real problems.
>alternatives like Go
Don't make me laugh. At least you could have said D or Rust.
>teaches programmers to be lazy
Why would I waste my time implementing a data structure when there's one available in the standard library that does what I want?
Also what the fuck is wrong with vector? It's just a freaking heap array, how would it even be done differently? (inb4 linked lists are better)
>>
Anybody here knows why SDL is slow as shit for rendering?
I have framerate issue while displaying a simple tilemap with background and foreground.
Should I go for opengl?
Thread replies: 255
Thread images: 13

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.