lainchan / λ

Roguelike

Unidentified · 2026-07-30 09:26
Best language to create a roguelike in ASCII like Nethack and Angband?
William Holtzer · 2026-07-30 10:14
>>44531 Rust, Zig, D, C++, C, everything else popular will be way too bloated for such a minimal game.
Cowboy · 2026-07-30 11:32
>>44532 But the classics were written in C: Rogue, Nethack, Angband, Moria, Larn, Omega...
Donna Hawthorne · 2026-07-30 11:38
>>44532 >nethack >minimal game are we deadass
Special Agent Bob · 2026-07-30 13:29
Any language. As long as you have an ncurses port, you can pick literally anything.
Wirth · 2026-07-30 19:20
Anything works, since you need quite bit of logic if recommend something like common lisp as the ability to abstract and create coherent layers matters a lot more than anything else. CLs mop should help quite a bit
Aristóteles Amadópulus · 2026-07-30 20:53
>>44536 In terms of rendering and input and technology in general, it's not about content itself obviously. You don't need 300mb RAM runtime for a text game.
Undisclosed · 2026-07-31 04:45
>>44537 Even Fortran and Prolog?
Bobby Newmark · 2026-07-31 06:45
>>44543 Fortran for this kind of thing would be like C, or even closer to C++, but less annoying. Prolog would be very interesting actually, you will have many constraint solvers at your fingertips and you can use them for all kinds of things starting from worldgen and ending with balancing randomized item stats/perks. If someone who has fresh knowledge of all that Prolog stuff tries to use it for roguelike, it can inspire new or existing mechanics on level we've never seen before.
Crazy Jake · 2026-07-31 19:18
>>44543 Prolog would work, nethack is a fairly large game, so logic programming is of course useful. You can probably make things a lot cleaner with prolog, even offer time traveling as a mechanic in the game if you play your cards right
Turing · 2026-08-01 14:54
>>44531 Who cares, that is least interesting question about the roguelike. What about it's mechanics?
Tyrell Wellick · 2026-08-02 09:28
>>44548 You need a language in order to create the mechanics.
Mitnick · 2026-08-03 02:00
Odin for C straightforwardness without its obnoxiousness, the ergonomic niceness of slices, stronger typing and builtin types for dynamic arrays and maps. C because C. The Angband codebase is C and quite readable, which I bring up because this question indicates you probably consider yourself a learner. C++ but an excessively limited subset that amounts to C with sprinkles, because C. Common Lisp because "text-based videogame" is a domain where the REPL and other such niceties are especially strong tools. C3 if you're a hipster. Not Rust because you're not making a web security hazard and you're not working with a team of morons, and because you actually want to be able to read it later. Not Zig because again you hopefully intend to actually read it later. But also >>44548
Faye Valentine · 2026-08-03 03:50
>>44561 > rust is writeonly skill issue
Apoc · 2026-08-03 10:38
>>44561 >odin, c, c++, c3 >readable what >zig >unreadable brother I can guarantee you you can go to the zig standard library, open a random file, and you will be able to read it and understand what it does, even with your eyes closed. literally post any snippet you don't understand, because I simply can't accept this statement one thing that always frustrated me with c++ is how hard to follow it is: when you look at a class name you don't know from which header file it came from, when you call a function you don't know where it was defined, how many times it has been overloaded, or if it is dynamically dispatched or not. writing a "jump to definition" function for your editor is nontrivial, and realistically, it demands a clang dependency and odin is vibecoded so what else is there to say about it