Neck deep in code

 Posted by (Visited 7520 times)  Gamemaking
Aug 082006
 

So, I haven’t been posting lately. And the reason is that I have been neck-deep in code.

I am by no means a great programmer. I don’t know what a dot product is, and I couldn’t write quicksort. I learned C to hack mud code. I never took a single class on programming, short of a C++ training certificate when at Origin. I used to know assembler, but I lost it two decades ago for lack of practice. I am sure my programming style is messy and suboptimal in many ways.

But I enjoy it. Among the things I enjoy are being able to do all the parts that go into making something that other people might enjoy. I can do enough code to get something on the screem. I can do enough design to know what to put there. I can do enough art to make what lands there visually acceptable, though not great. I can supply sounds and tunes to go with whatever the experience is.

A lot of folks don’t get to have that experience. They have to do one or the other, and they have to work in teams. I have done plenty of working in teams too, of course. But there’s something special about doing it all yourself, artisan-like, and seeing something take shape. I also seem to have a knack for seeing how disparate parts of things can fit together that suits solving certain kinds of design problems with technical solutions.

A long time ago, I blogged about how procedural literacy wasn’t something that schools taught as a basic skill, even though I bet a lot of folks who never would have considered it probably would enjoy it. I’ve found (even in the little I’ve done with them) that my kids both get the “point” of how programming works — that the computer is really really stupid, and you have to be very specific when you tell it to do something. There’s a delight there in the moment when you mke it do your bidding that even little kids can grasp.

As programming and especially game development (no kid wants to learn to code to write a spreadsheet) have gotten farther out of reach, not only have we seen less and less of this joy reaching kids, but we’ve seen even the folks who ought to be able to hack it have to give it up. There are less mods these days. The art barriers are too high, the sophistication of the engines too much. The demands placed on people who want to do a little creative work have gotten to be so much that the pleasure is denied those who cannot spend months on end learning intricacies.

I know C and C++ well enough to do something with them. The thing that stops me from making games in them by myself isn’t the language; it’s Windows, and Visual Studio, and the jillion conventions and libraries to learn. It’s the fact that there’s no language shipping with the machine.

And yet… we see a billion kids mucking about with Flash. So there’s hope.

At some point, we’re going to see this trend reverse, because it always does. Some tools will come along that make it easy for people with less background and training to do stuff. Maybe not everyone will be able to do music and artwork for their little games. But not everyone needs to. Every once in a while someone comes up with crazy off the wall stuff like this little game* about trench warfare and ice cream trucks, and we get to see a glimpse of what happens when production is democratized, when hobby flourishes, when just the joy of insane experimentation takes root.

*Warning: once you exit the game, you’ll need to go kill the process too, because the backlog of sounds is insane, and it’ll keep playing forever. And I hope I am not doing damage to this guy’s bandwidth bill, sicne he has no idea I am linking to him! 🙂

  25 Responses to “Neck deep in code”

  1. I have seen references about people learning to program from Inform (interactive fiction) and LP-MUDs. I don’t know if this happens anymore, but it seems an interesting way to program, combining a game with it.

    Back in the old Apple ][ days, there was RobotWars, where users programmed their robots, and put them in an arena. You could create a MMORPG where the “fun” of the world is to write the best AI for your character. (Best being defined by most income earned, or best score at the turing test based on player votes.)

  2. Is writing code like writing poetry for you? Different parts of brain accessed? Yes? No?

  3. get a mac — all the programming tools (GNU C/C++/Objective C compiler, Perl, Ruby, Apache, Python, etc.…) come with the machine, along with XCode IDE and developer tools. Or run F/OSS OS like Linux and get all those tools with any major distribution.

    which is why at developer conferences you see mac and linux notebooks outnumbering windows machines… …yet games are still locked into windoze only world…

  4. We do actually have a Mac. But honestly, Unix is very difficult to get to coding in, and even with XCode and stuff, to get going coding on a Mac as a novice is just as hard. Doing the interface hookups, sure, but that’s about it.

    RobotWars was a remake of the classic mainframe game CoreWars.

    Writing code and writing poetry feel different to me, just as writing a song feels different, and writing a story feels different from any of the above as well.

  5. Raph –

    Check out Disney’s open source game engine, Panda3D, http://www.panda3d.org/, it is easy to program in Python which gives you a huge range of coding constructs to code games quickly and you can always rewrite a module in C, if you hate yourself or it needs to go real fast.

  6. […] Comments […]

  7. I found a good teaching tool for my 12-year-old was Colobot

    http://www.colobot.com

    Sounds a lot like RobotWars, but a different “plot” (that’s using the term generously.

    It’s a very simple introduction to programming but a lot of fun!

  8. I have to agree with Raph, writing code and writing in a human language is quite different. Although I understand if people drew some similarities between programming and structured poetry because of the precision you need in both cases. However, the creation process feels very different when you’re in the thick of things.

    My thoughts,

  9. Making cell phone games is really cool in the same sorts of ways. I work with one artist, and we work really closely together to design the look and feel of the game. In a lot of cases I do end up doing small bits of art too. I love it because I get to be involved in every step of the creation and yet I have this great artist there who makes the final product look 10 times better than anything I could do alone.

    I liked that article that someone posted in the “Talent” post about “Learning to Program in ‘Only’ 10 Years.” I do think that programming is a real expertise. In some respects I think that all the WYSISWYG tools that are becoming available for programming actually hurt the process of creating good programmers. Because really I think that there are very strong limits on what can be done with them. What happens is that people climb these short hills to get to where they can do some admittedly pretty cool stuff but then to take their skills the next step they have to climb down the hill and get their hands dirty, which most tend to not want to do. Even if it takes a little bit longer to get to your first “whiz, bang, cool” I think that the process where you are always making upward progress turns out more success stories.

    It’s not so much whether you know how to write quicksort (I’ve probably written quicksort half a dozen times, I even had to prove its correctness for a class or two but I’m not sure I’d want to try and program it real quick without looking at some notes) or dot product but whether you can remember/learn how to do so without breaking stride. You may never have programmed either algorithm but I’m sure that if you had to figure out how to do it for some project you had, it wouldn’t take you long. At the end of the day, for programming games, it is problem-solving skills and an ability to learn that really matter. Yes, you have to master a certain amount of arcane knowledge like how to program for a certain environment but that ends up just being details. After you have programmed in 10 different languages, adding an 11th one ceases to be a big deal.

    A lot of this problem-solving really needs to be, in my opinion, taught at an early age. I’ve taught and assisted for a number of computer courses and a mathematics course once and I find that for both disciplines, by the time they are in college most students either have the “talent” for it or they don’t. Some may come in knowing most of the stuff you have to teach them and for some it may be a completely new experience but it’s problem-solving talent that really matters. There will be students who you can teach a new concept to and they’ll be running with it in hours and there are students who are always going to struggle because they are lacking some of the prerequisite skills to really excel (and at this point, teaching them those skills is no longer really viable). And even if you have those prerequisites I think it can take years to get really, really good.

    I feel really lucky. My mom taught me how to write my first game on an Atari 800 when I was 8 and I’ve been doing it ever since. I can’t thank her enough. 🙂 Our kids, if they’re interested, will learn with some fairly simple, low-level programming language where its problem-solving that’s most important. Once they have that maybe I’ll give them Flash or something that let’s them make whiz-bang. Of course now I’m sounding very, “it worked for me, it’ll work for them damnit”. 🙂

  10. I’m in a different camp, but similar; I discovered, around my senior year of high school, that I was a crack programmer. That is to say if you give me problem, I could develop the pseudocode for it without much trouble. But as far as being a good programmer went, I was intermediate. Good enough to make the real novices look bad, but not good enough to do anything I liked. Worse, error checking and robustness is extremely difficult to come by, in my code.

    For simple programming, these days, my recommended curriculum is (1) learn C (to learn algorithms and practices), (2) learn Java (to learn OOP, networking, and GUIs), (3) learn PHP and DHTML (because webby stuff is one of your best bets for fast, cool stuff). I considered tacking on LSL, but I still haven’t actually done it, so I have to hold off.

    Still, I’ve always felt there was a case for programming as an art (if you want to disagree, email me or something), and since I’ve done poetry, fiction, etc., I feel I would know. With programming, you’re communicating to the computer; with human language, you’re communicating to other humans. Different information models require different methods of communication. It’s a matter of successful communication. Every prog. language these days abstracts the actual execution far enough away from assembly that most people can’t say they know what the computer is actually receiving; human language is similar, except a (probably) metaphorical God wrote the compiler, i.e. someone else.

    Somehow, I got off track from what I originally wanted to mention. *grins* Which is that my ability to program is essentially enough to get by, but as I have to keep reminding my friends, I’m not a programmer. I’m a designer. I like to make stuff up and build it. And when I read this, I discovered it could be sent to people who don’t quite get it. =P

  11. Steven-
    Whoa, thanks for the link, Ive been looking for something like that for a bit now.

    In my area of work, data mining, Im using primarily 4th gen languages.

    Early on I was not very good learning Assembly, Cobol, C, C++, these are linear languages. I’m still not very good at them, in fact I avoid programming if at all possible

    My tech background was in Network Enineering, early on, modems, tape drives, switches, routers, servers and infrastructure and etc. Networks are abstractions, and can be represented graphically etc. Later I got into databases, SQL is a flexible language of abstractions, as is SAS and etc.
    The algorithims can be represented graphically, and in fact for very troubling problems in mining I do represent algorithmic processes graphically, thats how I visualize data points in my head I guess.

    When I practiced in healthcare clinically I solved problems in the same manner, solving medical problems is often an exercise in tying abstractions together (multi-system issues), again a form of network engineering if you will….

    I was never able to do this with C++, or any of those more linear languages.

    The wierd thing is I also paint and have for many years, but I was never a good writer, and my attempts at music were laughable. So Ive always admired others ability to excel in these two areas. Much seems to be depandant on linear vs abstract modes of thought…

  12. Hey, Allen, have you seen Hans Rosling’s TED talk? It’s here if you haven’t. =D

  13. But I enjoy it. Among the things I enjoy are being able to do all the parts that go into making something that other people might enjoy. I can do enough code to get something on the screem. I can do enough design to know what to put there. I can do enough art to make what lands there visually acceptable, though not great. I can supply sounds and tunes to go with whatever the experience is.

    I know how you feel. I am a Renaissance man myself with many varied interests and skills. There is an great feeling you get when an idea forms and you are then able to shape it into the final tangible product. If people enjoy it, then that is even more pleasurable.

  14. Michael-

    Thanks for the link, that guys presentation and message was very powerful. Especially re health and systems to understand it. The graphical representation of data was up there in the top 5 of “best Ive ever seen” for conveying trends over time to health, income and demographics….just wow…

    Im not sure where you live Michael but if you ever get a chance go see this Tufte he’s likely the most knowledgeable person Ive ever seen or met related to graphical data representation (plus you get 4 free very cool coffee table books from the conferance. Im going to the SF date in December (again). Every time I leave, his talk I’m glad I went…

  15. Perhaps I’m missing something important – but the strange trench war/ice cream thing does not actually seem to be a game….. At least I’m not able to control it at all – it just happens.

    However it’s certainly very odd……

  16. The graphical representation of data was up there in the top 5 of “best Ive ever seen” for conveying trends over time to health, income and demographics….just wow…

    Somewhere there’s an interactive web version of that where you can select the countries you are interested in and see that data projected across years or compared to other countries, etc. Very cool stuff although I’ve no idea where to find it. I think it may have been a link somewhere on David Brin’s blog.

  17. Raph wrote:

    RobotWars was a remake of the classic mainframe game CoreWars.

    I always thought the purpose of corewars was for programs to duplicate themselves in unprotected memory, while at the same time trying to smash the other programs.

    RobotWars was actually based in a simple virtual world (aka: a square arena). It’s a lot more like a primitive version of chabuhi’s http://www.colobot.com/.

  18. StGabe,

    If you go to the site linked by Michael it has a hyperlink to the gapminer organization that Hans heads up, with those demos and etc.

  19. I always saw the two as related; leaving aside the metaphor of the arena, of course. I presumed that the changes were largely to adapt it to a standalone computer. But maybe I was wrong.

  20. I always saw the two as related; leaving aside the metaphor of the arena, of course.

    Fair enough.

    It’s interesting to note that the programming-game “genre” has largely disappeared. I perused an article (on gammasutra?) discussing the decline of platformers. Adventure-games are another well-known faded category. It might be interesting to graph the popularity of genres over time and guestimate a life-cycle/span.

  21. It might be interesting to graph the popularity of genres over time and guestimate a life-cycle/span.

    Gee thanks Mike, every time you very creative people that inhabit this particular blog come up with some new data point thats even mildly interesting (most are more than mild) I start to think of ways to capture it effectivly so you wont have to “guestimate”. I do this mainly because I think you, Raph, SirBruce, Morgan and all the other very cool peeps around here should have “hard numbers”.

    This particular idea, specifically would require a historical trend analysis bumped against number of players over time x genre x demographic strata, if you wanted to get granular you could go by gender and location.
    Well then you could look at not only the popularity “of” but the popularity “vs” or what took its place in market share 🙂

    Can you clarify what “platformers” and “Adventure-games” are? Im not familiar with the usage of those terms.

    Someone should make a game industry dictionary, I’ve heard someones working on a grammer book though 🙂

  22. Raph, I can’t believe you linked to a .exe file. =(

    However, I agree with the sentiments in your post. I started learned to program with BASIC and at a very young age and 6502 assembly when I was about ten. I got my first C++ compiler in grade 8 and wrote my first networked GUI program in Pascal in grade 10. These days I write giagnormous boxed software using industrial-strength tools during the day, and go home and muck around with emulators for old video game consoles at night. As interested as I am in game development, in its modern form it is out of reach for me. Too complex, content barrier too high, etc.

    My brain is full and everything new that I learn causes me to forget something else. I’m reluctant to learn new languages and environments and libraries because of this. But its easy to get too static. I guess what I need is a big change—do something completely new for a while, so I can learn and grow again.

    @chabuhi: I remember Colobot, that is a neat game. Thanks!

  23. I first stumbled on programming by typing in BASIC program listings from magazines. I was voraciously hungry for more games, and this was a very inexpensive way for me to get more games. It was only a matter of time before I realized that I understood what I was typing. All of it meant something, and I could change it. One’s first forays into programming (especially as a child) can be a great power trip.

    It makes me sad to think that there are very few channels for kids today to have this sort of accidental exposure to code. The barrier of entry has moved a thousand miles away, with ugly, stinky swamps in between. At the same time, though, I think that games are still a good gateway. In particular I think that modding is one of the few places where you can still learn a little simple code and have some instant (and entertaining) gratification. You say that there are fewer mods being made, but I think that modding is still alive and well. It’s just branching out into many new forms, way beyond the realm of Quake levels. People are making everything from Sims skins to WoW AddOns, and the number of participants is probably the largest it has ever been.

  24. I first stumbled on programming by typing in BASIC program listings from magazines.

    I no longer remember what they were called, but there was a series of books that had you type in some BASIC in order to proceed with the story.

    They were kind of like the Choose your own Adventure books. You progressed through the story until you had to enter the code. Then you ran the program and based on the results you either continued or the story ended.

    What I liked about those the most was how you had to go through and check for errors if it didn’t provide the correct results. A great method to introduce kids into critical thinking and problem solving.

Sorry, the comment form is closed at this time.