
Show HN: Sleeping Beauty, a 7-day roguelike game - ondras
https://ondras.github.io/sleeping-beauty/
======
baldfat
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/](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.

~~~
sigil
> 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?

~~~
problems
What are you looking for from a roguelike engine?

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

~~~
sigil
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!

------
jameskilton
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.

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

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

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

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

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

~~~
tbirrell
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--

~~~
mrkgnao
"Not amused," the rats said they were

But Pavel would not be deterred

------
danneu
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.

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

~~~
danneu
Oh yeah, that makes sense now. Cool mechanic.

------
passivepinetree
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.

~~~
ondras
What about
[http://www.roguebasin.com/index.php?title=Main_Page](http://www.roguebasin.com/index.php?title=Main_Page)
?

~~~
passivepinetree
Oh, this is super cool:
[http://www.roguebasin.com/index.php?title=How_to_Write_a_Rog...](http://www.roguebasin.com/index.php?title=How_to_Write_a_Roguelike_in_15_Steps)

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.

~~~
Nzen
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.

~~~
passivepinetree
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.

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

[http://ondras.github.io/star-wars/](http://ondras.github.io/star-wars/)

Great work!

------
tibbon
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

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

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

------
smnscu
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](http://i.imgur.com/gTx9oXe.png)

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

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

------
chente
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.

~~~
pimlottc
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.

~~~
ondras
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.

~~~
pimlottc
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.

------
goda90
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?

~~~
marktangotango
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 :(

------
haberdasher
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.

~~~
ondras
Right. [https://github.com/ondras/sleeping-
beauty/issues/1](https://github.com/ondras/sleeping-beauty/issues/1)

------
pajop
Finished it! :)
[https://scontent.xx.fbcdn.net/v/t35.0-0/p480x480/17237216_10...](https://scontent.xx.fbcdn.net/v/t35.0-0/p480x480/17237216_10208180417485886_879931460_o.png?_nc_ad=z-m&oh=948d60ad7fc9453259a4aa2d8ce68a76&oe=58C579D4)

------
kentbrew
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.

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

------
d--b
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!

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

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

------
brianzelip
Game play and environment are really well executed!

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

[https://developer.mozilla.org/en-
US/docs/Web/Events/beforeun...](https://developer.mozilla.org/en-
US/docs/Web/Events/beforeunload)

------
fakir72
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?

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

------
chrisan
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!

~~~
ondras
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...

------
agentgt
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.

~~~
ondras
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.

------
Mikeb85
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?

------
Bedon292
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?

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

------
baldeagle
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?

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

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

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

------
agentgt
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.

~~~
ondras
"Enter" activates a staircase.

~~~
agentgt
.... 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.

------
HalfwayToDice
That was a fun 20 minute distraction!

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

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

~~~
ondras
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.

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

------
fanpuns
Very fun, thank you :)

------
calebm
I like the MUD feel :)

------
jmcgough
wow, better roguelike than I could make in a month

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

------
meseguer1998
Love it! :D

------
gravity13
ctrl+left is back in browser :(

~~~
babuskov
shift+left works as well.

