8 ms·
What Programming a Game in 48 Hours Taught Me About Programming Games
- cheery 13y agoHe's an idiot for not recognizing that using low level language is an optimization, and premature optimization is a vain attempt. He's still the idiot because he didn't recognize it yet although the symptoms are right in front of him. If you read this, let me tell you: Sanity is not a dogma.
- jamii 13y agoSimilarly, Eskil Steenberg talked about building tools for doing simple things quickly rather than for doing complicated things at all. http://www.youtube.com/watch?v=f90R2taD1WQ http://www.youtube.com/watch?v=f90R2taD1WQ His main point is that building a game is no longer about what you can do, but rather what you can get done.
- jongraehl 13y agoThe linked http://strlen.com/java-style-classes-in-c http://strlen.com/java-style-classes-in-c was both horrifying and tantalizing. I'd expected a preprocessor that generates appropriate .hpp/.cpp, but instead I learned about yet another corner of C++ I hadn't exactly induced from experience.
- eliasmacpherson 13y agoHave a look at juce_amalgamated.cpp in the JUCE library for a real world example of this. The author of this java style classes article has taken one extreme view and I have taken another, that no code, inline or otherwise belongs in a header. Just declarations all the way. It's remarkable that modifying C++ headers is such a chore that it comes up as a reason for getting something done in a tiny fraction of the time for a roughly comparable task.
- Groxx 13y ago>It's remarkable that modifying C++ headers is such a chore that it comes up as a reason for getting something done in a tiny fraction of the time for a roughly comparable task. Couldn't agree more. Though I don't find it all that painful - lots of editors/IDEs have a 'go to header file' shortcut that makes this take a couple seconds at worst. But then I have repeatedly wondered why IDEs don't seem to have a way to synchronize your cpp changes to your header automatically. Rename function in .cpp -> automagically rename function in .h. That's all you really want a lot of the time.
- seanmcdirmid 13y agoNo intrinsic limit, just that c++ is so incredibly hard to tool that so many useful tools (say for refactoring) will never get written for it.
- ygra 13y agoIn fact, I think the Visual Studio team once said that it's so excruciatingly hard to build C++ refactorings that won't destroy code in unhappy circumstances that they won't bother shipping such things.
- eliasmacpherson 13y agoI suppose clang is the great white hope for C++: https://www.youtube.com/watch?v=yuIOGfcOH0k https://www.youtube.com/watch?v=yuIOGfcOH0k link taken from here: http://stackoverflow.com/a/13840863 http://stackoverflow.com/a/13840863
- seanmcdirmid 13y agoNew C++ code should be outlawed. Really, the language was just designed to make everything difficult, problems that just don't exist in modern programming languages. Crazy syntax, use of type information during parsing, convoluted namespaces...there is a reason C++ code is twice as hard to write, let alone trying to write a decent compiler for it. Heck, for the longest time there was only one portable parser that worked available for licensing, and the licensing costs were north of $150K. C++ has no future by design.
- xyzzy123 13y agoIt's enough of a chore that entire products exist to help. I rather like "Visual Assist X".
- thenomad 13y agoAs someone who works in another legendarily slow, computer-heavy artform (3D animation), this was a really fascinating read. His point about metawork really hit home hard. I'm at the end of a 4-year project now, and I'd estimate 90% of what I'm doing is what he calls metawork. The major takeaway I got from it was that I should try doing some 48-hour projects myself - or perhaps find some 48-hour film competitions to enter - and see what the results are. And, of course, write them up as a blog entry.
- kayoone 13y agoconsider checking out unity which has a very rapid testing flow and should be even more productive than flash!
- zeteo 13y ago>if I could transfer the pace of production from Ludum Dare into my normal work, I would complete a game like House of Shadows in less than 2 months While the article lists many plausible reasons why the pace of work turned out to be faster on the shorter project, there is also one that is not mentioned but perhaps the most important: complexity doesn't scale linearly. It's always faster to write the first 1000 lines of code from scratch than to add 1000 lines to a project that is quite large already, mostly because each newly added component has a growing chance to interact with an ever increasing number of older components.
- ha-ha-ha 13y agoHah, very interesting. On the other hand companies generally put their very best developers on new products and features - i.e. writing those first 1000 lines. While the mediocre devs get to extend and maintain those products/features, by copy paste or what got you.
- chii 13y agothat's because its more fun to work on that new 1000 lines, vs having to dredge thru old code to add the 1000 lines.
- leokun 13y agoI have never heard of a place where "mediocre devs" get siloed off as a normal way of operating a business. If you have under-performing engineers you should change your hiring and think about mentoring or exits for those you have already.
- michaelochurch 13y agoDoes game programming require C++? Ocaml can be just as performant, and Clojure might also be a good candidate (high-level functional programming, potential to get strong performance). I admit that, for Java, the gain in language expressiveness isn't worth taking the performance hit, because the former is so minimal. On the other hand, moving to a truly high-level language with half-decent performance (e.g. Ocaml, Clojure) might ameliorate the schedule slippages for which that industry is known.
- willvarfar 13y agoI'm part of the small but growing crowd that thinks Javascript is a good way forward, at least for small Indie developers and Ludum Dare entries. There is nothing worse in LD than seeing the voting screen filled with Windows binaries you don't want to download. Here my entry this time if anyone's interested ;) http://www.ludumdare.com/compo/ludum-dare-27/?action=preview&uid=10313 http://www.ludumdare.com/compo/ludum-dare-27/?action=preview...
- pandaman 13y agoThe AAA game industry is extremely risk averse - if you are using something it either has to be successfully used before or you need to make a demo that proves its viability. For graphics or physics it's easy to make a demo - you render a spinning buddha or simulate a hundred balls, show how much CPU and GPU it takes and everyone can extrapolate this to the full game. I don't know what could be a sufficient prove of Ocaml viability other than a full game written in Ocaml. I am not familiar with indies or mobile but I imagine, they are even less likely to risk as their chance for success is already pretty low and it would be rather reckless to add more unknowns from an untested technology.
- simcop2387 13y agoI have looked at clojure for doing this somewhat recently (about 8-10 months ago) and the main issue I ran into was lack of bindings to some of the more necessary APIs for doing it these days (SDL, OpenGL, etc.). Some of them existed but were very badly documented/maintained which put me off of it a bit, but I do think that there are some definite things that could be gained with using Clojure at least (Of course you can use the JVM bindings directly, but that was starting to look very ugly as I played with doing so).
- agentultra 13y agoIf you liked ActionScript but want to get back some performance I would recommend checking out NME. It looks a lot like ActionScript but outputs C++ (among others) and can be compiled as usual. Not the best, hand-tuned, C++ but probably good enough for a lot of projects.
- dsirijus 13y agoIt's OpenFL now, NME being just a native (cpp & neko) part of it.
- sanxiyn 13y ago"Do not read Hacker News".
- graeme 13y agoSound advice. I blocked it from my laptop. I still get much value from a daily browse, but it's not a time filler. It grows.
- graeme 13y agoDoes anyone have a reliable system for creating artificial deadlines? There are no external constraints on my work. When one artificially arises, I get my best work done, quickly. It doesn't burn me out because a rest comes afterwards. I have no idea how to replicate this urgency consistently.
- eitland 13y agoThe Pomodoro Technique is a winner for quite a few of us. Also reading up on perfectionism might be interesting (hint: it often doesn't end with a perfect result but it is always time consuming.) YMMW.
- graeme 13y agoYeah, I use pomodoro. I'm thinking more of productivity over a 1-3 day period. Maybe I just need better default habits, when I use pomodoro consistently I'm very productive. I don't think I'm a perfectionist, and agree it is to be avoided.
- jaggederest 13y agoI don't think there is a way to consistently improve your total output without side effects. I worry that this chase for productivity always comes with negative fallout, and people neglect it when pursuing 'more output'. Better output, perhaps? More output? Probably unsustainable.
- tehwalrus 13y agoThe drawback with pomodoro in Programming is Flow - If it takes even 5 minutes to "ramp up" your brain back into the problem space, then you're throwing away 10 minutes every half hour (and that estimate was highly optimistic) - and you're doing that deliberately. Much better to eliminate distractions, in my experience (selective site blocker, headphones with white noise or coffee noise or wordless trance, and an IDE that never stalls.)
- 13y ago
- roansh 13y ago>For the past several years I’ve spent most of my development time with C++11 in Xcode. C++11 has been around since `past several years'!?
- exDM69 13y ago> C++11 has been around since `past several years'!? Yes, but it used to be called C++0x and the official spec was still in the works. However, you could actually use most of the features in GCC and some other compilers years before the spec was out.
- polskibus 13y agoCan anyone tell me what's "Wouter’s dual-pass C++ class solution for game objects." ?
- veli_joza 13y agoThere's link in article: http://strlen.com/java-style-classes-in-c http://strlen.com/java-style-classes-in-c You write all the code for your classes inside header files and include them inside another class in main.cpp. That way you get around "declare before use" rule using uncommon feature of C++.
- Kiro 13y ago>I could drag a bitmap into Flash to import it, then place it, position it, add filters, animate it, and attach the animations to code all in one tight motion I want a tool where I can do this but in JavaScript on a canvas.
- pertinhower 13y agoFlash can actually export to HTML5/JS for you, so you might try Flash itself.
- ollerac 13y agoI haven't really had a chance to play around with it, but have you tried Adobe Edge Animate? http://html.adobe.com/edge/animate/ http://html.adobe.com/edge/animate/
- bluedino 13y ago>> During Ludum Dare, I remained tightly interfaced with Flash. I was continually in the midst of the edit -> compile -> test -> edit loop. >> This was one of the largest reasons for the high pace of production. I discovered this when I started building game ideas in Javascript instead of Xcode. I'd have a skeleton pounded out in an hour or two, and I'd add features in minutes instead of hours. I took a list of things that I though would take me the weekend, and I completed them in an evening.
- d23 13y ago> Intensity of focus. Almost all my waking hours were dedicated to programming during the 48 hours of the contest. I even took less sleep. This intensity of focus allowed me to maintain contact with the concepts and issues in the game so that I was able to remain productive without costly ramp-up and ramp-down times. Makes me wonder if it would make more sense to cram a 40 hour workweek into 3 days instead of 5. I think it'd be more enjoyable as well.
- bartonfink 13y agoI'd like the option to do that at times, but I'm not so sure I'd stick with that pace for good. I get a lot more pleasure out of evenings at home with my family than I do out of that intensity of focus.
- diydsp 13y agoEpic quote: >The C++ programmer is a deer sniffing the air for the scent of boots and gunpowder: everything’s an opportunity for gain; everything’s an opportunity for calamity.