2D Boy “Rapid Prototyping Framework”

By Jim Rossignol on May 28th, 2009 at 8:18 pm.


Via Offworld we notice that 2D Boy have released a “not-revolutionary” Rapid Prototyping Framework, to help other would-be devs on their way. This gives you a trimmed down version of the tools 2D Boy used to make World Of Goo. 2D Boy explain:

This means two things:

1. Minimizing the amount of code required to set up a new game
2. Providing all the basic facilities so as to avoid wasting time reinventing the wheel (2D rendering, sound, input, persistence layer, and resource management)

Which is probably quite neat, if you’re wanting to make a 2D game from scratch.

__________________

« | »

, .

51 Comments »

  1. Tei says:

    the ultimate sandbox :-)

  2. Naurgul says:

    It’s a good move, although I’m certain that there are other free 2D graphics engines one could use. I’m a bit confused about what makes this special. Nevertheless, it’s good to have a tried and tested tool like this available to the general public.

  3. pepper says:

    Naurgul, depends on what kind of functionality you get, XNA is a framework from microsoft that also is supposed to limit the time needed to setup a renderer. Unity is a complete dev package with a heap of standard functionality. So it all kinda depends.

  4. Wolfox says:

    A bit off-topic, but here it goes: if anyone here wants a nice 3D game framework to play with, I suggest Panda3D.

  5. Tei says:

    I read a dev’ forum to have some connection to game dev’s. And by the way people look at Unity, it seems is a Big Thing for some people. Next big thing after Torque Engine?

  6. Mike says:

    That’s a really wonderful idea. That really, really is great.

  7. pepper says:

    Tei, unity is a great package which allows one to develop games very fast. So yeah i reckon its a big thing.

  8. teo says:

    I’m going to check it out and see if it’s of any use

    Hooray, they’re using SDL =) this could be great

    The thing with even making a simple 2D game is that you need to create a lot of stuff before you can actually start creating stuff. It’s not that hard to do but it takes a lot of time, is tedious and distracting and you probably end up redoing it every time which is why having something similar that’s designed to be modular could be great.

  9. RC-1290'Dreadnought' says:

    Well, cool thing, unfortunately it’s a bit shaky when used with visual C++ express edition, because “solution folders are not supported in this version of the application” and thus “some of the properties associated with this project could not be read.” but I guess it’ll run after some closer inspection of the readme. (don’t forget to download the sound engine, for example).

    [EDIT] Or maybe it won’t.

  10. moyogo says:

    Hey it’s gotten to comment eleven without this – 2DBoy are the most awesomest! Thanks for supporting independent developers / tinkerers!

  11. Serondal says:

    how hard would it be to take something like this with no previous coding experience and make a game where you got a little character that stacks blocks and gets points tracked up in the corner for each block he stacks atop the other all wilst a timer at the top ticks down over the course of 30 minutes. Then when the 30 minutes is up you get a game in summary telling you what all you did. I would like to try and make this game as my first foray into making 2d side scrolling kinda games ;P Just to get my feet wet then expand from there.

  12. jalf says:

    @Naurgul: Nothing is special about it, really. It doesn’t do anything unique, but it worked for them, so they just made it public because maybe others would find it useful. ;)

    @Serondal: Somewhere between “unrealistic” and “impossible”. ;)

    You have a couple of options. First, the obvious one is to grab something like Gamemaker, which would let you make games like you describe very easily with no coding experience (and learn some basic programming along the way). Second, you could do like one of the 2DBoy guys explain in this. The thing to note is that several of the participants in that thing had to teach themselves programming along the way. So you can do that pretty quickly too. But you might get better (and definitely faster) results by starting with something like Gamemaker.

    @Tei: I’ve only heard positive things about Unity. It seems to be picking up steam in a lot of different areas. At our university’s game program, they ditched the Source Engine this year in favor of Unity (at the students request). And for the first year ever, the programmers have actually been happy about the code they worked with.

  13. DMJ says:

    We love you, 2D Boy!

  14. Newblade says:

    I’ve been waiting for something like this a long time. Thank you 2D Boy!

  15. Serondal says:

    Interesting. I read about 40 page guide to coding twice (in C+) and was left extremly confused/excited then forgot all about it when my son was born unto the world :) I was able to write some working code that would write messages and calculate some stuff and was understanding enough to code script for Oblivion but that was about it (The script in oblivion is enough like normal c+ for it to have been useful to learn it) But I never got CLOSE to learning enough to actual make something on a screen with graphics involved. It is just amazing what some people can do with a little coding skilll and a good idea. I’ve got a good idea ( I think ) but no coding skills ;)

  16. Andy`` says:

    Sounds like ClanLib. Anyone with way more experience than me know if it’s similar to ClanLib at all, and because I’m capable of asking such things, how it might compare?

  17. Thants says:

    Serondal: It’s C++

  18. Paradoxish says:

    Naurgul, this isn’t a graphics engine. It’s a simple framework for doing away with a lot of the boilerplate code that you have to deal with if you’re starting a project in C++. In that sense, this is actually useful even if you’re planning on working in 3d – just pull out the rendering stuff and replace with your own.

    This is really a great move, in my opinion. Everyone working in C++, C#, Python, or just about any language is going to need to write code like this at some level. Having a “professional” example to look at that isn’t a bloated, fully featured engine is incredibly useful.

  19. unique_identifier says:

    this is straying slightly off topic, but has anyone had good experiences finding frameworks similar to this for rapid prototyping in python? many years ago i experimented with getting opengl / directx games going in c++ but one tends to waste so much time engineering basic rendering, user input and audio routines that you run out of momentum before you get to the part where you code some gameplay.

    i’ve messed around using the pygame library – it’s quick to make things, but the things you make run awfully – (it doesn’t seem to use hardware acceleration when drawing 2d sprites, and its awfully slow), and pyglet (i’ve only tried using this to synthesize and play sounds, but that seemed to break when i wanted to play multiple sounds at once)

    i guess pygame is a wrapper for a lot of SDL functionality, so i could probably render sprites much faster if i bothered to render them as opengl textured quads – but the whole point of using something like pygame is to avoid that kind of hassle.

    i’ve also messed around with microsoft’s c# xna but c# does seem to lack a lot of the data structures one might expect, and xna doesn’t seem to have any support for procedurally generating audio.

    edit: on second thoughts i might give pyglet another crack, i’m probably Doing It Wrong.

  20. cliffski says:

    C++ is an evil language to learn as your first one. I started with Sinclair basic, then went to C, then C++. C++ is conceptually a bit of a bastard, especially the object oriented gubbins. On the other hand, Basic is pretty easy to learn. I learned Sinclair Basic when I was 11, so how hard can it be?

  21. Naurgul says:

    Thanks for the explanations, pepper, jalf, Paradoxish. :)

  22. weegosan says:

    I love how it took like 10 comment replies on their blog until someone decided they needed to tell them how they were doing the licensing wrong, and that they aren’t doing version control right.

    How fucking dare they just release stuff for people to use and not think about the wider issues here.

    Stay classy, internet people.

  23. MD says:

    To be fair though, weegosan, unless I missed something the guy who pointed out the licensing thing wasn’t rude or disrespectful about it, and licencing is one of those tedious things that occasionally becomes very important. No harm in suggesting that they make it unambiguous and ‘official’, given that doing so can be as simple as pasting in a bunch of text from a license that already exists.

  24. AbyssUK says:

    nice but where is world of goo DS and iPhone? Don’t these guys want to be millionaires?

  25. minipixel says:

    @RPS: direct link is fail!!
    also, I learned basic when i was 9… OMG I own! ;)

  26. Wolfox says:

    @unique_identifier: did you see my first comment? Panda3D is a Python-based game framework. A very good one, too.

  27. Rei Onryou says:

    I hate Basic and love C++. I learned them in that order and Basic is just…wrong. Or at least VB is.

  28. jalf says:

    Basic is evil. C++ is an abomination. I wouldn’t recommend starting with either language. Avoid Basic (forever), and wait with C++ until you’ve learned at least one other language.

    By the way, I like that they avoid calling it an “engine”. The idea of “game engines” is flawed. It’s so vague no one knows exactly what should be in one, and it suggests implications that are really terrible ideas (like the obvious, that all the underlying logic for your game should be ONE monolithic component. And not least, it encourages would-be game programmers to spend the first 3 years making “their engine”, when they could have just made their game. And then extracted the code that worked well and reused that in their next game.

    Frameworks or libraries make much more sense.

  29. Comment system, what comment system? says:

    @unique_identifier,

    What data structures are you missing in C#? As far as I know, C# libraries (.NET actually) should have built in implementations everything you expect in C/C++ standard libraries plus a lot more. Worst comes to worst you can always write your own implementation.

  30. jalf says:

    .NET’s data structure deficiencies are nothing short of amazing. I’ll never know how they managed to leave out so much.

    Where’s the set class? Where’s the priority heap? Something like c++’s multimap? (.NET’s Dictionary matches regular map, but where’s the one that can store multiple values per key?
    C++ has all of these. .NET has almost everything else, but something as basic as this is mysteriously not there.

    As far as I know, there’s nothing like C++’s deque either, but that’s less essential, since the functionality is basically the same as for a vector (or .NET List), only with somewhat different performance characteristics.

  31. Malibu Stacey says:

    I’d recommend learning Java or C# before trying C++.
    At university (Glasgow, BSc Comp Sci) we started on Ada 95 then Java then C & C++ but that was back in 1996-2000 (learned BASIC on the C64 at home well before that though). I’ve heard other people started on stuff like Pascal first too.
    At work we’re writing a lot of new stuff in C# rather than C++ especially GUI stuff even though the majority of our software is C++ or Fortran.
    I think its more important to learn ‘how to write good code’ not ‘how to write language x,y or z’. Here I’ve worked on various languages which I’ve never used before, perfect example being a plug-in for Google SketchUp written in Ruby (interpreted or “scripting” language) & was able to pick up the fundamentals of the language easily.

  32. Serondal says:

    Coding has always interested me and when I was younger I really wanted to spend my life making video games. AS it turned out I got my girl friend knocked up and became a daddy instead so I had to turn my computer skills (Mainly typing extremly fast as learned by playing FPS games where you HAVE to type fast if you want to get out a message without getting shot) into a normal 40 hour a week job ;) I took a typing test for one company , AT&T and I scored literally off the charts. They had X amount characters per minute requirment and I have like a insane amount higher then they required. Ended up getting a better job offer else where and they even offered to pay me MORE than them based only on my typing speed O.o any how . . .

    What are most of these clever flah games based on? Is flash a coding language in and of itself? I’m wanting to make avery simple game that teachs a not so simple lesson for my children and maybe others if they want.

  33. Matzerath says:

    Have any of you worked with Blender’s Game Engine? I’ve fooled with the tutorials and was pretty impressed — built-in bullet physics, Python support, graphical module linking. The results of other users seem not much more than tech demos, though some of those are pretty impressive.
    Anyway, my question is: Does anyone consider Blender’s Engine suitable for actual game development?

  34. Doctor Doc says:

    Don’t you mean if you do not want to make a 2D game from scratch?

  35. Serondal says:

    From what I can understand you’ll still be making the game pretty much from scratch if you use this it is just some very basic but tedious stuff you have to do ? I don’t know for sure though.
    if Iknow=1
    Then I’d F@#$ing tell you
    End

  36. LionsPhil says:

    Yay libSDL, the relatively unsung hero behind the cross-platform low-level graphics ability of DOSBox, ScummVM, this, et. al.. Suspected they’d be using it.

    The different between ’10 PRINT “HELLO WORLD ” : GOTO 10′ and writing a nontrivial programme like a game is the difference between nailing a couple of bits of wood together and building a timber-frame house.

    Also, people, learn C. It will give you a much better foundation in understanding what it going on than the wooly (and badly designed) likes of JAVA and BASIC. If you are going to write performance-critical programs like games, you are going to have to understand how memory allocation works, and think through object lifecycles. Once you’ve done object-orientation in C, then you can understand what C++ is up to, and move on to that. But C++’s power is like a double-ended lightsabre, and will cut your limbs off again and again until you learn how not to weild it.

    (Malibu Stacey is right about learning to program being more important than learning any particular language, but the likes of JAVA will keep you ignorant of key fundamentals. Once you have a solid grasp of C, most other imperative languages are cake. And nobody really writes games in functional languages.)

    Expect to spend several years of your life writing utter garbage until you can actually structure something well enough that it won’t collapse under its own complexity before it’s finished. Read a book. One on datastructures and algorithms, not “LERN 2 WRITE GAMES GOOD IN 24 HOURS”. If you do not understand what you are doing, and why it does so, no amount of tools or frameworks will save you.

  37. jalf says:

    @LionsPhil: I have to disagree. If you start with C, you’re forced to learn a whole bunch of unnecessary distractions. (A starting programmer needs to learn how to program, not how to trace down memory leaks and segfaults). Of course a good programmer should *know* C, it’s just not a good starting point.

    As for moving on to c++, I’d have to disagree there too. Most C->C++ programmers never ever bother to understand the language. C and C++ don’t have much in common. Good C code is not good C++ code. The best a C++ programmer can do is forget that C exists. (I also don’t see how C++ is more dangerous than C. Harder to use, yes, but not more dangerous)

    And nobody really writes games in functional languages.)

    Yeah, and no one really writes games in C either, so you shouldn’t learn that either. ;)
    Unless we go by the theory that these languages have something to teach you anyway. In which case starting with a functional language is a very good idea.

    Expect to spend several years of your life writing utter garbage until you can actually structure something well enough that it won’t collapse under its own complexity before it’s finished

    And here we have the important point. Start with a sane language, and you’ve got a game within the first month. Start with C (and then go through C++), and you’re right, it’s probably going to take a couple of years.

    I think you’re missing a key difference between “wanting to try making a few simple games for fun”, and “wanting to be a full-fledged computer scientist who writes compilers and OS’es as a hobby”. Most people here don’t need the latter. At least not to begin with.

  38. TheLordHimself says:

    @Serondal:

    Flash is a platform. Flash uses a language called ActionScript for logic. ActionScript is a language that started out being based on ECMAScript (basically JavaScript) but now has evolved into something more powerful and sophisticated including features such as classes and typing. From a learning point of view, ActionScript is probably a good place to start because it is quite high level and does not require any memory management. There is also a thriving community across several websites that provide a lot of help, support and ideas. E.g. http://www.flashkit.com/

  39. Tei says:

    C++ is the lang that professionals use.
    Basic, C# and Java are unnapropiate langs because are designed for bussines/beguinners programmers.
    C, assembler are unnapropiate because is too low level.
    Java and C++ are unappropiate as first, because are object obtuse.
    Basic is unappropiate as first, because is dumb.

    Theres really *no* lang that is appropiate to learn to program. So chose whatever you want, C, C++, Java, probablly not Java.

    Theres probably no “good” or “bad” lang to use, other than DON’T COBOL, and DON’T FLASH.
    * Flash is probably awesome If all you want is tiny casuals web games.

  40. CdrJameson says:

    Anyone still use Allegro? Sounds similar.

  41. Stef says:

    @jalf:
    “If you start with C, you’re forced to learn a whole bunch of unnecessary distractions.”

    I viscerally disagree, this is absolute nonsense.

    “Yeah, and no one really writes games in C either, so you shouldn’t learn that either. ;)”

    I guess I’m no one. I’ve written a number of published handheld titles GBA/DS and 2 for PSP) in plain C (with some asm on the Ninty handhelds as well), and I’m not the only one to have done so (been programming since the Amiga). I would freely recommend anyone to start with C, but unlike yourself I would never discourage someone from starting with C++ either. The difficulties in transitioning from C->C++ vice versa most often stem from being hammered over the head with fallacies and the evils of the “other” language. If you’re half competent you’ll manage either way. If you start with C you’ll have a much better understanding of what goes on under the hood with the abstractions C++ employs. If you start with C++, you’ll get on just fine as well.

    “Start with C (and then go through C++), and you’re right, it’s probably going to take a couple of years.”

    Is that so?

  42. Gap Gen says:

    Yeah, if you want to use OO then it’s probably the case that something like BASIC is probably a bad place to start. Every language can do the basics just fine, so I don’t see why BASIC is a better place to start than a language with the syntax you’ll be using later (like Java or even C, say). OO isn’t just about taking a big function-based code, putting everything in classes and then carrying on like nothing ever happened.

    Actually, is there any problem with making games in Java, other than not really being geared towards it making executables? Sure it’s slower, but you can farm out intensive operations to a C plug-in or even the GPU (and it’s apparently better at OO than C++, which I can believe, plus you never get memory leaks)

  43. jalf says:

    @Stef: Nonsense?
    Tell me, can you learn programming in C without having to debug segfaults? Without learning about pointers? Without having to fret over out-of-bounds memory accesses? Heap corruption, memory management. How about function pointers?
    These things are distractions that aren’t really relevant to someone wanting to learn programming. When you learn programming, what you need to learn is breaking a problem up into small pieces, devising an algorithm to solve each of these pieces, expressing that algorithm in code, and so on. You don’t need to know about out-of-bounds memory accesses. And if your language forces you to do that, it is just slowing you down for no reason.

    I guess I’m no one. I’ve written a number of published handheld titles GBA/DS and 2 for PSP) in plain C

    Yep, and I know people who have written games in Python, Haskell, Lisp and pretty much any other language you can think of. And until Quake3 or so, ID used C, but today, even they have switched to C++. My point was simply that it is a ridiculous statement, saying that there’s no point in learning a language just because few games are written in it. (And you’re right, on non-PC platforms, C is far more common because of the utterly crappy compilers they tend to have for everything else. But is that really relevant to someone considering learning programming on a PC?

    Is that so?

    Most likely, yes. How many people do you know who, starting completely from scratch, with no programming knowledge, had a game written in C done within a month or two? Not many. In C and C++, people tend to take quite a while just getting a good grasp of the language, before they’re able to make fancy things like graphical games.

    On the other hand, I know people who, with absolutely no programming experience, have had pretty neat-looking games up and running in Gamemaker within three days. In Python within two weeks.

    C and C++ require you to understand a lot of concepts that aren’t actually key to understanding programming. Learning two things at the same time is harder than focusing on one at a time. That’s why people generally get up to speed faster if they start with a clean, simple, well-designed language, and *then* move on to C/C++.

    @Gap Gen: You can make games in Java just fine, and it’s been done before. For most hobbyists, the limitations won’t really matter. For someone writing Doom 4, or trying to squeeze a game onto a NDS cart, it’s going to get problematic, but if your ambitions are a bit lower than that, Java is going to work just fine.

  44. Stef says:

    @jalf:

    “segfaults? Without learning about pointers? Without having to fret over out-of-bounds memory accesses? Heap corruption, memory management.”

    Wow. You mention these as if they never happen if you use C++, how many commercial titles have shipped that need patches upon patches (PC/PS3/360 – built just about exclusively with C++/C#) because they crash and burn due to the very issues you mention.

    “Yep, and I know people who have written games in Python, Haskell, Lisp”

    That’s nice and all but diversionary. The point was you said NOBODY writes in C any more. This is not true, and your damnation of C is curiously amusing. C is valuable because its methodologies parallel the hardware itself (I think it’s important to have that fundamental understanding). But because C++ abstracts that away from you, C sucks, eh? :)

    “C is far more common because of the utterly crappy compilers they tend to have for everything else”

    What? The compilers are not even remotely crappy, and IDEs are used not unlike Visual Studio (VS for 360 work obviously). We’re free to use C++ (and do), no problem. More often on the portables these days a combination of C/C++, again no problem.

    “have had pretty neat-looking games up and running in Gamemaker within three days”

    Gamemaker. *facepalm*. Ooooookaaaaaaay. I’ll have to doublecheck if Gamemaker experience is a criteria our company looks for…

  45. jalf says:

    @Stef: I’m not comparing to C++. I agree, C++ is no better at these things. THAT IS WHY I SAID C++ IS ALSO A TERRIBLE LANGUAGE TO START WITH. Perhaps if you’d read what I said, and which posts I responded to, it would have made a bit more sense to you.

    I’m sorry I stepped on your very sensitive language-toes. I didn’t mean to offend. I think of programming languages as tools to be used or discarded as convenient, and don’t worry about hurting their feelings. If you feel some personal bond with them, I’m sorry I was so blunt about C’s deficiencies. I can see how that would be akin to insulting your mother or girlfriend.

    No, seriously, the exact same argument applies to C++, which is why I wouldn’t recommend that either for a beginner who just wants to try creating a few simple games.

    Gamemaker. *facepalm*. Ooooookaaaaaaay. I’ll have to doublecheck if Gamemaker experience is a criteria our company looks for…

    Remind me, please, where in this thread was it said that the aim with this exercise was to get hired by your company? Because I must have missed that memo. I thought it was about a few people wanting to learn programming so that they could slap together some relatively simple games for their own fun. For that, you don’t need C or C++. The point here is that for most hobbyists, even something as simple as gamemaker is sufficiently powerful.

    Commercial games is obviously a different thing, and yes, having solid knowledge of both C and C++ would be a very good idea there. But nowhere in this thread did I see anyone ask “What should I do if I want to land a job programming for Stef’s company”. And so, naive as I am, I assumed that programming for your company is irrelevant to this discussion.

    Did anyone say facepalm?

  46. Stef says:

    wow.

    @jalf: How very selective of you :) The part from which I quoted you specifically mention C. I’m merely defending C as a decent language to start with and from baseless and hollow attacks such as yours. The list of deficiencies as you like to put it also occurs with a broad range of much higher level languages – only when they crash and burn the reason can so often be much less clearer because of the level of abstractions.

    “I’m sorry I stepped on your very sensitive language-toes.”

    It’s amusing you may think you did, but no. We’re here at this point of the conversation because you make claims that are simply not true, from “nobody writes games in C” and after being told otherwise you go on to both excuse and marginalize its existence with another ludicrous claim of “crappy compilers” without qualifying that either; optimizations, allocations of registers, instruction scheduling, something, ANYTHING. It’s painfully obvious you’ve never used these “crappy compilers”. If you’re going to resort to *lying* about a language, compilers and their use, why should anyone believe anything else? I personally don’t find it difficult to champion Lisp, Lua, Smalltalk, etc without denigrating something like C/C++. It’s all kinds of absurd.

    “Remind me, please, where in this thread was it said that the aim with this exercise was to get hired by your company?”

    So it seems sarcasm is lost on you, the quip about Gamemaker was entirely rhetorical, and I’m certain most with the barest of cognitive function would be able to surmise I nor the company I work for is actually recruiting in this thread. lol!

    I’ll just leave this, while I’d never recommend something like Gamemaker, I’d never dissuade someone from starting with *any* language either (C/C++/C#, java, python, ruby, assembler, you name it). Obviously learning curves vary, but it’s up to the programmer-to-be to choose with some facts and understanding. Not every would-be coder (thank heavens) desires to select a language/framework because he/she can crank out a Tetris or FF3 clone in 2 days with a handholding point-n-click UI.

  47. Tei says:

    He!.. I love function pointers.

  48. Weylund says:

    Would-be casual programmers: I’d recommend C#. Lots of libraries, there’s some cross-pollination with lower-level languages if you need to write faster code (at least the syntax of C++ isn’t so impenetrable from C#), and it’s dead easy to set up and use. If you don’t want Windows, go with Python. Same basic story, although the cross-pollination is less transparent.

    Would-be non-casuals: learn C. It’s a great foundation for everything else. This is coming from a guy who learned C as a kid, left college early, skipped the CS degree, and jumped straight into senior engineering positions. C helps you to understand how computers *think* at a high level, without getting stuck in ASM implementations. Very useful, even ten years later when most of my work is C++/C#.

    As for the library? Awesome. Anything that eliminates boilerplate code is great, and anything you can point to and say “that came from successful title X” can help in innumerable ways. I’m totally gonna grab it. Probably not going to replace the reams of boilerplate I’ve written for plain-jane SDL, but hell – maybe it will! Exciting.

Comment on this story

XHTML: Allowed code: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>