Commit Graph

19 Commits

Author SHA1 Message Date
MrStonedOne
fd80575f38 Removes a bunch of sleep(-1) and spawn(-1) from the code
This seems to be causing issues where if the queue was too long, byond would attempt to process through all of it while hanging everything else.
2016-01-04 15:17:12 -08:00
Bjorn Neergaard
a2bb279164 NanoUI is now 'tgui' 2016-01-01 17:47:44 -06:00
Bjorn Neergaard
75f26e18ac Shrink NanoUI by removing library; tidy up code 2015-12-27 09:25:39 -06:00
Bjorn Neergaard
487942a09c Reduce NanoUI size by hosting fonts externally
Also resize Cryo to be more compact
2015-12-17 10:15:13 -06:00
Bjorn Neergaard
b00f19e8ee Compile NanoUI into two files 2015-12-17 10:15:11 -06:00
Bjorn Neergaard
15681a727e Combine NanoUI CSS into one file. 2015-12-17 10:12:07 -06:00
oranges
134a76cc8f Line ending apocalypse 2015-12-17 14:12:37 +13:00
Bjorn Neergaard
da4842dddf Make NanoUI resistant to Topic spoofs
Move Topic() into a NanoUI-specific ui_act proc
Update to @YotaXP's latest JSON code.
Return focus to the mapwindow if a key is pressed in a NanoUI.
2015-12-15 22:37:52 -06:00
Bjorn Neergaard
5678dfcbd1 Prefix everything with 'nanoui' to avoid conflicts 2015-12-15 13:12:33 -06:00
Bjorn Neergaard
c3442475fa Modularize CSS and JS; SVG
Purge NanoUI assets as we now have a gorgeous Nanotrasen SVG logo
Thanks to @YotaXP for helping me with cleaning up the logo
2015-12-15 13:11:56 -06:00
Bjorn Neergaard
f089428e63 Coffeescript; Bower; Gulp; asset_cache
We now write frontend code in Coffeescript, alongside our LESS.
PostCSS adds hacks to make CSS work on old versions of IE.
Bower is used to manage dependencies.
Gulp is used to build the code.

Images are dropped in favor of SVG or CSS effects.

NanoUI is now a 'simple' asset in the asset_cache
2015-12-15 13:09:51 -06:00
Bjorn Neergaard
979e71ea26 Restructure NanoUI frontend; use build tools
Yes, you now need Node.js... I'm sorry, but this makes
it so much easier to write NanoUI.

We now precompile all the things...
2015-12-15 13:09:04 -06:00
Bjorn Neergaard
8fdfa08e58 Port NanoUI styles to LESS 2015-12-15 13:08:27 -06:00
Bjorn Neergaard
97ca70cd34 Rework Master Controller, Failsafe, and Subsystem code 2015-12-04 15:40:58 -06:00
Kyle Spier-Swenson
59963b89b5 quant --> quaint 2015-11-29 08:00:33 -08:00
MrStonedOne
921c9eede1 Asset cache Fixes
Fixes asset cache locking up the MC initialization at world start.
Fixes asset cache not pre-loading resources to clients that connect from a world reboot.
Fixes a null reference runtime relating to the client disconnecting at the wrong time (I still conciser this to be a byond bug)
Fixes crew monitor registering assets because they exist
Fixes crew monitor trying to send zlevel assets for zlevels it hasn't processed.
Fixes nano ui sometimes not sending the template asset to the client on open.
2015-11-29 07:19:49 -08:00
Bjorn Neergaard
6005d54d40 Update NanoUI to use the asset_cache system
Also move a bunch of folders around.
2015-11-28 00:56:30 -05:00
MrStonedOne
ca4f4201e7 Asset Cache improvements!
Adds crew monitor to the asset cache system
Adds paper to the asset cache system

Added a way to send files to the client slowly without clogging up the queue. (This isn't technically "safe", but the client would only have issues if they didn't have that file already (rare), and only if they used a window that needed that asset (currently only nanoui windows) within the first 15 to 90 seconds of connecting (depending on ping))

Makes NanoUI use this slow send system to blindly send it's asset files. (Once bay's nanoui is ported, i'll improve this so that nanoui fully implements asset cache checking)

Makes asset cache use this system to send all registered asset files, so that ui windows don't have to wait for them if the client's been connected a while.
2015-11-25 02:11:04 -08:00
MrStonedOne
c784ca902e Ports /vg/'s asset cache system; lowers interface lag when clients connect.
Byond will queue all browse(), browse_rsc(), and winset() calls to the client, to ensure they load in order, and ensure any resources from a browse_rsc call (css/html/js) are already at the client by the time any html windows loads.

How ever, each file is processed separately, and byond will wait for the reply from the client before it will send the next file.

Our current system sends all of these html resource files to the client at once when they connect, this is the sole cause of the lag when a client connects. Byond will not send the client a file it already has, but it has to ask the client first, and it does so one file at a time, waiting for a reply from the client before sending the next one down the pipe.

This system fixes that.

Basically it works like this:
Client connects: nothing happens, no massive queuing of browse_rsc() calls, so no interface delay
Client opens a asset_cache controlled html based interface
Asset cache gets notified by the html based interface what assets the client needs to have.
Asset cache checks to see if it's sent that client those files.
Asset cache sends the missing ones, adding them to the list of assets the client has.

This basically spreads out the delay to when you first open a window that uses resources, where it is much more manageable.

I've kinda done a halfass port without too much thought, I see some room for improvement to better fit /tg/'s coding style and make the system more flexible. I'm PRing this because if I don't, it will never get finished.

PDAs and html_interface has been imported in to the new system lazily to test. at 100ms connection start interface lag went from 35 seconds to 16 seconds. Nanoui hasn't been imported, and once it is, that should drop down to almost nothing.

I'll work on this some more after some sleep.
2015-11-15 23:49:05 -08:00