Author Topic: A cautionary tale for aspiring roguelike programmers  (Read 17991 times)

Johnman

  • Newcomer
  • Posts: 1
  • Karma: +0/-0
    • View Profile
    • Email
A cautionary tale for aspiring roguelike programmers
« on: February 16, 2015, 11:39:11 PM »
Hi. Let me tell you my story.

Yesterday I decided to start coding a roguelike without knowing which direction I was going to go at all. I've never finished a game (except for a very crappy one for Ludum Dare) and laying in bed last night I resolved I would make the simplest roguelike I could, release whatever came out, and build upon it my wildest roguelike dev dreams, but only once that minimal game was published, and incrementally (minimal here means something like this tutorial checklist minus magic, datafiles, levels or NPCS; basically one level which you can win by clearing it out). My plan was to release early and often.

But of course I had to screw up. I became obsessed with making my game accessible and cross-platform, and so I started making it in Dart. Dart is a beautiful thing, but I had never done anything serious with it. I have spent more than 12 hours of almost straight coding in order to get the player to walk an empty square room. Most of that time has been spent fighting my incompetence.

Frustrated I started a C++ project an hour ago, downloaded libtcod and ported the whole thing in that time. It performs better, it looks better, and I feel much more confident in my ability to maintain the code.

The morale? Stick to what you know and love. Experimentation is good, but your priority right now is the product, don't let the process of making it consume all your energy.

Slash

  • Creator of Roguetemple
  • Administrator
  • Rogueliker
  • *****
  • Posts: 1203
  • Karma: +4/-1
    • View Profile
    • Slashie.net
    • Email
Re: A cautionary tale for aspiring roguelike programmers
« Reply #1 on: February 20, 2015, 03:52:03 AM »
Makes sense but bear in mind that expanding your frontiers is also a valid goal when creating a Roguelike. you just need a bit more time :)

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: A cautionary tale for aspiring roguelike programmers
« Reply #2 on: February 20, 2015, 10:58:25 AM »
Yes, learning a new language or tool takes time. I was looking at D for a while and it may be a good language for writing roguelikes, but I didn't have the time or energy to get used to it. D is also good (from my perspective), because it's actually very close to C++, only some changes that developers of D thought were wrong in C++.

TheCreator

  • Rogueliker
  • ***
  • Posts: 370
  • Karma: +0/-0
    • View Profile
    • Fame
    • Email
Re: A cautionary tale for aspiring roguelike programmers
« Reply #3 on: February 20, 2015, 12:12:53 PM »
D is much like Java, only less popular. No serious programmer would ever consider switching to a new language just because it has a garbage collector. Experience is much more important -- both your own experience and that of other programmers (tutorials, code snippets, libraries, tools etc.) So stick to what you know, unless what you know happens to be D, in which case you should learn C++.
Fame (Untitled) - my game. Everything is a roguelike.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: A cautionary tale for aspiring roguelike programmers
« Reply #4 on: February 20, 2015, 04:24:00 PM »
Most important difference to Java in D is I think the ability to compile normal executables. And not only that, if I recall it right, D compiles stand-alone executables without need for external library files.

Worthless_Bums

  • Newcomer
  • Posts: 44
  • Karma: +0/-0
    • View Profile
    • Steam Marines - squad based roguelike
    • Email
Re: A cautionary tale for aspiring roguelike programmers
« Reply #5 on: February 20, 2015, 08:15:14 PM »
Dart is a beautiful thing, but I had never done anything serious with it. I have spent more than 12 hours of almost straight coding in order to get the player to walk an empty square room. Most of that time has been spent fighting my incompetence.
Sometimes, while my code is compiling, I think about whether it's easier to learn to program now or when I was growing up. I'm not that old, only 31 in April, but your experience and mine point to two very different mentalities.

The first is that these days people generally expect access to a solution rather quickly. The internet, basically. StackOverflow, Wikipedia, ready access to other people's source code and documentation make learning new things much easier!

The seconds, and it is an argument with some heat on all sides, is whether doing things "the hard way" is better when learning new things; I tend to land on the side of "not really."

