Show HN: Terminal Phase – Terminal-based space shooter

(dustycloud.org)

217 points | by paroneayea 1552 days ago

15 comments

  • paroneayea 1549 days ago
    Oh, nice to see this getting attention on HN!

    Author here, happy to answer any questions about how this was made, though I'll answer a few things up front:

    - It's made in Racket, and as for why there's a whole section about that if you scroll down on on: https://dustycloud.org/blog/terminal-phase-prototype/

    - I showed a playthrough (pre-1.0) as well as how to add new levels and enemies on a live stream I did last week: https://www.youtube.com/watch?v=wxt2dqqulQc

    - "Why?" This is actually a test program for some stuff I'm building for the future of the federated social web (if you are familiar with ActivityPub, I'm one of the authors of that), an ocap-actor-model-framework called Spritely Goblins. More on Spritely here: http://dustycloud.org/blog/spritely/

    - (Shameless shill) If you think this is cool, this was actually funded by people who donate to my Patreon account and was a reward. If you donate, you can show up in the credits of the game: https://www.patreon.com/cwebber

    BTW a newer version of Racket is needed, at least 7.3 (maybe 7.2 is fine). If you play the game, let me know! I'll be adding more stuff soon, including powerups, more levels, a boss, and better balance for level 2 (which is probably a bit too brutal for a second level).

    • caleb-allen 1549 days ago
      Hey Christopher! I really really love this.

      We met at Racket con this last year (and grabbed dinner briefly). I love your passion for open projects and think about that, especially as I make my own plans!

      I especially love your passion for the reality of funding for open projects, and I'm excited to see what comes of your labors.

      • paroneayea 1549 days ago
        Heya! Nice to re-see you :)

        I appreciate that and am thrilled when I hear that enthusiasm rubs off. I promise all this game stuff amounts to something interesting in relationship to the federated social web, even if it isn't obvious yet from here. ;)

        • caleb-allen 1548 days ago
          Hey, if there's anything I love more than open software it's open software that is a game!

          I watched the video of the game from the 90s you referenced, I think games are a fantastic way to explore bigger ideas.

          Best of luck!

  • zenojevski 1549 days ago
    If you like terminal games, you might be interested in my Bash Arkanoid clone!

    It's packed with cool text graphics, animations, sound effects, paddle acceleration, side spin, and power-ups. Clone, inspect, play with Q and P keys.

    https://github.com/zenoamaro/arkanoid.sh

    I employed a number of tricks. The ones I am particularly proud of are:

    - The title screen, which uses the iconic old-school wavy text effect. To make this fast in Bash, I ended up precomputing the table of sin that determines the offset of each slice:

    https://github.com/zenoamaro/arkanoid.sh/blob/master/src/tit...

    - The rendering system required to get all this to run a smooth, consistent 60fps on both linux and macs, without blocking key reading. It sends itself an ALRM signal trap to run the game loop in a co-process, much similarly to how it's usually done with `requestAnimationFrame`:

    https://github.com/zenoamaro/arkanoid.sh/blob/master/arkanoi...

    - The deferred frame-buffer drawing mode:

    https://github.com/zenoamaro/arkanoid.sh/blob/master/src/gfx...

    Hope you enjoy it :)

    • the_jeremy 1549 days ago
      Runs at ~5 fps on alacritty. I wouldn't have thought it would be so different on alternate terminals.
      • zenojevski 1549 days ago
        Yes, it's impressive how much difference there is. There are ways to improve each, but this is the best cross-terminal solution I found.

        Do you have the same results with your other terminal emulators?

  • isoprophlex 1549 days ago
    Whoa this looks sweet. I'm looking forward to vicariously installing and playing this on way too expensive hardware, meant to be used for boring work things, and paid for by other people than myself ;)
  • tempodox 1549 days ago
    Wow, this actually looks like Defender, an ancient arcade space shooter. At the time I found that lethally difficult, never survived even three minutes of it. Maybe Terminal Phase will grant me some revenge after all this time :)
    • nategri 1549 days ago
      Defender is probably one of the hardest games ever made, if only because of the wacky controls (a 1D joystick that only moves your ship up and down, and a button for reversing your direction).
    • wpietri 1549 days ago
      It reminds me even more of the nearly-as-ancient side scroller Scramble: https://www.youtube.com/watch?v=3Vc-RIkpk40
  • ashton314 1549 days ago
    The first thing I thought when I saw this was “oh nice that looks fun”, but then I saw it was in Racket and thought “holy cow I have GOT to play that”! I’m just entering the world of PL, and Racket is a gorgeous language. I love seeing it used for game development. If you were at RacketConf 2019 I probably bumped into you. :)
  • cbm-vic-20 1549 days ago
    I'm not sure my terminal (VT420) will be able to keep up with this.
  • mixmastamyk 1549 days ago
    Neat, would be cool if it could use unicode.
    • paroneayea 1549 days ago
      Hi! Author here... actually it does use unicode (which we'll use to mean non-ascii at the moment, even though ascii is part of unicode (pedantry, pedantry)) for the starfield at the moment, those are braille characters so that it can have "smoother" and more fine grained movement of the stars. The frame around the game also uses non-ascii characters. However I'm planning on adding two modes: one that uses no unicode characters and is pure, and one that uses more unicode for a larger variance.

      I tried being moderately conservative for the moment because I'm not sure which terminals support what! (Admittedly the recent addition of starfields in git master stepped away from that a little)

      • mixmastamyk 1549 days ago
        Cool, thanks. Support is pretty great now if you stay within the basic plane and emoji.
    • RandomGuyDTB 1549 days ago
      Yeah, with an ASCII mode for compatibility.
      • reaperducer 1549 days ago
        Yeah, because I intent to try this on a TRS-80 tonight.

        It would also be interesting to have a PETSCII option.

        • Diederich 1549 days ago
          > TRS-80

          Wow! Which one, if I may ask?

  • bitwize 1549 days ago
    Written in Racket. Good stuff. I've done demoeffects in the terminal in Gambit.
  • nessunodoro 1549 days ago
    The credits transferred to terminal at what looks like 1200 baud makes me happy.
  • EdSharkey 1549 days ago
    Let me charge the beam like in R-Type for more damage!
  • matthewhartmans 1549 days ago
    Very cool OP! Love it!
  • slim 1549 days ago
    that map in the gif looks like the first level of r-type
  • kitd 1549 days ago
    Nice, though slightly disappointed it's not written in bash ;)
  • 6510 1548 days ago
    needs weapon upgrades
  • austinshea 1548 days ago
    gradius