Try   HackMD

Meta Shortcut Format

This format specification is to help 2D & 3D frontends dynamically generate rich presence representations for generic shortcuts within their environments.

Originally published February 2019

Website: https://github.com/smsithlord/MetaShortcutFormat

tags: devlog janus msf

By treating shortcuts as distinct objects with fields as specified in this document, any capable 2D or 3D engine can efectively be an open-ended metaverse browser.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

A meta shortcut is very much like a regular desktop shortcut, but with a few extra fileds that (1) make it suitable to represent mixed web/local shortcuts, (2) make it far more capable of generating a rich presence for itself within a 2D or 3D environment, and (3) provide enough meta data for shortcuts to be used in a mutliplayer environment effectively.

Meta shorcuts are engine agnostic. They are purely a way to represent shortcut meta data.

Examples

Pulling games out of a website and spawning them as 3D object shortcuts

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Watch on Youtube: https://www.youtube.com/watch?v=IY2pqxmeY6Y


As long as there's no road bumps around CORS w/ loading textures or with dynamically texturing object instances, then Janus is more than capable to support everything that AArcade.js would need. I would consider getting to PHASE 1 VICTORY, or anything beyond, a success.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Phase 1

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

MSF + 1 on 1 shortcuts is what it's about, the user and their media.

Read this first: https://github.com/smsithlord/MetaShortcutFormat

What does Phase 1 look like?

https://itch.io/games/html5

Example json:

{"title":"Neon Drive","file":"steam://run/433910","screen":"http://cdn.steamstatic.com/steam/apps/433910/header.jpg","preview":"http://www.youtube.com/watch?v=UTkioWWjpsw","reference":"http://store.steampowered.com/app/433910","type":"pc"}

{"title":"SuperSmashLand","file":"SuperSmashLand.exe","screen":"http://www.supersmashland.com/imgs/screenshot1.png","marquee":"https://i.ytimg.com/vi/KVROb_FPZCc/maxresdefault.jpg","preview":"https://www.youtube.com/watch?v=351CO5_8fbM","download":"http://www.supersmashland.com/","reference":"http://en.wikipedia.org/wiki/Super_Smash_Land","description":"Super Smash Land is a demake of Super Smash Bros. released in September 14, 2011 by Dan Fornace. The game features 6 playable characters and 11 stages. The game visual design resembles the graphics from the Nintendo Game Boy. The game was developed with GameMaker 7.","keywords":"retro, nintendo","type":"pc"}

{"title":"The Simpsons","file":"https://www.hulu.com/the-simpsons","screen":"http://a248.e.akamai.net/ib.huluim.com/show_key_art/58?size=1280x720","marquee":"http://assetshuluimcom-a.akamaihd.net/h2o/facebook_share_thumb_default_hulu.png","description":"Watch The Simpsons online. Stream episodes and clips of The Simpsons instantly.","keywords":"homer, bart","type":"tv"}

Three.js examples (put json from the github into the URL bar to see it change)

What would be the best way to

Elation engine: assets.js

https://github.com/jbaicoianu/elation-engine/blob/master/scripts/assets.js

Janusweb test sites

Arcade cabinets (2): https://my.mixtape.moe/xvwfrv.zip

Notes:

The best way is to use custom elements to define something like a <arcadecabinet> tag, which takes some attributes pointing to the metadata URLthen you pull the script that define that custom element into your room, and spawn some either in the markup or with room.createObject() then in your js for that component, you can look at this.objects['3d']

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

You can always access the raw three.js objects as .objects['3d']

The quickest way to find any meshes belonging to the object is with .parts for example in that room, room.objects['jin_8749-1-1540861159'].parts.wood_cabinet.objects['3d'] is the mesh

Can we export a Janus-friendly OBJ where the materials can easily be dynamic?

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

https://github.com/jbaicoianu/janusweb/wiki/Scripting-Support-2.0

Roadblock 2: CORS

"If Janus is able to load images form URLs of a different domain and use them as textures, I could get it all plugged in, but CORS has been my road block with Three.js and I assume Janus will have the same limitation there."

Janus indeed runs a CORS proxy for doing that.

Notes

There might be a couple levels of hierarchy to find the THREE.Mesh object, but then you can do whatever you want to the underlying material

THREE.ImageUtils.loadTexture is depreciated

we might run into issues when trying to create 2 instances of the same model that use different texture overrides though and if we are forced to keep a separate set of geometry in memory for each instance of a cabinet model that wouldn't be ideal but won't come to bite us until phase 3

Questions

What is "this" referring to in the line containing "this.object = mesh" ?

https://github.com/jbaicoianu/elation-engine/blob/master/scripts/systems/render.js#L1350

https://github.com/jbaicoianu/elation-engine/blob/master/scripts/materials.js

*** This is what we were looking for, need to have access or know how the THREE.Mesh object from in-game javascript code traverse the mesh, gives it new materials, and can take it from there.

https://github.com/jbaicoianu/elation-engine/blob/master/scripts/assets.js#L1277

we might run into issues when trying to create 2 instances of the same model that use different texture overrides though

"This line is how I do the texture replacement on the OBJ in the native three.js version"

https://github.com/jbaicoianu/elation-engine/blob/master/scripts/assets.js#L308

http://aarcade.tv/view.html?item={"title"%3A"STAR WARS™ Jedi Knight%3A Dark Forces II"%2C"file"%3A"D%3A\\SteamLibrary\\steamapps\\common\\Star Wars Jedi Knight\\JK - Shortcut.lnk"%2C"screen"%3A"http%3A%2F%2Fcdn.akamai.steamstatic.com%2Fsteam%2Fapps%2F32380%2Fpage_bg_generated.jpg"%2C"marquee"%3A"http%3A%2F%2Fcdn.akamai.steamstatic.com%2Fsteam%2Fapps%2F32380%2Fheader.jpg"%2C"preview"%3A"https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6EAjxp81SaM"%2C"reference"%3A"http%3A%2F%2Fstore.steampowered.com%2Fapp%2F32380"%2C"type"%3A"pc"}

