Dev and Ship, Shot Mono in the editor, preview tabs and ruffled pools
ShotScriptStroke Engine

Dev and Ship, Shot Mono in the editor, preview tabs and ruffled pools

By ShotScript Team and Stroke Engine Team

Here is everything that went live on Monday, 23 November, and late on Sunday night: ShotScript scripts and extends blocks can be Dev or Ship, ShotScript Editor draws your code in Shot Mono and opens jumps in one italic preview tab as Studio does, Shot Mono comes in seventeen weights, and Stroke Engine's still pools ruffle in the wind while its denoiser keeps the grain of wet streets. Dev and Ship come first: code meant only for Studio can now say so, and ship code that reads it shows an error.

Dev and Ship

  • Pick a .shot script and Properties shows a Build list: Both, Dev or Ship. In ShotScript Explorer, Dev scripts get a hammer and Ship scripts a box.
  • Set a module's Build to Dev, and a plain use of it elsewhere shows its error at once. Back to Both clears it.
  • Members in a dev extends X block exist only in Dev, made under if __dev then.
  • Ship code that reads a member a dev extends block adds shows as an error, as it does for a dev class.
  • A side word and dev or ship go in either order: client dev extends X and dev client extends X both mean client members, in Studio only.
  • dev now draws red and ship green, their else and end too, also in a dev or ship value over several lines.
  • With the Ship switch on, a Command Line run of dev do works, and computer reads with no error.
  • file. offers readNow, readStudio, write and create. Reading computer in code that isn't Dev shows a red error, and none inside dev do.
dev extends Shop {
    public Trace()
        print(self.Items)
    end
}

Shop's objects have Trace only in Dev. The Classes page has its ship extends twin, and Systems shows a whole script set to Dev or Ship.

Shot Mono

  • ShotScript Editor tabs now draw your code in Shot Mono, each word group in its own weight, from thin types to black class names.
  • Docs and comments draw in the font your code uses.
  • Shot Mono now comes in seventeen weights, Thin to Black: eight new weights sit between the nine named ones, all on the same grid so your columns never move.

Download it from its Shot Mono page, free under the SIL Open Font License. The zip holds the variable font, all seventeen weights as TTF files, the license and a readme.

Preview tabs and jumps

  • Go to Declaration, Quick Open and a click on a problem share one italic preview tab, as in Studio. An edit in it keeps it.
  • A Find in Place result in a script with no tab opens the italic preview tab, and the next result takes its place.
  • Double-click a script in Explorer while a preview tab shows, and its new tab takes the preview tab's place.
  • When F12 or Go to Declaration opens a new tab, your keyboard lands there with the name selected, and Alt+Left takes you back.
  • When a Find in Place result opens a script whose tab is already open, one Alt+Left takes you back where you were.
  • A tab whose script you moved to another folder reopens on it after a restart. One whose script is gone closes once for good.
  • While a place's tabs reopen, a script you double-click in Studio's Explorer comes to the front and stays there.
  • With text wrap on in Studio's Script Editor settings, ShotScript Editor tabs wrap long lines at word breaks, at the editor's width.

Writing code

  • Press Enter at the end of a whole one-line match in braces, and a new line starts at its indent with no end added below. The same goes for a one-line server { y() } or client { x() }.
  • In constructor async fromAsset(...), async now colours as a keyword, and the name keeps its constructor colour.
  • In Light, with the caret at either brace of a multi-line block, both braces show a clearer grey.
  • In Light, while a search has hits, each hit's line gets a pale yellow tick on the scroll bar, as in Studio. Esc clears them.
  • Type in the find bar and its first hit at or after your caret is the current one. Enter goes on from there.
  • With the completion list open, Backspace filters it again on the shorter word. It closes once the word is gone.
  • Typing on the last visible line of a script tab opens the completion list without scrolling the script.
  • After you add or remove lines above a call, hovering it shows that call's own card, not the card for what was there before.
  • On an edited tab, hovering a method that returns another script's class shows that class's outline, and go-to on the type opens its script.
  • Comparing two objects, and c and a or b under a written type, need no cast. A cast that does nothing warns, with a fix.

Rule lines and docs in code

  • A shape at a ─ line's start or end colours the whole line as one joined rule, in the shape's own colour. A one-line picker offers the shapes.
  • On a ─ line, Left and Right move the caret four dashes, Shift selects four, Backspace takes four, and one Ctrl+Z puts them back.
  • A doc starting «◆ or ‹◆ shows both side by side on every line, and the shape picker sits right of its closing » or ›.
  • A ‹ › short doc's dot and its opened text draw whiter than a « » doc's.
  • A system script returning its own module, with a doc block above a blank line, shows that doc on its Explorer card.

Classes and checks

  • print and tostring of a ShotScript class's object give <class X>, unless the class or a parent writes operator tostring.
  • Operators an extension script joins to a class reach its child classes: in Play, print of a child's object gives the joined text.
  • Inside extends X { }, naming X checks as in X's own script, and an operator the block adds makes a + b check clean.
  • A once member with no reach word is public, and called twice it runs once.
  • A plain public FillNumber in a child of a class with Fill as FillNumber is flagged, with a fix that writes override Fill as FillNumber.
  • Under a plain use script.Parent, reading that script by its own name is flagged once, with a fix that writes the as.
  • Writing a new system script into a system with a require cycle, or making the Type extensions script, keeps checking running, with no crash.

The Command Line

  • Pick an instance in ShotScript Explorer, then !sel writes a picked ModuleScript's require and !ref writes its path.
  • Starting a blank Server system script from the Command Line runs its server code with every module it uses.
  • computer.fetch(link, "GET", {}) now fetches with no extra headers instead of failing.
  • A Ctrl+Enter run keeps the Command Line's height and no longer squeezes the script above it.

