Simsa River Hydropower

Can you provide power to the nearby colony and prevent them from flooding?

WARNINGS
================================================================================
Water pressure elevated
Battery power low

That's not good? Can you restore the power plant to nominal operation? Provide the nearby colony with power. AND make sure they don't flood?

Running the game

To run the game SSH into the server:
# ssh -p 2222 pi01-thedreamweb.ddnsgeek.com

Basic instructions:

Use the prompt to enter commands to control the powerplant.

Generic commands:

  • CREATE_USER <username> <password>: Create a new user.
  • LOGIN <username> <password>: Login with a previously generated user.
  • CLOSE: Close the connection.
  • RESET: Resets the simulation (so you can try again).
  • HELP: Shows commands and some more information.

Control the power plant:

  • SET_POWEROUTPUT <enabled|disabled>: Enables/disables poweroutput to the colony
    Disabling poweroutput helps charge the battery, but colonists won't be happy.
  • SET_WATERFLOW <closed|half|full>: Sets the amount of waterflow.
    'Closed' and 'Half' increase water pressure. 'Full' provides the most power.
  • WAIT: Advances the simulation time.
    You will need this because changes to the powerplant take some time.
  • STATUS: See current state of the pump.

About the entry

  • Created in Swift using Swift-NIO and Swift-NIO-SSH. Basic framework from an earlier project: https://github.com/maartene/NIOSwiftMUD
  • Only had a few hours to spare this weekend. I might add more stuff over the coming day as it's an unranked entry.
  • Would love to make this multiplayer (the framework allows for that), any design ideas?

Comments (9)

FlipBit
 • 1 year ago • 

Finally a game I can play in a terminal!
One thing that I really missed was a status command, so I can check what happened, even though this game is not finished. Hah, I just read your walkthrough and found out, that there actually is a status command, but it wasn't explicitly mentioned ingame and I didn't just try it out. So that's on me!

I made it through, no problematic bugs, so it's a nice start. I hope you continue and develop it some more!

maartene
  • 1 year ago • 

Thanks @FlipBit!

I've added the STATUS command to the instructions above. Indeed they are in the game, but they should have been here as well.

I'm indeed looking for a way of adding an extra task/variable that interferes with the two that are already there.

Baconinvader
 • 1 year ago • 

Very simple core gameplay but I really like the online and terminal aspects. Seems like it could be quite an intriguing game if it was expanding on. Multiplayer sounds like it could be kind of fun like you said, I guess it will be implemented automatically once I find @FlipBit 's password and destroy their colony.

remco
 • 1 year ago • 

Ah, I love terminal games. (Or at least the idea of a modern terminal game using it as a specific artistic choice.)

If you continue this … please implement backspace :-)

I don't think 'status' is in the help when you try the game online. I tried it on a lark because it was a command I thought I was missing in the help online, but then it turned out I'd overlooked it when reading the description here.

As for the multiplayer bit: Maybe the hydropower dam isn't the only important thing that has both an advantage that has a goal that has to be met (power) and a related thing that can happen (drowning). Maybe it's just a small colony with exactly as many players as there are systems (that all work slightly differently, and may need to interact).

maartene
  • 1 year ago • 

@remco, you are right. The STATUS command was indeed not in the instructions in the game. Just added them. Thanks!

I've also started implementing backspace, which is actually quite tricky. Not getting backspace working as in deleting from the buffer, but reflecting it correctly back to your terminal.

maartene
  • 1 year ago • 

@remco backspace is working!

thomastc
 • 1 year ago • 

Wow, playing a game over ssh is not something I've done before, great idea! This makes it pretty accessible (for those on *nix that is) without you having to bother to build a web interface.

What I missed was readline support (up arrow, Ctrl+R, that sort of thing). If it just uses simple I/O through stdin and stdout, that should be trivial to add using rlwrap. But it seems like you're doing something more fancy here.

IAmAPancake
 • 1 year ago • 

I really like the idea of a terminal-based game, especially one that you ssh into. I really like the concept, and the gameplay is unique and fun as well. Great entry!

remco
 • 1 year ago • 

@maartene Thanks! I can confirm backspace works, but I found another problem … how do I login with my current name when the LOGIN command requires you to be … logged in? :-)

Login to comment

Links

SourceQuick walkthrough

Author

maartene

Details

Related posts