So, trying to slow down my BBS from spitting out ANSI screens too quickly.
I noticed eChicken has it setup to slow down SyncTerm during long draws and reset for menus. So I guess I'm wondering how he did it. I read that
SyncTerm uses a VT500 ansi code to change speeds, but where do you insert that code?
Tried using console.putmsg('\e[0;8*r');, no luck.
Code is <esc>[0;8*r where first number is 0, 1 or blank, and second number
I want to make it so when players exit a door game it will ask the user if
they want to display a high-score file.
Wondering how I should build this so it can be easily added to any doorgame with a score file?
I'd also like to be able to see the score file on the website using something like ansilove.js. If the door has a score file, link it next to the game.
So, trying to slow down my BBS from spitting out ANSI screens too quickly.
I
noticed eChicken has it setup to slow down SyncTerm during long draws and reset for menus. So I guess I'm wondering how he did it. I read that SyncTerm uses a VT500 ansi code to change speeds, but where do you insert that code?
Tried adding the code to .asc (Ctrl-a) files, no go.
Tried using console.putmsg('\e[0;8*r');, no luck.
Maybe <ctrl-a>"9600b.ans and put the rate code in an ansi file? Seems redundant
Code is <esc>[0;8*r where first number is 0, 1 or blank, and second number is speed 0 for unlimited through 9 I think for 115200
So is my thinking correct, or is my execution wrong?
Second Question...
I want to make it so when players exit a door game it will ask the user if they want to display a high-score file.
Wondering how I should build this so it can be easily added to any doorgame with a score file?
I figured I'd want to use one of the .ini config files and have a [doorscores] section where you had:
<door-int-code> = <url/filename to score file>
If a line exists for the door being played, upon exit the user would be asked if they want to view the file.
I'd also like to be able to see the score file on the website using something like ansilove.js. If the door has a score file, link it next to the game.
So, help me out here. Should I just drop some new lines into xtrn_sec.js, or write my own addon and have it called after the door runs?
bonus points if you help me get started.
I would make a JS module that accepts the internal code of an external program to execute as a command-line parameter. It would launch that xtrn, then prompt the user and display the appropriate file if desired. I would modify my shell / xtrn_sec.js so that it calls bbs.exec('?door-launcher.js [code]') instead of bbs.exec_xtrn('[code]'). A mapping of internal codes to score files could be kept in a config file as you described.
If the 'clean-up command line' for a door could be hijacked for this purpose instead, that would be an easier option (I haven't tried that and I'm doubtful).
I would make a JS module that accepts the internal code of an
external program to execute as a command-line parameter. It would
That sounds like a good plan, that would require fewer changes than...
So, trying to slow down my BBS from spitting out ANSI screens too quickly. I noticed eChicken has it setup to slow down SyncTerm during long draws and reset for menus. So I guess I'm wondering how he did it. I read that SyncTerm uses a VT500 ansi code to change speeds, but where do you insert that code?
Tried adding the code to .asc (Ctrl-a) files, no go.
Tried using console.putmsg('\e[0;8*r');, no luck.
Maybe <ctrl-a>"9600b.ans and put the rate code in an ansi file? Seems redundant
Code is <esc>[0;8*r where first number is 0, 1 or blank, and second number is speed 0 for unlimited through 9 I think for 115200
So, trying to slow down my BBS from spitting out ANSI screens too
quickly.
The simplest thing would be to convert it to a Ctrl-A/.ASC file using ans2asc and use the -delay option:
The simplest thing would be to convert it to a Ctrl-A/.ASC file
using ans2asc and use the -delay option:
eC already gave me some code that I just dropped into my logon.js, and it works great.
Re: Changing SyncTerm Display speed, and...
By: Digital Man to Android8675 on Thu Mar 29 2018 05:51 pm
So, trying to slow down my BBS from spitting out ANSI screens too
quickly.
The simplest thing would be to convert it to a Ctrl-A/.ASC file using ans2asc and use the -delay option:
I like that. does that basically make a bigger file so it takes longer to draw?
eC already gave me some code that I just dropped into my logon.js, and it works great.
Hey, when logon.js does load("loadfonts.js");, kind of take a while?
Does it
make sense to drop a "loading fonts message somewhere in there..."
Re: Changing SyncTerm Display speed, and...
By: Android8675 to Digital Man on Fri Mar 30 2018 11:05:42
The simplest thing would be to convert it to a Ctrl-A/.ASC file
using ans2asc and use the -delay option:
eC already gave me some code that I just dropped into my logon.js, and it works great.
I'm not sure if I've ever used ans2asc, but I suppose it's much easier to use DM's suggestion. (I'm not sure if that takes advantage of SyncTERM's native speed emulation feature though, which is probably the most accurate way of simulating scrolling at a particular rate. I believe there's also some crap in ansiview for simulating this on non-SyncTERM terminals, with abortable output; can dig that out if you want it.)
It occurs to me that this could just as easily be a function in xtrn_sec.js or whatever you launch doors from. You'll need to modify it anyway, and this doesn't have to be its own script.
function launch(code) {
bbs.exec_xtrn(code);
if (console.yesno('Display scores')) {
var f = new File(system.ctrl_dir + 'scores.ini');
f.open('r');
var ini = f.iniGetObject();
f.close();
if (ini[code]) {
console.clear(LIGHTGRAY);
console.printfile(ini[code]);
console.pause();
}
}
}
what's the format for scores.ini?
doorcode = filename?
Out of curiousity, would this also display files from urls? For example,
pull the score file from BBS Links
pull the score file from BBS Links
I did recently make a thing for displaying BBSLink scores:
https://github.com/echicken/bbslink-things
It's a bit redundant to the example provided above, but it might be worth looking at.
So it'll first see if there's even an entry then ask if the player wants to display the score file? I'm tinkering with it now, will post when finished.
echicken wrote to Android8675 on 04-10-18 21:43 <=-
Re: Door Scores...
By: Android8675 to echicken on Tue Apr 10 2018 16:11:02
So it'll first see if there's even an entry then ask if the player wants to display the score file? I'm tinkering with it now, will post when finished.
Yep, you've got the right idea. You could also check if the score file exists / if the HTTP request succeeds (though this might cause a delay) before bothering the user at all. If BBSLink, DoorParty, etc. all
publish score files it might be worth turning this into a common
module.
So it'll first see if there's even an entry then ask if the playerYep, you've got the right idea. You could also check if the score file exists / if the HTTP request succeeds (though this might cause a delay) before bothering the user at all. If BBSLink, DoorParty, etc. all publish score files it might be worth turning this into a common module.
wants to display the score file? I'm tinkering with it now, will
post when finished.
DoorParty offers .png files for download but it's basically the same principle. Here's the url for LORD at DoorParty.. http://wiki.throwbackbbs.com/lib/exe/fetch.php?media=scores:rpg:lord.png
Android8675 wrote to Bill McGarrity on 04-11-18 15:25 <=-
Re: Door Scores...
By: Bill McGarrity to echicken on Wed Apr 11 2018 02:14 am
DoorParty offers .png files for download but it's basically the same principle. Here's the url for LORD at DoorParty.. http://wiki.throwbackbbs.com/lib/exe/fetch.php?media=scores:rpg:lord.png
Serve up the raw .ans! ;)
Weirdness: ReferenceError: ScoreFiles is not defined (ZORKI)
[ScoreFiles]
ZORKI = ../xtrn/if/DATA/zork1-scores.asc
ZORKII = ../xtrn/if/DATA/zork2-scores.asc
console.writeln("Weirdness: " + e + "(" + prog_list[i].code + ")");
var ini = f.iniGetObject(ScoreFiles);
Serve up the raw .ans! ;)
You should be providing a string as an argument:
var ini = f.iniGetObject('ScoreFiles');
You could also 'fix' this error by adding this line above the f.iniGetObject one:
var ScoreFiles = 'ScoreFiles';
Serve up the raw .ans! ;)
I'm sure that could be arranged. We can bug maskreet about it; the .ans files are probably already being copied to his webserver so that they can be put through ansilove (I'm assuming that's what he's using).
Re: Door Scores...
By: echicken to Android8675 on Wed Apr 11 2018 11:03 pm
You should be providing a string as an argument:
var ini = f.iniGetObject('ScoreFiles');
eC, your ansiview, does it have a webpage for ecwebv4?
OK, that resolved that problem, but it seems that the internal code read is case sensitive. For example if the INI file contains:
ZORKI = filename
that won't work, but
zorki = filename
will work. That just something I have to make a note about?
Sysop: | Ree |
---|---|
Location: | Toronto, ON |
Users: | 2 |
Nodes: | 10 (0 / 10) |
Uptime: | 115:19:42 |
Calls: | 375 |
Calls today: | 2 |
Files: | 2 |
Messages: | 38,886 |