Jump to content
  • entries
    941
  • comments
    5,894
  • views
    867,816

Publish your games directly to Steam with the Leadwerks game player


Josh

3,539 views

 Share

blog-0358273001401300862.jpgOne of the coolest things I'm seeing in Leadwerks 3 is a lot of minigames being made. These are finished products, without super high expectations, but they are complete, don't take long to make, and some are quite fun. Seeing these gave me an idea for a feature that's been in development in the background for some time, and when you see what it does, it will explain some of the design decisions I've made over the last few months.

 

The next build on the beta branch on Steam will support Lua sandboxing. Lua games can be sandboxed by passing "-sandbox" in the command line. This prevents the application from accessing file write and OS commands, and prevents Lua from loading external libraries. When games are launched from the editor, this is turned on by default:

blogentry-1-0-35126300-1401300256_thumb.jpg

 

Why is this cool? Sandboxing makes Lua code safe to run on any computer. Along with assets, games can now be published in the Steam Workshop beta. The editor has a new game player that lets you select a game you are subscribed to and play it, like the ones below from YouGroove and Rick:

blogentry-1-0-75781800-1401300507_thumb.jpg

 

This minimizes the editor window and launches the Lua executable found in the "Templates\Lua" folder. The selected game is passed to the executable in the command line, and the executable loads all game assets, scripts, and maps from an encrypted zip file containing the game contents. Because our own executable is being run with only sandboxed Lua code, it's safe to run any game in the Workshop. And most of the Lua games found in the downloads section of this site work with no changes, due to the stability and backwards compatibility of the Leadwerks 3 API.

blogentry-1-0-20256600-1401300495_thumb.jpg

 

We're filling the Workshop with content right now, including assets from "The Zone" project from Leadwerks 2, as well as third party content from popular artists. When the Workshop launches next month, you will also be able to publish your Lua games straight to Steam, with no approval process and no waiting period. You can update your game at any time to keep all your fans up to date, and you can safely play other people's games while always running the latest build of the Leadwerks executable.

  • Upvote 8
 Share

10 Comments


Recommended Comments

I've also got someone from Valve who is looking at the Linux build to see why SteamLib crashes on initialization.

Link to comment

Does the file write limitation include the LE File I/O commands or can those be used still for game save type data?

Link to comment

Right now only the automatic settings file is written, by the engine itself. What I might do is allow writing of files in a predetermined folder, with a whitelist of allowed extensions, like .cfg, .txt, .xml, etc.

  • Upvote 1
Link to comment

I think allowing the LE commands for I/O and that one for returning the right folder by platform to write too and only allowing those file types would be a great addition for saved games!

  • Upvote 3
Link to comment

We can turn the sandboxing off right? Some what makes it difficult to make applications and integrate networking via lua.^^^^^^^DISREGARD ALL OF THAT, I AM STUPID AND NO READ GOOD. Didn't look at the pictures at all.

  • Upvote 1
Link to comment

Yes, of course. But you cannot distribute a non-sandboxed game, as that would allow potentially malicious code to run, which defeats the whole purpose. Maybe I can add an option for the user to allow this, but it would come with a big warning.

Link to comment

If it its on steam I'm fine with that, but I would like to be able to write to the user/documents folder if I use other distribution methods. Or make a data visualization program that need to get data in random directories

Link to comment

Oh yeah, there's no limitations on that. Sandbox mode is by default off; it can only be activated with a command-line switch. By default, the editor passes this switch in the command line, but you can disable that also in the options.

Link to comment

Well, it's live on the beta branch now. If you subscribe to any item with the "Game" tag it will show up in the player.

  • Upvote 1
Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...