Saturday, March 12, 2022

7DRL 2022: Complete


 

I'm excited to share my entry for this year's Seven-day Roguelike Challenge: Amulet Raider. It uses Rogue's setting (dungeon, amulet, potions, etc.) and XQuest's gameplay (fast mouse-controlled action). Here's a video of it in action:


The game is written entirely in JavaScript using WebGL shaders. It's by far the largest JavaScript program I've ever written. The code quality is not great; I was putting things in at a furious pace. JavaScript is not too bad for small things. I found myself increasingly relying on VSCode's syntax highlighting, which tries to show unused variables and function signatures. A lot of the bugs I had were the dumb variety (misspellings, calling functions with the wrong parameters). These are the things that type systems were created to catch. Perhaps next time I will try TypeScript. The edit/test cycle was really fast for this though. It made the shader programming in particular really fun.

Wednesday, March 9, 2022

2022 7DRL: Midpoint

It's that time of year again! Time to wake up the blog for the annual Seven-day Roguelike Challenge. This year I tried to do some planning ahead of time but I haven't really gone with any of my plans, specifically.

My first idea was one I've had in my list for a long time, which is to try to do a Roguelike homage to the (recently Hugo-award-winning) Murderbot novella series by Martha Wells. Murderbot mostly does computer hacking in a fairly hand-wavy way, fighting in a slightly less hand-wavy way, and watching telenovelas in a completely hand-wavy way. So I thought it'd be interesting to try to come up with ways to see sections of the level through security cameras, alter what enemies see through those cameras, and other hackery things. Ideally I wanted the game to keep to the Roguelike ideal of slightly more than one keystroke per turn, though, and I've had trouble thinking of how that should work, exactly. Oh, and also there was a 7DRL entry last year based on Murderbot! I had a bit of fun playing it.

My second idea had been to do a riff on Meritous, a somewhat monotonous action Roguelike with a one-button combat mechanic. I like its stripped-down mechanics but I have only been able to complete a game a couple of times. The map has thousands of nearly-identical rooms and a handful of slightly more interesting bosses.

The third idea, which I ended up going with, is to mash up Rogue and XQuest. (XQuest itself is based on Crystal Quest, an old Macintosh game). {X/Crystal} Quest has a novel mouse-based movement system; moving the mouse changes the player character's velocity directly. Firing is in the direction the player is moving, as a multiple of the player's speed. It can be a bit squirrelly to learn but it has a high skill ceiling. I spent countless hours playing XQuest and XQuest2 back in the day. Here's some example video of it:


Work's been going OK. The in-development version can be played here and the source is on Github. I'll put the final version on Itch.io. You will need a good mouse; I'll add sensitivity options before I'm done but it's hard-coded for now. You will probably a decent video card to play; it uses WebGL but I'm  not pushing crazy amounts of data at it. Also, Firefox seems to be really slow as compared to Chrome, Edge, or Safari. I use Firefox for my day-to-day browsing but I must be doing something in my games that doesn't sit quite right with it.

I started from a very simple JavaScript game that I'd made to demonstrate the fast marching method. So far I have a rudimentary dungeon generator and some turret enemies. For the player character I have movement, shooting, and the beginnings of melee behavior. Today's work will be developing a melee enemy and hopefully getting the melee to a point that feels right.