4 ms·
Ask HN: Best Programming Language For a Text-Graphics Game
My 13-year-old daughter wants to program. Specifically, she wants to create a text/graphics video game where all the graphics is done by text characters -- you know, like in the old games. She has a Win8 box.
So -- Is it C#? I gotta install that monster IDE and battleship of MS just for this?
I was wondering if anybody had any other ideas. Back in the days of dinosaurs, you'd just poke your graphics to the screen. Guess they don't do that anymore, huh?
The way she described it to me, she wanted to make her own game. (Cue exasperated sigh from father). But all she wants is to be able to press the arrow keys and have a little ASCII character move around on the screen. Hit the spacebar and have it shoot at some other ASCII characters representing the bad guys.
This seems like a very simple request, but dang if I can figure out how to simply set up a system to do it in.
- tjr 14y agoText characters? Like all ASCII? I would think the ncurses library might be appropriate for that, in which case C, or any language that has ncurses bindings (like Python) should be fine.
- DanielBMarkham 14y agoYes. Except no scrolling of the screen when it updates. Yeah I knew there was a route to this in C, but aren't we talking *nix here? Seems like a heckuva an install just for something she may only use for a few hours. I really like the idea of starting her with C, though. There's a couple good books out there, and as long as she stays away from pointers and macros it shouldn't be too much. Modern environments are just so complex. Geesh. I'd hate to be starting today.
- nitrix 14y agoTermbox works nicely on both linux and windows, plus the api has only 7 functions and very minimal, yet powerful.
- jcr 14y agoIf you want to translate (well, transcode really) from existing graphics to ASCII art, your best bet is aalib [1,2]. I'm unsure if curses/ncurses [3] is suitable for game work, but it's another thing you might want to look at. If she has an interest in the creativity of character based art, it would be best to talk to Jason Scott [4] but realize some of the archived art scene text might be considered unsuitable for a 13 year old (even though I'm sure some of it was created by 13 year olds). Also, Jason would be a good person to ask about how character based graphics were done in old games. [1] http://en.wikipedia.org/wiki/AAlib http://en.wikipedia.org/wiki/AAlib [2] http://aa-project.sourceforge.net/aalib/ http://aa-project.sourceforge.net/aalib/ [3] http://en.wikipedia.org/wiki/Ncurses http://en.wikipedia.org/wiki/Ncurses [4] http://ascii.textfiles.com/ http://ascii.textfiles.com/ EDIT: It also might be fun to show her Star Wars in ASCII animation telnet://towel.blinkenlights.nl
- deleted 14y ago[deleted]
- brudgers 14y agoI would suggest that "using Ascii characters" rather than sprites is conflating design and implementation, and express my doubt that a 13 year old is actually thinking about ASCII, anyway. That sounds more like a translation done by someone a bit older. Good luck.
- alnis 14y agoIf you're ok with using JavaScript as a first programming language, ROT.js (http://ondras.github.io/rot.js/manual/ http://ondras.github.io/rot.js/manual/) is a neat library for making roguelikes. It's not a framework so much as a set of utilities for simplifying tasks like rendering the display, generating maps, etc. Some examples of small games made with it are http://ondras.github.io/star-wars/ http://ondras.github.io/star-wars/ and http://ondras.zarovi.cz/games/trw/ http://ondras.zarovi.cz/games/trw/ . I'm currently working on a silly project of my own using ROT.js: http://alex.nisnevich.com/untrusted/ http://alex.nisnevich.com/untrusted/
- Wilduck 14y agoI would say that the best programming language for a simple game is TI-83 Plus BASIC. Unlike pretty much any programming language on a modern PC, the barrier to getting text on the screen is extremely low. The functions `GETKEY`, `OUTPUT`, and `CLRHOME`, with some loops and variables will get you 90% of the way to a the game your daughter wants to make. There are some great simple tutorials available too: http://www.ticalc.org/programming/columns/83plus-bas/cherny/#disp http://www.ticalc.org/programming/columns/83plus-bas/cherny/... Plus, there are _tons_ of example games to download and read the code for. Here are a ton of arcade games: http://www.ticalc.org/pub/83plus/basic/games/arcade/ http://www.ticalc.org/pub/83plus/basic/games/arcade/ The other great thing about TI-Basic is that your daughter will be able to show off her work to friends at school. This is how I started to learn programming at about age 12, without any need for outside guidance.
- dgunn 14y agoUse an interpreted language like python, ruby, perl, et al and run it in the interpreter. I write lots of stuff this way before I build interfaces. My first python program was a tic-tac-toe game. I created a game board using dashes and pipe characters.