Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration of Ship Speed #6

Open
KanoYugoro opened this issue Apr 7, 2016 · 4 comments
Open

Configuration of Ship Speed #6

KanoYugoro opened this issue Apr 7, 2016 · 4 comments

Comments

@KanoYugoro
Copy link

First off, let me say this is amazing package and idea.
Is there a way to configure the speed of your ship? Or how far it jumps per button press?

@JonathanUsername
Copy link
Owner

Hey, thanks!

The speed of the ship going left or right is fairly easy to change, but it's currently set to 1 terminal column per press.

The speed of it going forwards is actually controlled by a single integer that determines the 'framerate' for the entire game. You can increase or decrease this to change the speed of the game. I set it at 15 just by good old-fashioned 'fiddling until it feels right', but feel free to fiddle with it yourself if you prefer it faster or slower. If you do a head -20 $(which nplaym) you should see the variable I mean, it's called FPS. There are a number of constants there that you can play around with actually. Have fun!

If you want to change the ship's speed left or right then it's around line 312 in the script:

$ egrep -n 'terminal\.[left|right]+\(1\)' $(which nplaym)
312:        terminal.right(1);
316:        terminal.left(1);
320:        terminal.left(1);

setting this to terminal.left(2); should make it jump two columns to the left per press, for instance.

Let me know if you find some better defaults!

@RWOverdijk
Copy link

👍 for speed. I can't move quick enough and would really like to eventually install my dependencies.

@JonathanUsername
Copy link
Owner

Hi, the speed of the ship doesn't affect the installation of the packages. Basically npm is running as normal in the background, the game just sits on top and parses the output. If you want to increase the speed for aesthetic/gameplay reasons, follow the instructions above.

@RWOverdijk
Copy link

Haha no I know. I meant, I want to install the deps by finishing the game, by not dying because it moves to slow. I want to increase the speed of the ship.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants