Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4

Author Topic: I want to learn how to program roguelikes.  (Read 6130 times)

UristMcDwarf

  • Bay Watcher
    • View Profile
I want to learn how to program roguelikes.
« on: March 29, 2014, 10:10:38 pm »

What's a good language to write it in? Are there any good guides? I'm not gonna even think about making the next indie-smash hit Spelunky-BoI hit, but I'd like some comprehensive guides that explain what I'm doing and why it's being done and how it works. What would be a good language to use, also?
Logged

BigD145

  • Bay Watcher
    • View Profile
Re: I want to learn how to program roguelikes.
« Reply #1 on: March 29, 2014, 11:44:54 pm »

I would have a look at RogueBasin and Roguetemple. RogueBasin lists the language used in each entry. Both have forums.
Logged

alexandertnt

  • Bay Watcher
  • (map 'list (lambda (post) (+ post awesome)) posts)
    • View Profile
Re: I want to learn how to program roguelikes.
« Reply #3 on: March 30, 2014, 02:28:18 am »

I recommend posting over in the Roguelike Development Megathread

http://www.bay12forums.com/smf/index.php?topic=30113.0
Logged
This is when I imagine the hilarity which may happen if certain things are glichy. Such as targeting your own body parts to eat.

You eat your own head
YOU HAVE BEEN STRUCK DOWN!

Uronym

  • Bay Watcher
    • View Profile
Re: I want to learn how to program roguelikes.
« Reply #4 on: March 30, 2014, 06:46:53 am »

The most common language for making roguelikes is probably C++.

That said, you should probably learn to program before trying to make a game. There's a suitable curses/graphics library available for almost every language, so it doesn't really matter which you use, especially if you're not worried about publishing it or making something real-time (like Dwarf Fortress). If you already know any programming languages, they would probably be completely fine.
Logged
What I think we're saying is we need dwarves to riot and break things more often.

BoredVirulence

  • Bay Watcher
    • View Profile
Re: I want to learn how to program roguelikes.
« Reply #5 on: March 30, 2014, 01:34:27 pm »

C or C++ is, or should be, a standard for most desktop applications.

That being said, integrating into a graphics library is going to be a nightmare if you haven't ever programmed, and you will need to even for a roguelike.
I can't think of any tutorials though. There are plenty of resources for C and C++, although they may not be roguelike related.
Logged

inEQUALITY

  • Bay Watcher
  • Living On the Mirror's Edge
    • View Profile
Re: I want to learn how to program roguelikes.
« Reply #6 on: March 30, 2014, 02:45:44 pm »

If you've never learned a programming language before, I suggest Python over C or C++ because it's a bit easier to understand at first for the uninitiated. There's a nice tutorial for it utilizing the libtcod library on RogueBasin. Great place to start.
Logged
Quote from: Carl Sagan
It does no harm to the romance of the sunset to know a little bit about it.
If the magma cannon doesn't count, they aren't proper scientists.

penguinofhonor

  • Bay Watcher
  • Minister of Love
    • View Profile
Re: I want to learn how to program roguelikes.
« Reply #7 on: March 30, 2014, 03:29:16 pm »

I recommend posting over in the Roguelike Development Megathread

http://www.bay12forums.com/smf/index.php?topic=30113.0

There's also a programming thread over here.
Logged

blue sam3

  • Bay Watcher
    • View Profile
Re: I want to learn how to program roguelikes.
« Reply #8 on: March 30, 2014, 05:01:34 pm »

The best language to use is whichever one you're most comfortable with. Start with learning the basics of procedural generation, and go from there.


Quote
C or C++ is, or should be, a standard for most desktop applications.

This is utter garbage.
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: I want to learn how to program roguelikes.
« Reply #9 on: March 30, 2014, 06:18:44 pm »

For roguelikes absolutely python. A roguelike doesn't require perfection, and processing power is not much of an issue, to the ease of learning and using of python pretty much dominate other factors.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

BigD145

  • Bay Watcher
    • View Profile
Re: I want to learn how to program roguelikes.
« Reply #10 on: March 30, 2014, 07:21:18 pm »

Use whatever language easily converts to x86, 64, and ARM based devices. For a light turn based roguelike, mobile devices are completely viable. They can be mobile consoles of a sort. On screen keyboards work and bluetooth hardware keyboards are cheap ($20 US or less). Some have F keys for Windows users.
Logged

catpaw

  • Bay Watcher
    • View Profile
Re: I want to learn how to program roguelikes.
« Reply #11 on: March 31, 2014, 04:02:53 am »

C or C++ is, or should be, a standard for most desktop applications.

In 2014 you shouldn't go for C(++) anymore unless you really, really need the last etch on speed or memory usage - which is generally not true for the average rogue like.

Personally if' I'd start a roguelike today, I'd go for drawing on a HTML-Canvas in Javascript and have it running in browser. This is easy enough for a beginner, good to debug (Google Crome is awesome) and the result is easily distributable, just post a link where you are going to host it*. The main drawback is either No Savegames at all (good enough for a starter and for a rogue like). Cope with the size limits you get by HTM5L localStorage (still doable) or go through saving online through AJAX - which is not newbe friendly and requires a special hosting.

Especially when doing all output via a Canvas object I can testify from a hugh project I'm currently doing that does exactly that - the differences between the latest versions of the commonly used desktop browsers are nowadays neglieable. This has historically been a big issue on javascript. Right now the mess restarts on mobile devices tough :)

Which brings me to the second option one might go for in 2014. Aim for running on a iPad or Android Nexus. Whatever native language (Objective C or Java) or there are some wrapper packages as well for higher level language design - for example i heared that the famous Angry Birds are coded in Lua. But I'm not knowledgeable about mobile development. My webbased Canvas-App also runs in the browser of the iPad, but on the other hand I can't simply sell it that way via iTunes. But I don't care about that.

(* About hosting, I'm paying mere 12$ per month for a virtual private server, but there might be free services for static content)
« Last Edit: March 31, 2014, 04:06:14 am by catpaw »
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: I want to learn how to program roguelikes.
« Reply #12 on: March 31, 2014, 03:31:32 pm »

I were not sugesting browser based mainly because it's untraditional, and *good* JS is difficult to write for a beginner. If you're going for browser, no need to use something as elaborate as canvas; just mess around with CSS until just setting the innerHTML text of a div looks good. Also, I STRONGLY recomend http://jsbin.com/
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

catpaw

  • Bay Watcher
    • View Profile
Re: I want to learn how to program roguelikes.
« Reply #13 on: March 31, 2014, 03:47:50 pm »

I were not sugesting browser based mainly because it's untraditional, and *good* JS is difficult to write for a beginner. If you're going for browser, no need to use something as elaborate as canvas; just mess around with CSS until just setting the innerHTML text of a div looks good. Also, I STRONGLY recomend http://jsbin.com/

Right. Good anything is difficult to write for a beginner. JS is not better or worse than most other stuff in that regard. Its only on JS we can easily see what people wrote (unless they uglify it)

I agree, a white-space: fixed DIV will work well enough for a beginners rogue like.

The choice for such a thing is pretty subjective I just wrote what I would do. That may be due to to fact I spent the last 3 years writing a big javascript application.
Logged

Sizik

  • Bay Watcher
    • View Profile
Re: I want to learn how to program roguelikes.
« Reply #14 on: March 31, 2014, 04:23:36 pm »

The main drawback is either No Savegames at all (good enough for a starter and for a rogue like). Cope with the size limits you get by HTM5L localStorage (still doable) or go through saving online through AJAX - which is not newbe friendly and requires a special hosting.

If your savegame size is small (which it is likely to be for a first-time roguelike), you could get away with using cookies.
Logged
Skyscrapes, the Tower-Fortress, finally complete!
Skyscrapes 2, repelling the zombie horde!
Pages: [1] 2 3 4