Properties, Explorer and Problems

  • Pick a value from a list in Properties, such as RunContext, and one Ctrl+Z takes it back.
  • In Properties, picking Shared for a system script set to Server makes it a plain ModuleScript again, and one Ctrl+Z brings the Server script back.
  • After you pick Client in Studio's own RunContext on a server system, one Ctrl+Z brings the server Script back.
  • An asset's FileContext in Properties picks Shared, Server or Studio, and a Server asset shows its own icon in ShotScript Explorer.
  • Add an attribute through the Attributes + dialog, and the new attribute is selected and scrolled fully into view, as Studio does.
  • When keyboard focus moves from a script's text to Properties without a click, the keys you press keep going to the script.
  • In ShotScript Explorer, End selects the last item you can see, Ctrl+D puts each copy right under its original, and items with notes keep their note order.
  • A ShotScript Explorer card with a long doc stays within half the screen, its last shown line ending with dots.
  • Click a problem in Problems and the whole span its underline covers is selected, such as workspace.Hellx, even in a closed script.
  • Type a fix for an error and it leaves Problems within a second. A wheel notch moves three whole entries, as in Studio.
  • After an undo, Problems goes back to what you were looking at.
  • A floating dock dragged past the screen's edge comes back on screen after you hide and show it or reopen Studio.

Docs

  • Picking an item in the System Map shows its Docs where the Docs dock lives, not as a new middle column.
  • Close Studio and open the place again: every Docs tab comes back in order, on the page it showed, with your front tab in front.
  • Rename a script in Studio's Explorer and its Docs tab takes the new name and keeps your place.
  • A type's Docs page stays where you were through Play and Stop, and a Docs tab closed right after quick Back presses stays closed.
  • Double-click a member in the Docs outline and its script opens at that line without a pause.
  • Resize Docs on a long page and it follows at once. Back at its first width, the page looks the same.
  • On a Docs page, Ctrl+C copies your selection and Ctrl+A selects the whole page.
  • In Docs Find, F3 and Shift+F3 go to the next and previous match. Esc keeps your word, and a second Esc clears Find.
  • A click, scroll, key or new page no longer pops up a late hover card, and a card now opens above the name.

From early Saturday

These went live just after midnight on Saturday, 21 November, and missed that weekend's articles.

  • After a module's name and a dot, completion lists its own members and no global names. Between two dots, as in Wallet..new(, it lists the same.
  • An extends Parser block in another script reads T's names bare, like the class's body: inside braces, optional and union types, function and return types.

Stroke Engine

  • Weather gains Pool Roughness for ruffled pools and Film Peaks for glints on wet asphalt, Water gains Roughness for softer lakes, and ModelScatter can trace its copies as instances with far less memory.
  • Camera.ThinGapWater keeps mud that lies flush with a Water's surface from drawing a bright line along the shore.
  • Camera.DenoiseKeepsTexture keeps the fine grain of rough surfaces through the denoiser, so a lamp lit wet road keeps more than twice its texture. Later in the day it sampled each pixel's textures more finely, and by evening a lit wet road kept as much fine grain as a real photo shows, no more and no less.
  • Stroke's API reference now carries a plain one-line summary for every library and for Enums.

The Weather page has a third before and after pair, Pool Roughness, beside Wetness and Still pools. Here it is, with the wind off and on.

A cobbled courtyard after rain in front of a sunlit cream plaster wall, with a terracotta urn, a wooden bench and a round green shrub in a granite planter. Calm puddles on the cobbles mirror the wall, the urn, the shrub and the blue sky sharply.
Pool Roughness 0: the still pools lie calm and mirror the scene sharply.
The same courtyard with Pool Roughness 0.2: the puddles are ruffled, and their mirror of the wall, the urn, the shrub and the sky is soft and broken.
Pool Roughness 0.2: wind ruffles the still pools and blurs what they mirror.

On the site

  • Short code in the docs stays whole on its line, linked code and table cells too, even on phones.
  • On phones, docs pages show their cards up to 0.9 s sooner, and Stroke object pages paint their main picture about half a second sooner.
  • When the site's fonts arrive late, nothing re-wraps, and relative times like "6d ago" swap in without moving anything.
  • New tags stay put once the page loads.
  • Thin picture strips open full screen at a readable height, and you pan along them sideways.
  • A link that scrolls within the page, picked from the keyboard, moves your focus to the section it scrolls to, and the focus ring fades in.
  • On the ShotScript docs, an icon beside its kind's word is skipped by screen readers, so the word is read once.
  • Link previews were checked page by page: ShotScript pages share a lighter picture, and Stroke reference pages get their own descriptions and titles such as "Vector3 library".
  • Stroke reference pages say "0 or more" or "any value" where the engine sets no real upper limit, and Text2D.MaxVisibleGraphemes reads "-1 (all) or 0 and up".
  • The home page and Up and coming count days by the site's clock, and the home page's "updated" time counts up.
  • Search recovers when its index fails to load, and the contact form never sticks on Sending.
  • Short lines in Firefox, and the entries on New in ShotScript and New in Stroke Engine, end on one word less often, and the home page's video titles are balanced.
  • Code samples on the site colour async in constructor async as a keyword too.
  • The Weather page's switches load their pictures when you press them.
  • Types shows, with an example, the warning a script gets when it reads a name like PlayerData that is both a Roblox type and one of your own types it doesn't import, and Rules lists it with its fix.
  • Joint bylines break only between team names.