my2iu / TADS2-html5

Port of the TADS 2 interpreter for HTML5
Other
5 stars 1 forks source link

UI Improvements suggested by Nikita Tseykovets #5

Open my2iu opened 6 years ago

my2iu commented 6 years ago

There are several problems in the current implementation. If there is time, please take a look.

  1. Links with commands are not interpreted as commands, e.g.: "Room in which there is only a <a href='look at table'>table</a>.";
  2. Long text scrolls only one line at a time. That is, if the text does not fit on the screen, then the "More" is displayed. After that, we need to press Enter, to look at the next line. If there are a lot of lines, then we have to press Enter many times. In HTML TADS or in the command line, you can press the spacebar to display the following screen. It is desirable that the TADS2 for HTML5 on pressing Enter also shows the next screen, and not the only next line.
  3. The alt attribute of the images in the TADS game should be the alt attribute of the images in the web interpreters, e.g.:
  4. The saving and the restore work badly.

In my opinion, it should be in the following way:

save

The command should generate a save file *.sav and offer to download it.

restore

The command should open the file upload dialog. The restore will be from the uploaded file *.sav.

save "qwerty"

The command should save the game in the LocalStorage with "qwerty".

restore "qwerty"

The command should restore the game with the name "qwerty" from LocalStorage. It will be very convenient. We will be able to receive files for transfer between devices, and also save the game in the browser.

my2iu commented 6 years ago

Links are actually generated by the TADS code, not the VM. You can get the TADS code to generate links by returning SYSINFO_ICLASS_HTML for SYSINFO_INTERP_CLASS in osgen3.c. This causes the TADS code to output full HTML though, which requires HTML banner parsing, which I haven't got around to implementing yet.

my2iu commented 6 years ago

The ALT tags seem related to the flag html_allow_alt in the output code, but I don't have any proper examples to dig into this properly to see if that's actually the case. I'll need to generate an example manually maybe.

my2iu commented 6 years ago

I redid scrolling and the save/restore UI. So that leaves the ALT tags and the anchor links, which probably require a proper htmlTADS implementation, which I don't have time to do.