Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Sleeping Beauty, a 7-day roguelike game (ondras.github.io)
319 points by ondras on March 10, 2017 | hide | past | favorite | 97 comments



FYI: A Seven-Day Rogue­like (7DRL) is a rogue­like cre­ated in seven days. That is, the author stopped writ­ing code 168 hours after they started writ­ing code. A 7DRL can be created at any time during the year. How­ever, general agree­ment was reached that it would be fun to sched­ule a spe­cific week for a 7DRL Chal­lenge.

http://7drl.org/about/

P.S. I found Haxe by following some of the 7drl entries. But I think I would like to use Racket to make one one day.


I had tried to do one recently using OCaml but it was sort of a pain using libtcod or sdl/opengl/ncurses directly.

So now I'm thinking about transpiling OCaml to Javascript and using one of the many Javascript rogue like libraries.

I mention this because Racket has a Javascript compiler (and tons of other languages these days like F#, Scala, etc also have to js compilers).

The browser is just such an easier platform to get people to play your game.


> But I think I would like to use Racket to make one one day.

That would be neat. Are there any roguelike engines for scheme? Or would you build it from scratch?


What are you looking for from a roguelike engine?

Just display/controls? Or do you want something that'll do the level generation too?


Mostly I'm just curious what the shape of the code looks like for a scheme roguelike. What's easy, what's awkward, how easy it is to extend the rules of the world.

I've always loved roguelikes, and I enjoy reading scheme code too. The elegance and organization of really good scheme code can be a revelation!


I second this question


I've always enjoyed roguelikes and probably spent dozens of hours playing them. My current favourites include more modern takes on the genre like "Caves of Qud" and "FTL".

I sort of casually develop one in golang these days, progress is not quick since this is just a small side project I do for the fun of it:

https://gitlab.com/ibiscybernetics/go_roguelike

Feel free to mess around with my code if it helps anyone develop their own game.


Give Haxe a try as well. It's surprisingly easy to write performant cross platform code.


This is really well done! And I particularly like the combat. Filling the field with your attacks and enemy attacks really forces you to decide if you want to risk getting more of your attacks or be forced to take a really big hit yourself. I love the strategy and risk-reward that you provide with this setup.


But a solid strategy seems to be to pick the enemies attacks when they are just two blocks, and wait for your own to align up to more than 4. That combined with a strategy of exploring the entire level (and thereby healing) makes the game almost too easy.

That said, it was more low stress fun than I've had in a while. I find myself playing games for stress relief, and I have a tendency to play on the harder levels so it stops being "fun" after a while. I was playing metro 2033 recently, and while a nice game/story I don't really enjoy it that much because the sudden appearance of fast moving monsters that are hard to kill with limited ammo is just to much. I guess I should drop the difficulty but that seems like cheating. Games like that should have a better sliding scale for how well your playing and adjust so the player doesn't have to reload 10 times...


Thanks! I am glad that people find the combat system useful and comprehensible. Some have troubles distinguishing colors, though.


Ah yes that will be a problem for some. An easy solution there is to use different glyphs for the different colors as well.


True. Unfortunately, my font of choice (Metrickal) only covers basic ASCII. But its glyphs are very neat otherwise :)


Since the combat is in a separate playfield, you can reuse glyphs from elsewhere. What about \ / for attacks and ^ v for magic?


I had to keep rechecking which color was which. I suggest using two colors (you vs them) and two symbols (magic vs attack).


how about using #*+@ for the Game of Thorns


Is there a "wait" command (usually '.')?


No. For no particular reason. But there is generally little room for movement tactics, as you cannot flee from combat...


It seems like enemies can't open doors, at least from what I could tell. So even if you can't outrun them you can hide behind a door?


It would have been useful when that elvish knight trapped me in a corridor and all I could do was talk to him (or kiss him - ew).


That wicked elf! Hopefully you will talk him out of that sticky situation.


Oh good point. Can multiple things attack you at once?


No, only one.


Also, you can focus your enemies' attacks in their weak spots-- for instance, I try to spend my enemy magic attacks when I'm fighting a rat, or something with little-to-no mana.


At first glance, seems similar to the combat system used by Legend of Bumbo[1] (upcoming game from the Super Meat Boy dev). Have other games used this "match-three" mechanic as a combat system as well?

Also, was pleasantly surprised to see the roguelike is played in the browser. Rot.js looks awesome.