Twelve hours, when learning something new, is really nothing in the grand scheme of things. I remember distinctly struggling with the Metrowerks IDE, compilers, and linkers on my dad's Mac G3 in the 90s. All you had was example code from the CDs, and if you did not have formal education with the languages (C++ and Pascal in my case), it really was an uphill battle to cobble together something remotely like a game. You may have struggled half a day with getting a player to walk across a square room, but I struggled for days implementing Towers of Hanoi iteratively because what the fuck was recursion?

Which is not to say it was good to have to struggle in that way, but it does inform your perspective on how long it should take to sink your teeth into something new and have it stick. Probably the converse for new programmers today is that it's hard to determine what to use. When I say I used C++ and Pascal it wasn't because I looked at my wealth of options and decided those best suited the programs I wanted to write - they were simply all I had access to (don't mention AppleScript, please.)

What I'm trying to say is for new programmers my advice remains 1) get it to work, 2) make it not shitty, 3) you're always learning so it's always shitty. Infinite loop, fuck, become a wizard instead.

ahnlak

  • Newcomer
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: A cautionary tale for aspiring roguelike programmers
« Reply #6 on: February 20, 2015, 08:50:24 PM »
The first is that these days people generally expect access to a solution rather quickly. The internet, basically. StackOverflow, Wikipedia, ready access to other people's source code and documentation make learning new things much easier!
Ha! You're not wrong; I'm (slightly) older than you and generally all we had to work with was (a) code you managed to wrestle out of comp.sources.games, and (b) the system header files.

I do sometimes wonder how the hell we managed to get anything done before Google was an option!

Omnivore

  • Rogueliker
  • ***
  • Posts: 154
  • Karma: +0/-0
    • View Profile
Re: A cautionary tale for aspiring roguelike programmers
« Reply #7 on: February 20, 2015, 11:35:46 PM »
In the years before the web, I amassed a large collection of books and magazines ranging from college CS course texts to DDJ and quite a few others.  That and a bunch of source diving, still feel the scars from source diving into yacc.c and friends!  Lots of debugging to trace into the depths and more reverse engineering than was healthy.

I believe most of the posters are a bit more serious about writing a roguelike than I am.  For me it is a hobby, a way to scratch that programming itch I still feel from time to time and an avenue for exploring interesting topics in computer science.  On rare occasion I accidentally produce something vaguely resembling a playable game.  Lately I have been making an effort to wrap up the interesting bits and pieces from dozens of past roguelike experiments and deliver a finished product, but don't hold your breath, I'm liable to get sidetracked.

I write code for fun.

ahnlak

  • Newcomer
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: A cautionary tale for aspiring roguelike programmers
« Reply #8 on: February 21, 2015, 09:33:53 AM »
I write code for fun.
QFT.

Actually, I also write code for money - but I write roguelike code because I wanted to go back to playing in C, and that's not something that's much in demand commercially any more.

Pickledtezcat

  • Rogueliker
  • ***
  • Posts: 62
  • Karma: +0/-0
    • View Profile
    • Pickledtezcat Game Development Blog
Re: A cautionary tale for aspiring roguelike programmers
« Reply #9 on: February 23, 2015, 03:22:45 AM »
Ha. When I was young I tried to learn programming in basic.
But it was so difficult.
Bug hunting was so horrible it was often quicker to give up and write the program over than to try to find what had gone wrong. In the end I just decided that I just wasn't a programmer.

25 years later I started again with python and I  can't believe the difference.
Easy to understand tutorials, debugging tools, text highlighting and auto completion, searchable up to date API... there's no question that it's easier to learn coding these days.

Even when I've delved in to other, slightly more complex  languages to write GLSL shaders or whatever I've found them much easier than I expected.

Anyway back on topic... 12 hours spent learning how to do something in a different programming language is only time wasted if you never use that language again. And even then you might pick up some good ideas about how to dothings differently in another language.
A blog about my 3d Roguelike: http://pickleddevblog.blogspot.kr/