Lassen Sie uns in Pico-8 ein Roguelike-Video nach dem anderen entwickeln. Ein fortgeschrittenes Tutorial. Hier ist der Quellcode am Ende dieser Episode …
© Artikelquelle
E-Sport - Games - New Games - Best Games
Lassen Sie uns in Pico-8 ein Roguelike-Video nach dem anderen entwickeln. Ein fortgeschrittenes Tutorial. Hier ist der Quellcode am Ende dieser Episode …
© Artikelquelle
In the startend() function I removed the first loop to see what would happen and the results are identical. Saves a lot of tokens that way.
A couple of variations I did…
(1) I run STARTEND() before FILLENDS() so the stairs are often placed in deadend hallways (which I think is a good place for them). Then I made FILLENDS() exclude stair tiles. [EDIT: Now I see you did this in the next episode!]
(2) When carving doors & shortcuts I place a new "open doorway" tile instead of an empty floor tile. So I don't need to add any code to keep track of the doors (unless we're going to need it later!) and I just search the map and put in closed doors.
Before I started doing your tutorial, procedural generation, pathfinding, FOV and AI was like magic of the high arcana for me. Something that other people did, but I couldn't grasp it if my life depended on it. All explanations I ever found were like, 'well, first you divide the level, then you create rooms, and then connect them, and voila, a dungeon', without explaining the HOW. HOW do I create rooms? HOW do I connect them? HOW to code it? And now, you just showed me a way of doing, well, stuff like that, which seems understandable and logical, and actually does a pretty good job. Now I feel I can do it again myself for my own project. You, sir, have a special gift, explaining hard stuff, and coding it like a human being, not a pure-function-tail-recursion-closure maniac. Thank you.
25:25 It does save two tokens!
Wouldnt t be easier to just make the door tiles walkable before generation and at the end make them solid again, that would save a LOT of tokens I would think