Earlier quoted context omitted.
I did, it is so abstract to pretend you can do better that there is no way to discern. He didn't even mention "unity" in his post, thats just ridiculous in 2016, but yeah, keep down voting, your implementation of 2d graphics, sound, collision, physics, plugins, marketing, sprites, menus is gonna be so much better than hundreds of engineers at unity withing 10 years straight.
Try and implement http://jonathanwhiting.com/games/knossu/ with Unity. My guess is, the author would have taken more time learning Unity than implementing this game.
Why I Write Games in C
271–280 of 303 posts
Re: Why I Write Games in C
#272Earlier quoted context omitted.
Not really. I don't know what you're objecting to. The trend worldwide is away from console platforms. Look at the shift happening in the Canadian video game industry: http://mobilesyrup.com/2015/11/22/mobile-game-revenue-will-s... http://theesa.ca/wp-content/uploads/2015/11/ESAC_2015_Bookle... Console game revenues down by 32% since 2013, mobile game revenues up by 20%. Mobile games on trend to overtake console game…
The trend in the current generation is strongest so far (at least for Sony) http://www.ign.com/articles/2014/11/14/playstation-4-continu... and even for MS it's pretty good from what I remember. I am guessing all the analysts making these predictions are looking at Nintendo, which had been in decline since 1990s and only caught one lucky break with Wii. It's being back to its normal state will look like a declining t…
Re: Why I Write Games in C
#273Earlier quoted context omitted.
When I first learned to program, I made some nice little fun apps, compiled them to executables, ran them, and sat back. But something wasn't right. I knew that the code I wrote was doing something, and I knew that it was doing what I told it, but I didn't know why. What is in this binary executable that makes the computer print "hello world"? I started digging. I found assembly. I found disassembly. I got into crack…
> What if you need to do something Unity isn't capable of? Where does that leave you? I'm not trying to be glib, and I know that's not the answer you're looking for but it would leave them switching to Unreal or any other engine most likely, not going "down" the complexity scale.
Re: Why I Write Games in C
#274Earlier quoted context omitted.
> And this does not mean that the compiler is preventing unsafety; there are many safe programs that the compiler rejects. Two nits: 1. The compiler does prevent safety problems. It just happens to rule out some safe programs while doing so. (Although I think this is a bit of a misconception, because with the aliasing rules being used for optimization many things that the Rust compiler rejects that people think are s…
I think game programmers don't like type systems -- or rather, they prefer the minimal typing necessary for speed improvements and their ability to simplify basic static analysis (with tools or in their heads). I don't blame them, games are a lot of work even for relatively simple things, and to get anything done at a reasonable pace you just need to be able to churn out lots of code that compiles on the first try, a…
In general, I think memory safety and data race freedom speed you up other than for small throwaway programs, because memory issues are so awful to debug (even with things like Valgrind).
Re: Why I Write Games in C
#275The language wars get exhausting. Several years ago Ruby was the coolest thing ever, now I guess people think it's just boring. Also, PHP got really unpopular and all you heard about was how it would kill your dog and sacrifice it to satan. Now days it's still cool to look down on those who use it, but you shouldn't talk about it. Don't know know all "real" devs program in Python? Go was short lived, a year or two ag…
Re: Why I Write Games in C
#276>Even more than that I care about the speed of the compiler. I am not a zen master of focus, and waiting 10+ seconds is wasteful, yes, but more importantly it breaks my flow. I flick over to Twitter and suddenly 5+ minutes are gone. Quick suggestion, has really helped me: take that 10 or 20 seconds waiting for compilation, and stare out a window. This gives your eyes much needed break from focusing on a computer moni…
10 or 20 seconds waiting for compilation .. but more importantly it breaks my flow Luckliy the OP doesn't build for microprocessors etc. There you wait for compilation (of C, for instance) but than the damn thing has yet to be flashed.. Thing is, it actually learns you how to not let it break your flow. Which is a valuable skill.
Re: Why I Write Games in C
#277"C# ... does a lot to railroad a programmer into a strongly OOP style that I am opposed to". C# has functional capabilities as well. People write in it nowadays in a whole lot of different styles, including procedural, OO, functional, reactive. Yes, the average developer uses it in an OO style, but it can do a lot more.
> I've spent most of my professional life working with classes and objects, but the more time I spend, the less I understand why you'd want to combine code and data so rigidly. I want to handle data as data and write the code that best fits a particular situation.
To put it simply, I find when using DTOs to store data, and following SOLID principles to write the rest of the code, I end up with quite clean code that provides a very nice separation of code and data, and that the right level of abstraction and loose coupling is exactly what allows me to write the code that best fits a particular situation. Granted, I don't write games, but I do write high-performance, highly-distributed multi-threaded applications where clean and fast connectivity between components is very important, and the ability to unit test basically everything is essential.
I guess to characterize OOP as 'combining code and data rigidly' is just so far off base from my style of OOP and my experience that I really can't identify with this as a reason to drop to C.
Re: Why I Write Games in C
#278Earlier quoted context omitted.
Considering that vector, map, etc are widely used and expected features of software development, I would think that good libraries in C exist for these already, so you don't have to even write your own 100 lines. Are there any?
GLib (not to be confused with glibc) from the GNOME project has a wide range of functionality -- generic lists, hash tables, strings etc.: https://en.m.wikipedia.org/wiki/GLib Qt, I believe, also comes with a bunch of "standard library" stuff unrelated to UIs.
In my experience, most of the people who say they don't need OOP or generics end up implementing a limited (or even a full-fledged) version of these things themselves.
Re: Why I Write Games in C
#279Earlier quoted context omitted.
Try and implement http://jonathanwhiting.com/games/knossu/ with Unity. My guess is, the author would have taken more time learning Unity than implementing this game.
I'm looking forward to playing that next time I boot into Windows (couldn't get it to even create a window on my Linux machine after satisfying its dynamic dependencies (really old libpng for one), or even the Windows exe via Wine -- one of the perils of custom engine development) but I know Antichamber ( http://www.antichamber-game.com/ ), which has the similar concept of a non-Euclidean world, was built in Unreal.…
Antichamber was a 7 year long hack on Unreal Engine, it's really not a drop-in game.
Re: Why I Write Games in C
#280I write games as well (Written more than 10 games, though they are not very large at scale) and I write them in C++. Reasons being writing networking code (TCP/UDP) is much easier & efficient in C/C++ than any other language IMHO. And most of the code works across platforms.
Just my 5 cents: Although there's nothing wrong with it in the context of your comment alone, C and C++ are so distinct languages it's weird to see them aggregated as "C/C++" given that the article is about C and it explicitly recognizes C++ as a bad alternative.
And yes C and C++ are distinct. But the simple modules can be written in C, but the bigger ones need OOPS, so generally written in C++.