MikeTaylor / scottkit

Scott Adams adventure toolkit: compile, decompile and play 80s-style adventure games
30 stars 10 forks source link

Easy way to reload a game? #2

Closed drewish closed 7 years ago

drewish commented 7 years ago

Your series of blog posts inspired me to give this a whirl. I'm wondering if there could be a faster way to reload the game when using the -p switch so changes are reflected immediately. Even just keeping you in the same room would be helpful.

An tips for making testing easier?

MikeTaylor commented 7 years ago

Interesting. Dynamic reloading would be tricky, but there are various way to get you some part of what you want.

Simplest would be to add a --teleport-t (-t) command-line option which affects compilation such that the game automatically includes a "teleport" verb that can take you immediately to any room in the game.

And similarly --superget (-g) could include a "sg" (= superget) verb that lets you acquire any object.

How would that be?

Another approach would be to add a lax "load saved game" facility that only attempted to restore where you are and what you're carrying, and let you continue from there. It would work something like this:

$ scottkit -p game.sck
scottkit> ... play game ...
scottkit> save game
Filename: foo.sav
foo.
Saved to foo.sav
scottkit> ^D
... edit game.sck ...
$ scottkit --lax-load-game foo.sav

Your thoughts?

MikeTaylor commented 7 years ago

Thinking this though, I am going to add the teleporting option anyway. We can figure out what else from this discussion would be genuinely helpful.

Thanks for chipping in!

MikeTaylor commented 7 years ago

OK, I added the teleport and superget options. I hope they meet your immediate needs.

Let me know if you feel this issue can now be closed.

drewish commented 7 years ago

Nice! Yeah just being able to jump to the room you're debugging would be great. I haven't really gotten much done with items yet so I can't really speak to how useful that'll be.

MikeTaylor commented 7 years ago

BTW., if you're running from releases rather than from a GitHub checkout, you won't be able to use --teleport or --superget until I release v1.5.0. In the mean time, you can run with -w (wizard mode) and use #go to go to any room by number. But that can't work with room names, because the names are unknown by the time this purely run-time option takes effect.