Vrscript
More actions
| VrScript | |
|---|---|
| Information | |
| Type | Scripting environment |
| Industry | Virtual reality |
| Developer | John Carmack (Oculus) |
| Operating System | Android |
| Supported Devices | Samsung Gear VR |
Vrscript (usually written VrScript) is a scripting environment using the Scheme language used for developing virtual reality apps. Created by John Carmack, then CTO of Oculus, it was first described publicly in June 2015 and was demonstrated during Oculus Connect 2.[1][2]
The environment targeted mobile VR on the Samsung Gear VR. A script could be downloaded from a link and run by NetHMD, a single signed Oculus app; bundled into an ordinary Android app; or run from a PC that drove NetHMD live during development.[1][2] Carmack used Racket, a Scheme dialect, as the desktop development environment and Chibi Scheme as the interpreter embedded in the Android app.[1]
History
Carmack introduced the project on the racket-users mailing list on 23 June 2015 (Pacific time), asking whether other Gear VR owners who used Racket wanted to discuss "the work I am doing with driving VR by Racket/Scheme".[3] A longer message the same day described it as "the first preview of the general purpose VR scripting environment I have been working on" and listed six sample scripts hosted on an Oculus content server: home, office, shader, spin, text-panels and reversi. The Android application itself was not attached to the public post.[1] In a follow-up on 1 July 2015, Carmack wrote that he was "only three weeks into this project".[4] SD Times reported on the plans the same day.[5]
On 4 September 2015 Oculus published the schedule for Oculus Connect 2, which listed a "Live Coding Demonstration with John Carmack, CTO, Oculus" alongside his talk on the technical details and future plans of mobile VR development.[6] Road to VR's copy of the schedule described the session as a demonstration of "the process of developing a simple VR application using a new development environment for rapid development and open deployment on Gear VR", also covering media processing, remote development, deployment and multi-user setup. It was set for 60 minutes at 10:00 AM on Friday, 25 September, the last day of the 23-25 September conference at the Loews Hollywood Hotel.[7] Road to VR identified the environment by the name VrScript ahead of the event.[2] A recording titled "Oculus Connect 2: Live Coding Session with John Carmack" was published on YouTube on 4 November 2015 by the channel now named Meta VR, and runs about 65 minutes.[8]
Motivation
In the June 2015 preview, Carmack gave three reasons for the project. He wrote that "Doing VR GUI development in the native apps is unpleasant", since work in C++ with the existing interfaces had slow iteration and awkward code structure. Unity allowed in-editor prototyping, but he described its on-device testing cycle as "terrible" and said developers ended up with the bulk of Unity and poor access to native VR features such as Timewarp layers. Finally, app signing on the platform gave developers no way to share work casually with each other or with small communities.[1][2]
He also said he was "favoring ease of development over performance" and that the system would not suit many tasks, though he expected that the first-party apps Oculus had built so far could become candidates for this style of development once it matured.[1] In a later message he noted that "creative-types" were learning Unity to accomplish fairly simple media tasks, and that he hoped to make this easier for them with domain-specific helper libraries.[9]
Design
Deployment modes
Carmack's preview described three ways to run a VrScript program.[1][5]
| Mode | How the script runs | Intended use |
|---|---|---|
| Web like | Downloaded from the network each time it runs and executed by NetHMD, a single signed app supplied by Oculus; the experience is fully specified by an app-scheme URI | Launching VR experiences directly from web pages or Facebook app-links; scripts can link to other scripts without leaving VR |
| App like | Bundled into a conventional APK and distributed through the store | Using the scripting layer as a development environment for some classes of applications |
| Remote development | Executed in an IDE on a PC, communicating with NetHMD on the phone over a TCP connection | Sub-second iteration from code change to change in VR, and use of a debugger |
For the web-like mode, Carmack described a user reading about an experience while browsing on a phone, clicking the link and being prompted to insert the phone into the headset. He noted that this mode had no direct monetization, although in-app purchases could be supported later.[1]
Language and runtime
Carmack expected the choice of Scheme, a Lisp dialect, to be "controversial" and said C# and JavaScript versions could follow if the approach worked out.[1] He used Racket and its DrRacket IDE on the PC and Chibi Scheme on Android, noting that Racket is "a very extended Scheme targeted at desktop apps" while the embedded version implemented only the basic standard. For remote development, a developer placed the script together with two support files, vr.rkt and remote.rkt, in one directory, entered the phone's IP address on the script's last line, and ran it from DrRacket; NetHMD then switched from its home screen to the test scene. Texture, model and sound resources were loaded and cached from network URIs.[1] SD Times quoted him as saying that he "started out with a pure-functional scripting interface, but it very rapidly became imperative".[5]
Asked on the mailing list why he chose Scheme, Carmack wrote that he did not claim to have evaluated every option. He said Java or C# would have been more familiar to game developers, but he did not want to bring in the bulk of a JVM or .NET system; JavaScript would have been more familiar to web developers, but he had "basically no experience with javascript". He cited S-expression reading and writing as "a strong factor for network communication" and the availability of Scheme implementations that interpret, compile or compile to C.[9] In the 1 July message he said that using read/write of S-expressions as a wire protocol, instead of a hand-crafted binary format, had been "a significant win", and that most users would not touch OpenGL at all but would move pre-built models around, play sound effects and start movie clips.[4]
Intended applications
Carmack's "reference application" was the linking of multiple panoramic photos with text and audio annotations, which he described as not performance sensitive and simple enough that a non-programmer could copy and modify the script. He planned an ExoPlayer interface to add static prop models to panoramic video, link between videos, and merge models or panoramas with video that is not fully panoramic, such as GoPro footage. Hooking up Oculus's social interfaces was meant to make it easier to build simple multi-user "activities" such as board games and card games, a Social VR use that Road to VR also highlighted as networked activities. He added that the system already helped with graphics work, since a developer could position a few quads with a custom shader and iterate on the shader remotely without rebuilding.[1][2]
Reception
In a guest article for Road to VR in November 2015, Sophia Dominguez collected four reactions from Tony Parisi, whom the article described as the creator of VRML, after he saw the environment at Oculus Connect. Parisi welcomed the effort because "Oculus is pushing casual use of VR" and more people than expert programmers should be able to build for it. He questioned whether Scheme would see wide adoption, noting that Lisp "has many fans in research circles" and called the JavaScript layer that Carmack had mentioned as a possibility "promising". He also said many developers would want to target several VR platforms, not only Gear VR. The article connected VrScript's web-like linking model to Parisi's long-standing call for VR that opens from a hyperlink without a download, quoting him: "Why can't we just click a link, or type a URL, and instantly enter virtual reality?"[10]
Sample scripts
A GitHub repository published by a third party collects twelve Racket files attributed to Carmack, among them the vr.rkt and remote.rkt support files and samples such as home.rkt, reversi.rkt, shader.rkt, text-panels.rkt, tour.rkt, gopro.rkt and voice-around.rkt. Its README states that the scripts and their git history "were reconstructed from snippets posted online".[11]
See also
References
- ↑ 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 John Carmack (2015-06-23). "Gear VR". racket-users mailing list (The Mail Archive). https://www.mail-archive.com/[email protected]/msg27523.html. Retrieved 2026-09-27.
- ↑ 2.0 2.1 2.2 2.3 2.4 Ben Lang (2015-09-06). "Oculus CTO John Carmack Will Demo His 'VrScript' Environment at Connect". Road to VR. https://roadtovr.com/oculus-cto-john-carmack-will-demo-his-vrscript-language-at-connect/. Retrieved 2026-09-27.
- ↑ John Carmack (2015-06-23). "Gear VR". racket-users mailing list (The Mail Archive). https://www.mail-archive.com/[email protected]/msg27520.html. Retrieved 2026-09-27.
- ↑ 4.0 4.1 John Carmack (2015-07-01). "Gear VR". racket-users mailing list (The Mail Archive). https://www.mail-archive.com/[email protected]/msg27590.html. Retrieved 2026-09-27.
- ↑ 5.0 5.1 5.2 Rob Marvin (2015-07-01). "Oculus CTO John Carmack is developing Scheme scripting language for VR". SD Times. https://sdtimes.com/john-carmack/oculus-cto-john-carmack-is-developing-scheme-scripting-language-for-vr/. Retrieved 2026-09-27.
- ↑ "Announcing Oculus Connect 2 Schedule, Talks, and Speakers". Meta Quest Blog. Meta. 2015-09-04. https://www.meta.com/blog/announcing-oculus-connect-2-schedule-talks-and-speakers/. Retrieved 2026-09-27.
- ↑ Ben Lang (2015-09-04). "Oculus Announces Connect 2 Schedule, 3 Days Full of VR Knowledge-building". Road to VR. https://roadtovr.com/oculus-announces-connect-2-schedule-3-days-full-of-vr-knowledge-building/. Retrieved 2026-09-27.
- ↑ "Oculus Connect 2: Live Coding Session with John Carmack". YouTube. Meta VR. 2015-11-04. https://www.youtube.com/watch?v=ydyztGZnbNs. Retrieved 2026-09-27.
- ↑ 9.0 9.1 John Carmack (2015-06-25). "Gear VR". racket-users mailing list (The Mail Archive). https://www.mail-archive.com/[email protected]/msg27538.html. Retrieved 2026-09-27.
- ↑ Sophia Dominguez (2015-11-16). "4 Thoughts on Carmack's 'VrScript' from Tony Parisi, Creator of VRML". Road to VR. https://roadtovr.com/4-thoughts-on-carmacks-vrscript-from-tony-parisi-creator-of-vrml/. Retrieved 2026-09-27.
- ↑ "vrscript-samples: Some vrscript samples by John Carmack". GitHub. https://github.com/jb55/vrscript-samples. Retrieved 2026-09-27.