[1] http://legendofbum-bo.com


"swap sword" is a pretty neat recent ios game where the character/enemies inhabit a match-3 grid


Can someone explain how the combat is supposed to work? I suppose that if I had more experience with these kinds of games it might be obvious.


Its like bejeweled\candy crush. You select two or more adjacent colors to perform an "attack".

The "attack" will be one of four choices: You attack, you attack with magic, the enemy attacks you, the enemy attacks you with magic.

So the optimal solution is: Maximize the attacks that benefit you while also picking attacks that either lessen the damage you take OR choose damage against you that set you up for bigger patterns on the next turns.

edit: looks like is can get deeper too. For example, bats have no mana and cannot attack with magic so it is a nice way to move some blocks without taking damage if you dont have any moves.


Same here. I think the game presupposes familiarity with a particular sort of casual puzzle game that I haven't played.


I'd never seen it before but had no trouble after playing with it for a few minutes


I keep trying to kiss rats. I think my adventures won't be re-told in epic song.


As pavel through the tower strolled

Sword in hand and collecting gold

He fought off hordes of soaring bats

And tried to kiss the fairest rats

--mandolin solo--


"Not amused," the rats said they were

But Pavel would not be deterred


Great game.

It could use an explanation of the (+#) modifiers though. For example, does (+#) green just add +1 to your attacks, and (+#) red add +1 to each enemy attack?

I was proudly rocking some (+#) red armor of treachery until I realized that I was probably the one being betrayed.


They cause extra tiles of that type to be generated, according to the message at the start of the game.


Oh yeah, that makes sense now. Cool mechanic.


This is incredible.

As someone who's wanted to try making something like this for a while but just doesn't know where to begin, can anybody recommend useful resources or suggestions on how to get started?

If it helps, I work mainly in C# and so would prefer that if possible, but this could be a good way to get familiar with a new language.



Oh, this is super cool: http://www.roguebasin.com/index.php?title=How_to_Write_a_Rog...

That doesn't get me out of my language/framework paralysis, but otherwise it looks like a decent roadmap.

Thanks mate. Also your game is amazing; thanks for sharing it.


I'd assume I'll throw the first one away, so no framework. Just use C# in a console. wasd+ is input. Game loop is update positions based on input, convert positions to an ascii 2d array, print ascii.

Just those could get you to step 7. Then take stock and decide whether you want to restart the project in a framework or push on.


That's probably a good idea. I've never built anything remotely "gamelike" in a console so maybe that's what I'm finding intimidating.

I imagine I just need to dive in and figure it out rather than stalling and posturing. Thanks.


The author himself built a neat roguelike engine in Javascript. I wonder if he used it to build this game.

http://ondras.github.io/rot.js/hp/


Yes, the game uses some (few) components from the rot.js toolkit.


Checked out odras's other github projects and found this Star Wars one really neat too:

http://ondras.github.io/star-wars/

Great work!


The first tower/game I started into had a room with no exit. At first I thought it was just a very nihilist game with no progress. I started a new game and that was better


Same happened to me, I guess there's bug in level generation.


In some roguelikes, it could mean that there's a hidden door there, but I guess not here?


Interesting, never encountered that during testing.


Solid little game. I wish going through the bramble passages would be worth it (i.e. secrets?). Also I was hoping that at the end I could kiss the princess and the folks there would become hostile if I did.

http://i.imgur.com/gTx9oXe.png


After one of them told me "no kissing", I tried kissing him. He was not amused, but that was the extent of his reaction.


Is it possible to wake the princess?


Really well done! The combat is really unique and brings something fresh to otherwise walking-into-enemies to kill them.


I'm colorblind and am having a hard time with the "you attack" vs "enemy attacks (magic)" color choice.

Outside of that, I'm digging this.


I agree, the yellow/green/red is rather difficult to distinguish. Aside from altering the colors, it could also use different symbols. In general, it's good to have multiple distinguishing qualities (e.g. color, shape, texture). This helps make things more distinct for all users, not just those who might be colorblind.


Agreed. The overal design direction (have those glyphs "#" as it resembles thorns for a Game of Thorns inside a tower filled with brambles) won over usability in certain cases.

If this was a full-blown game (and not a 7-day proof of concept), I would try to make the combat UI more robust.


Huh. I didn't see any relationship between the "#" characters and the game theme. The combat mini game stuck out to me anyway, as an abstract puzzle game in the middle of a hack-and-slash adventure game.

Still, if you are set on using #, you could try varying size, boldness, italic, rotation, font, etc.


Yeah, you're going to want to turn off f.lux, if you have it running.


I like it! One annoying thing I noticed is that if you kill something while it's in a doorway, you won't get any loot from it. Maybe things could stack on open doors?


I killed a spider, which dropped a coin, then a bat moved onto the same spot, I dispatched it, but only got the one coin for my efforts :(


Using ⌘ + Arrow is problematic in the case of the left arrow. You should catch/swallow that.

That is, on Chrome/Mac. It'll navigate you back to the previous page.




This is superb except for one small thing at the end; thank you so much for doing it in a browser window! Especially loving the connection between abstract resource management in combat and choice of weapons/armor.

As others have pointed out:

- It's hard to distinguish / remember the colors in Game of Thorns. (Pro tip: disable anything like f.lux that might drop out the blue values at some times of day.)

- Hitting command-left went back in browser history, and when I went forward my game status was gone.

- There really ought to be a way to annoy one of those knights at the end into combat, so you can clear the way to kiss the princess. Having that Kiss menu option for every single encounter but never actually being able to use it was the only thing wrong here.


I love the combat (especially the enter-combat animation). Awesome job!


Damn, I didn't figure out how to get to that P that's obstructed by pilars and other adventurers, and I've tried kissing everyone many times!


Right, there is a line. The game is over, no more content :)


I did wonder if that line of text was a red herring. Maybe you should let us kiss the princess and win?


Game play and environment are really well executed!


Add beforeunload event handler to prevent accidentally closing the window mid game.

https://developer.mozilla.org/en-US/docs/Web/Events/beforeun...


It looks possible to have rooms generated that are impossible to exit. For example, I'm up to L3, and can't get out of the room with the stairwell. And on L2 part of the map is cut off from a similar map defect. Is that intentional?


No, all rooms shall be accessible. If not, it is a bug :/


I've had a few doors spawn along walls with seemingly no purpose..or is there? Bug/never got around to anti-door-logic-placement in 7days?

Anyways, great game and well done. Shared with all my friends!


Never got around, right. Most of the levels/rooms are okay-ish with respect to doors. What would you expect of a ruined tower hundreds of years old, filled with brambles and fallen plaster...


On the 5th floor or so.

There probably needs to be a game clock (the usually implementation is hunger or enemies spawning).

Otherwise you can just go in a room and walk around till your back to full health.

I assume the author knows this.


Yeah, the author is aware. The game is rather easy.

HP regen was added as a fast&hacky way to make the game less difficult (non-regen versions were hard to beat).

(Also, you can F12 your JS console and hack the game's internals to your likings, adjusting your HP as necessary.)

For a non-PoC game, this would need to be more balanced.


Nice controls and looks interesting. Will have to bookmark it. Almost makes me want to re-download Dwarf Fortress. Anyone know if the adventure mode has improved much lately?


It appears that there should be a way to move at an angle? I might have missed it. There are hallways that look like they lead somewhere, but can't move down them.

Any hints about them?


standard rogue/nethack movement keys work: y/u/n/b go diagonally.


This is delightful. I've got a flight coming up, does anyone know if there is a keyboard overlay that could be used to play it on a mobile?


No, mobile devices are not supported, due to lack of time :(


Is there a rogue like framework where you can just build the maps / text / etc? Kind of like never winter nights for rogue


Wouldn't that defeat the "procedural level generation" feature that roguelikes are known for?


I'm on the 4th floor but can't seem to go up the stairs to the 5th floor?

A staircase leading up is here.

And I press '<' but no go.


"Enter" activates a staircase.


.... I guess I have so many other rogue like keys in my head. I swore I pressed '<' on previous stairs but I guess I didn't.


That was a fun 20 minute distraction!


This is awesome! The battle system is original too. Well done...


I'm stuck on the third floor. It's just a room without any exits.


Sorry for that. Apparently, that can happen from time to time. Re-loading will give you a fresh dungeon, if you have enough patience for that.


Sure, played it through a second time and got to the end. :) Great game! You should add more and harder levels.


Very fun, thank you :)


I like the MUD feel :)


wow, better roguelike than I could make in a month


Very nice. I wish it had a save game feature.


Love it! :D


ctrl+left is back in browser :(


shift+left works as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: