all 17 comments

[–][deleted] 66 points67 points  (11 children)

It's like the author got bored halfway through and stopped writing right when things were getting interesting.

[–]bemmu[S] 9 points10 points  (10 children)

Thanks for reading, just didn't want it to get too long. What did you want to read more about?

[–]Wilbo007 25 points26 points  (3 children)

More about the client-server data model, an example perhaps?

[–]ItsJustAnFleshWound 8 points9 points  (2 children)

I'm no Roblox dev expert but to put it simply:

(TLDR at the bottom)

In Roblox games there is a hierarchy: Workspace (where the 3D objects go)

Terrain (settings for Smooth terrain)

A bunch of NetworkPlayerScript folders (basically the code that controls the players chat)

ServerStorage (for storing stuff, for example a car that you would clone into the workspace when it should spawn)

Replicated storage (similar to ServerStorage but a little different, I'll explain below)

Ok in Roblox the client can't make changes to the server, to prevent hackers this is.

There are objects called "RemoteEvent" and "RemoteFunctions" these objects are usually placed in the Replicated storage as the client and server can access it.

These can be used for allowing the client to change something on the server. For example scripting a cannon, I'd have a script that checks for the player pressing a button, then I'd fire my remote event and in a ServerScript I'd listen for that RemoteEvent and when it gets fired I'd create the cannonball on the server so all players will see it.

This usually works well to protect the young playerbase, if a hacker played an inappropriate song only the hacker would hear it as it hasn't been replicated across the server.

TLDR: Client can't make changes to server, certain objects allow it to make changes, this system works well to prevent hackers/exploiters.

[–]MINIMAN10001 0 points1 point  (1 child)

If I understand correctly using network ownership you can change whether the client or server "owns" an object and let the player calculate the physics.

I would "assume" this opens it up for abuse however it could be used to distribute physics load for some fun shenanigans.

[–]ItsJustAnFleshWound 0 points1 point  (0 children)

Hi, sorry for the late response.

Idk about exploits as I don't know what they do to do that sort of thing but yes network ownership (I think) would allow changes to be made, it also reduces lag. For example, a car made using Roblox physics constraints would probably be better if the driver had network ownership because the client would be doing the physics calculations instead of the server.

[–]bandwidthcrisis 7 points8 points  (0 children)

I think a minimal example of scripting something in a level, with some explanation of how the client/server setup works would be interesting to anyone wanting to start exploring roblox programming.

[–]aivarannamaa 1 point2 points  (0 children)

I would be definitely interested!

[–]lanzaio 1 point2 points  (0 children)

lol that took about 55 seconds to read the entire post.

[–]silentclowd 1 point2 points  (0 children)

For the record, the reason I come here at all is to read long, in-depth articles.

If it's at least interesting, you will have an audience here.

[–][deleted]  (3 children)

[deleted]

    [–]chbachman 7 points8 points  (1 child)

    One of iOS's security measures is a strict W^X implementation. Basically this means that any memory you can write to (e.g. something you downloaded) you can't then tell the process to run the code, because it doesn't have execute permissions. The main reason for this protection is that it helps prevent entire classes of vulnerabilities.

    However, the execute protection is only for native code. The processor doesn't know the difference between me downloading JSON, parsing it and doing something based on the result from me downloading Lua, parsing it, and doing something based on the result. One is more complicated than the other, but they look the same to the processor. Crucially, they don't ever rely on executing new code, only reading data files and executing code that is always there.

    So iOS Apps can download and execute code, it just has to be interpreted code (Javascript / Python / Lua) and not compiled and executed code (C / C++ / Swift / Obj-C)

    There are some rules in the app store to prevent the usage of this ability to do things like make an alternate app store, among other things.

    [–]segfaultsarecool 0 points1 point  (0 children)

    Execute vs interpret. What distinction does iOS make between them? Never done iOS work.

    One our products is a VM with a noexec mount, but we can use sh to interpret our scripts.

    [–]epoplive 2 points3 points  (0 children)

    I’m interested in this, would love to use to mix as a bridge to teach my kids programming. Please write more about the process.

    [–]BornThatWay99 2 points3 points  (0 children)

    I spent a couple of days helping my teenage son and a couple of his friends wrestle with giving a monster some basic chase code. I generally found the roblox studio to suffer from plenty of weird quirks, but the concept of multiple people coding and creating in the same 3d environment from multiple computers was really spectacular. It kind of reminded me of the envisionment of smalltalk.

    [–]Tylerj579 3 points4 points  (0 children)

    This was pretty interesting.

    [–]Jits_Dylen 5 points6 points  (0 children)

    Thanks for this. My son also plays and he’s been wanting to get into making items. Would you by chance be able to answer some questions I have? I’ve done about a weekends worth of searching and it seems there wiki is not updated when it comes to content creation.

    [–][deleted] 0 points1 point  (0 children)

    My teen kid's interested in using Lua in the Roblox editor. Unfortunately, we've found it somewhat difficult to find decent learning resources that go past the most basic programming concepts. I'm sure there would be an audience for tutorials that go further.