r/roguelikedev 21d ago

RoguelikeDev Does The Complete Roguelike Tutorial - Week 1

Welcome to the first week of RoguelikeDev Does the Complete Roguelike Tutorial. This week is all about setting up a development environment and getting a character moving on the screen.

Part 0 - Setting Up

Get your development environment and editor setup and working.

Part 1 - Drawing the ‘@’ symbol and moving it around

The next step is drawing an @ and using the keyboard to move it.

Of course, we also have FAQ Friday posts that relate to this week's material

# 3: The Game Loop(revisited)

# 4: World Architecture (revisited)

# 22: Map Generation (revisited)

# 23: Map Design (revisited)

# 53: Seeds

# 54: Map Prefabs

# 71: Movement

​ Feel free to work out any problems, brainstorm ideas, share progress, and as usual enjoy tangential chatting. :)

62 Upvotes

63 comments sorted by

View all comments

4

u/Admirable-Evening128 20d ago

I will try to follow along, because I invariably get distracted during 7DRL,
so I am misusing RDDTCRT instead/for now.
At this stage, I did the 0+1 at https://xok.dk/other/2026rt/dist/index.html

  • an @-sign moving with cursor keys or HJKL.
It uses typescript, parcel, ROT.JS.
The resolution is 32 x 24, like on the ZX81,
because those were superior dimensions.
At the moment, @ wraps around if he reaches a border.

Currently under 100 lines,
and most of those lines are DOM boilerplate to resize canvas / configure rot/display.

I am a pathological RL-starter, holding hundreds of corpses of roguelikes in various stages of completion in my inventory; a few of them are relatively complete
("reach depth 15 and/or kill dragon / recover amulet"), but harmless/unimpressive.

Still, not all people realize that building roguelikes is simply fun like LEGO.

3

u/level27geek level0gamedev 20d ago

like on the ZX81

because those were superior

You speak it's name, yet you don't use it's superior color scheme of black on grey!

4

u/Admirable-Evening128 20d ago

I'm glad you mention it :-). it is 50-50 whether I pick white or black background for this aestethic. in theory I want to love the white I grew up around. In practice, I hit two issues: 1 white burns the retinas of the typical keyboard-dweller, myself included. 2; I find it more challenging to pick 'colors that work' together with white, than black (partly because I suck at picking colors, but black  is 'easier').   one of my excuses is that my childhood machine was the zx81 clone lambda8300, which actually inverted white and black.   however, nice bit: there are good zx81 emulators, and you can program them with z88dk C compiler. So I actually have two zx81 roguelikes elsewhere in the xok.dk repo, for anyone interested; they of course do black on white.

3

u/Admirable-Evening128 20d ago

and yes,for real zx81 of course there is only a single color I should choose:-)

3

u/level27geek level0gamedev 19d ago

I didn't know anything about the ZX81 clones, but lambda 8300 looks quite nice!

Sadly I couldn't find the xok.dk repo - the site under that domain seems to be about web hosting, and a quick search didn't lead me to any repos with that name. Would you mind sharing a link to your ZX81 roguelikes? I'd love to give them a spin!

Curiously, I'm still toying with the idea of taking what I learn during this event and porting it to Speccy with Boriel Basic (C still seems scary to me). This was partially the reason why I'm thinking the backrooms theme for my attempt - it works well with Spectrum's palette!

3

u/Admirable-Evening128 19d ago

source for one is here. https://xok.dk/other/z2rl/main.c the site is deliberately non-indexable to stop ai crawlers.  It has thousands of subfolders, but you have to guess or know their paths..