latitudegames / AIDungeon

Infinite adventures await!
http://www.aidungeon.io/
MIT License
3.19k stars 554 forks source link

Denote commands with a / #137

Closed dyc3 closed 4 years ago

dyc3 commented 4 years ago

This makes it so that commands must start with a /, and splits the input by spaces to get arguments for commands.

My reasoning for choosing / specifically is because users (especially gamers) will be more familiar with using / to denote commands (eg minecraft)

nickwalton commented 4 years ago

What happens if the input is the empty string? I believe you'll get an error.

Renha commented 4 years ago

It's not very convenient to type in / using say mobile phone

spenserblack commented 4 years ago

@Renha :thinking: This value should probably be something that nobody would ever start a sentence with, either purposefully or accidentally. I could see . being more convenient as a command escape (the Node.js REPL uses this, so I guess it's not too uncommon) for both PC and mobile phone users, so maybe that should be considered.

But personally I agree with @dyc3 that it should be /. I have terrible typing accuracy on mobile, and an "inconvenient" character would definitely prevent me from making mistakes :laughing:

dyc3 commented 4 years ago

@nickwalton Good catch, will fix.

@Renha We have mobile players? Even then, I'm pretty sure during a normal session commands wouldn't be used very often, so convenience shouldn't be a huge factor.

ben-bay commented 4 years ago

I'm good with this, after you add it to CHANGELOG.md :)

dyc3 commented 4 years ago

@ben-bay done!