SUCCESS

MSF janusweb component: https://github.com/madjin/janus-custom-components/blob/master/media/index.md#msf

source: https://github.com/madjin/janus-custom-components/blob/master/media/msf/aarcade.js

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

You specify the json in the markup, or a url to fetch the json from as an attribute. Can also specify which 3d model to use, and the names of the parts for screen, marquee, etc

<aacabinet cabinet_id="arcademachine" js_id="supersmashland" marquee_part_name="cabinet-marquee" msf='{"title":"SuperSmashLand","file":"SuperSmashLand.exe","screen":"http://www.supersmashland.com/imgs/screenshot1.png","marquee":"https://i.ytimg.com/vi/KVROb_FPZCc/maxresdefault.jpg","preview":"https://www.youtube.com/watch?v=351CO5_8fbM","download":"http://www.supersmashland.com/","reference":"http://en.wikipedia.org/wiki/Super_Smash_Land","description":"Super Smash Land is a demake of Super Smash Bros. released in September 14, 2011 by Dan Fornace. The game features 6 playable characters and 11 stages. The game visual design resembles the graphics from the Nintendo Game Boy. The game was developed with GameMaker 7.","keywords":"retro, nintendo","type":"pc"}' pos="0 0 -2" scale="1.25 1.25 1.25" screen_part_name="screen"/>

<aacabinet cabinet_id="arcademachine" js_id="neondrive" marquee_part_name="cabinet-marquee" msf='{"title":"Neon Drive","file":"steam://run/433910","screen":"http://cdn.steamstatic.com/steam/apps/433910/header.jpg","preview":"http://www.youtube.com/watch?v=UTkioWWjpsw","reference":"http://store.steampowered.com/app/433910","type":"pc"}' pos="-1 0 -2" scale="1.25 1.25 1.25" screen_part_name="screen"/>

<aacabinet cabinet_id="arcademachine" js_id="simpsons" marquee_part_name="cabinet-marquee" msf='{"title":"The Simpsons","file":"https://www.hulu.com/the-simpsons","screen":"http://a248.e.akamai.net/ib.huluim.com/show_key_art/58?size=1280x720","marquee":"http://assetshuluimcom-a.akamaihd.net/h2o/facebook_share_thumb_default_hulu.png","description":"Watch The Simpsons online. Stream episodes and clips of The Simpsons instantly.","keywords":"homer, bart","type":"tv"}' pos="1 0 -2" scale="1.25 1.25 1.25" screen_part_name="screen"/>

It's possible to use this for arbitrary models, as long as they're split up with separate named objects for those parts

Added <paragraph> descriptions that show on mouseover

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Demo

Import / Export

Current list of ported assets: http://assets.metacade.com/anarchyarcade/

Including a few more such as:

  • lappy
  • brainiac
  • single_car_racer
  • icade

UPDATE 2/18/19

AArcade is able to export JML containing the MSF of any object.

Export panel in AArcade

<aacabinet cabinet_id="arcademachine" controlpanel_part_name="cabinet-front"  marquee_part_name="cabinet-marquee" pos="0 0 0" scale="1.0 1.0 1.0" screen_part_name="screen" msf='{"title":"STAR WARS™ Jedi Knight: Dark Forces II","file":"JK - Shortcut.lnk","screen":"http://cdn.akamai.steamstatic.com/steam/apps/32380/page_bg_generated.jpg","marquee":"http://cdn.akamai.steamstatic.com/steam/apps/32380/header.jpg","preview":"https://www.youtube.com/watch?v=6EAjxp81SaM","reference":"http://store.steampowered.com/app/32380","type":"pc"}'>

Result displayed in janusweb site


Notes

We need a system to teleport the web tab around and resize it for each cabinet. It takes a dictionary of cabinet to web tab position/size/rotation transforms - you gotta be able to set the physical space width & height, postion, and rotation.
The web tab asks the active cabinet where the screen should go, the active cabinet (hover on) tells it where, and then websurface appears. With this, Janus would be indistinguishable from AA.

Anarchyville

Drawing of Anarchyville made by Sithlord

Just a flat plane isn't cool enough of a 'grid' that some others like Decentraland or Cryptovoxels are building. Also, letting n00bs throw their shit into blocks on a grid of a community map turns into a lag fest and doesn't take advantage of optimizations within the engine like portal culling.

In AArcade each block on your grid starts empty and you can choose who's block gets put there that way you can make a grid full of blocks that you actually like. These are called "Nodes" and 1 block = 1 node, but in the case of Anarchyville 1 house in the neighborhood = 1 node.

There's a few other things you can do with these nodes. They are more generic and can be used in any 3d space that fits some general properties. We called them "Wall Nodes" or "Floor Nodes" where all you need is a blank wall or a blank floor space to spawn them. It is like letting your buddy decorate a wall in your world and anytime he/she updates the node, so does the collection spawned in your world as the node is remote referenced.

1

Open world with highly optimized houses that are rendered inside only when you are near it and within line of sight.

2

3

The inside is empty because it's a sandbox that you can populate with content or spawn somebody's pre-made house into it. You can be the landlord while others create the nodes. This idea also extends to spawning someone's wall node into one of your own single player desktops. For example, if you spawn your friend's music wall node then whenever he/she adds new music to the node you can see it in your map too.