Ascii Patrol Forum

General Category => Development Progress => Topic started by: gumix on May 12, 2016, 09:59:44 am

Title: Improvments & Research (audio!)
Post by: gumix on May 12, 2016, 09:59:44 am
During making a campaign story I just couldn't resist making some additional research.

First of all good news for Linux TTY console players. Ascii Patrol will try to use raw keyboard input so even without running X11 there is a big chance to properly detect key presses and releases. Of course it can't be used while playing over ssh or even if game is started from another app like Midnight Commander (mc).

I've been scratching my head for a long time thinking about audio support in game. After intensive experiments I've came up with an idea of implementing sound using MIDI. Can sound pretty weird by now but in this way there are big chances to have sounds even when playing game remotely via ssh over laggy internet! MIDI also makes great support on all target platforms. Only real DOS systems like FreeDOS will require a real MIDI synthesizer hardware to be present, or at least some TSR MIDI emulation process will need to be started. DOS emulators (ie: DOSBox) will simply forward MIDI commands from MPU-401 ports to the host system. Windows has its General MIDI with Roland patches, Linux can use any software synthesizer attached to ALSA (ie: timidity). Web browsers need to support Web Audio, usually they simply forward MIDI commands to the host system. And now, the bad news: audio won't be implemented in first alpha release yet as this is too big part to be implemented quickly across all platforms.

Another new feature is going to be implemented, global hi-scores. Only gameplays results starting at the very first level will take part in it. After figuring out that freedos comes by default with WGET, decided I'll use it instead of CURL to send score data to server and get current hi scores to game. Of course web platform will not make use of wget, instead it will make requests directly.

PS, I made also a small fix for @Kyzrati suffering from GC lags in his browser :)

Well, that's all for today, getting back to work.
Title: Re: Improvments & Research (audio!)
Post by: Kyzrati on May 19, 2016, 04:17:37 am
PS, I made also a small fix for @Kyzrati suffering from GC lags in his browser :)
Yay :D. So it was the GC, after all?
Title: Re: Improvments & Research (audio!)
Post by: gumix on May 19, 2016, 03:53:49 pm
Can't be sure but probably it is. I'd also suspect some animated ads running on the other tab(s) too.
The fix simply detects a lag, in such case it doesn't let the game to advance game animation timer.
Currently threshold is set to 1/10 sec. (it is no fun to play with lower frame rates than 10Hz though).