r/roguelikedev • u/[deleted] • May 15 '13
Could A Roguelike Be Coded In Python?
The title pretty much explains it all. I'm in the process of learning Python as I like the feel of the language and was wondering if it was acceptable for coding a Roguelike. If not acceptable, or rather not the best choice, what would you all suggest?
3
u/Magro28 May 15 '13
Of course you can use Python. Use the language you are most comfortable with. It's more a question of do you wish to use some libraries coded by others which can make your life easier or do you want to code everything for yourself. A roguelike doesn't need a ton of infrastructur so it's not really necessary to use libraries or APIs.
1
May 15 '13
Thats great thanks. The only thing I'm truly struggling with comprehending is the how to code a random dungeon generator. Do you know where I could go to get some guidance/explanation on how that works? As I said I'm new to this and any kind of tutorial or skeleton code would be nice.
1
u/CalvinR May 15 '13
I'm currently farting around with coding a roguelike in python.
https://github.com/CalvinRodo/Crogue
It's not particularily awesome and it's just a program I work on when I'm at the inlaws house but take a look.
1
May 15 '13
I'll take a look when I get a chance.
1
u/CalvinR May 15 '13
No guarantees that its good python code, since I'm using it to teach myself it. So I'm using things like lambdas and functional programming just cuz.
1
May 16 '13
I've been using Python Anywhere to learn and mess around with Python code. Does anyone have experience using that website? I need to use it for a project in class where we make a small game. I was going to make a light Roguelike. Libtcod isn't something available to call up on their site, as far as I know at least. Could someone either tell me how to find a way to call it up while using that website? Or if not a way to draw ASCII style graphics to the screen without it.
3
u/Kyzrati Cogmind | mastodon.gamedev.place/@Kyzrati May 16 '13
Empyrea is a fairly popular roguelike in development, written entirely in Python. Check out the video--you may be surprised.
1
u/ekolis Several 7DRLs, including TriQuest feat. in One Week Dungeons May 16 '13
Definitely. Check out Pyrel for one that's in progress.
1
u/heroicfisticuffs erectin' a dispenser May 16 '13
Maybe things are faster when you use libtcod, but whenever I tried coding a roguelike from scratch in python it got sloooooowwwwww. Even using off the shelf algorithms for stuff like dijkstra maps and field of view/lighting, python got slow fast.
Sure, the code LOOKED great though.
2
u/Kyzrati Cogmind | mastodon.gamedev.place/@Kyzrati May 16 '13
libTCOD only uses python bindings so a python roguelike using it is really doing all its heavy lifting in C, making it much faster than python from scratch. I guess python from scratch is okay so long as you're not planning anything major...
1
u/heroicfisticuffs erectin' a dispenser May 17 '13
That's my experience. Maybe I am just a crappy python programmer but even when I use all of the tricks I know, I always have more lag than 'feels right'.
1
u/DSPR Jul 12 '13
I wrote and shipped a Rogue-like in Python several years ago, named Dead By Zombie. A zombie apocalypse survival game. So yes, it is possible. :-)
Even went to a major game convention, got a booth, and promoted it. Dressed as a Mad Scientist.
1
8
u/[deleted] May 15 '13
this tutorial uses python and libtcod