0
Detecting input in JS
Hi! I want to make a text adventure style game in JS, but I don't know how to detect and use player input. Help would be appreciated!!! Thanks!
4 Answers
+ 2
creste a web code, use the prompt() function.
if you need help with your code, show your code.
https://www.geeksforgeeks.org/how-to-take-user-input-in-javascript/
+ 2
This example help you:
https://sololearn.com/compiler-playground/WHl9x8w4dldn/?ref=app
+ 1
there are several advanced text-adventure game projects on github. Might give you an idea on how others designed their games.
https://github.com/topics/text-adventure-game?l=javascript
or if you want a simple js one, here is a nice video
https://youtu.be/R1S_NhKkvGA?feature=shared
0
Thank you!