EverFramework - For those struggling with FilteringEnabled

I’ve noticed a lot of people have trouble with FilteringEnabled however I believe it is one of the best things we can have. I’ve made a framework for myself but have decided to let you guys use it too. It currently isn’t finished however I’ll release updates for it here.

So what is it? This is a framework to make replication on FilteringEnabled amazingly easy. It will auto replicate everything you need it to allowing you to focus more on developing the fun parts of your games. This framework does enforce you to use OOP. A guide for OOP can be found here - http://developer.roblox.com/forum/development-discussion/8621-all-about-oop


[size=4][Current Features][/size]

Auto class Serialization, just call class:Serialize() and you will be provided with all the data of your class in a neat table
[ul]
[li]Allows you to store custom OOP objects in a datastore[/li]
[li]Allows you to replicate data easily[/li]
[li]Only one extra line is needed for this functionality[/li]
[li]Seamlessly handles object inheritance[/li]
[/ul]

Auto replicated function calls, just call class:FunctionCalled(functionName, args) when you want a function to be replicated
[ul]
[li]Call can be formed from either client or server[/li]
[li]Will propagate call to all clients[/li]
[li]If the object having the function called on does not exist on either the server or any clients they will auto create said object[/li]
[li]Adjustable minimal time interval to stop spamming up the network even if you spam your function[/li]
[/ul]

White-listed filtering on replicated changes
[ul]
[li]Yes there is filtering on a framework to help ease the trouble of filtering (I do what I want)[/li]
[li]Prevents client from sending changes from objects it isn’t meant to[/li]
[li]Can change white listed objects during run time[/li]
[li]Server has it’s own white list and will prevent changes from objects that are not supposed to be changed client side[/li]
[li]Prevents hacked clients from sending changes to critical objects[/li]
[/ul]

Automatic server side sanity checks
[ul]
[li]Any sanity checks made client side will also be called sever side without any extra code[/li]
[li]Prevents hacked clients from abusing the framework[/li]
[li]Other clients wont see any hacked changes[/li]
[/ul]

[size=4][Planned features][/size]

Object streaming
[ul]
[li]Allows you to choose when to replicate changes, allowing for potentially huge worlds[/li]
[/ul]

Automatic state enforcement
[ul]
[li]The state of objects will be replicated every x time interval to prevent clients becoming out of sync[/li]
[/ul]

[size=4]How to use?[/size]

(Please ensure you understand how the OOP system from the tutorial above works)

I tried making this framework as lightweight and simple to use as possible. Currently there are 5 things you must add to your class.

[ol]
[li]Your class must inherit the Replicateable class (this will also make the class inherit the Serializable class)[/li]
[li]Your class must have the variable Class.SerializableVars (this is used in the object serialization)[/li]
[li]Your class must have the variable Class.ClassName (this is used in object creation)[/li]
[li]Your class must have the variable Class.ConstructorArgs (this is also used in object creation)[/li]
[li]Your class must have the variable Class.ClientPriorityPossible (this is used in replication filtering)[/li]
[/ol]
(Sounds overwhelming and a lot but trust, it isn’t)

Here is an example of me adding those to a class I made to test this system. (Red box is those variables being added)

[ul]
[li]Class.SerializableVars is a table of the variables names you want to have saved when the object is serialized (should contain all the information you need to recreate the object)[/li]
[li]Class.ClassName is simply a string of the Class’ name.[/li]
[li]Class.ConstructorArgs is a table with the variables names used to construct the object (NOTE the order of these names is very important!)[/li]
[li]Class.ClientPriorityPossible is a bool for if the client is allowed to submit changes to the server or not. true = yes false = no[/li]
[/ul]

When calling Replicateable.new() there is a single argument taken. This is whether this object is supposed to be replicating function calls or not.

Right now all that is out the way here comes the fun part. All you need to do to replicate your object is call
self:FunctionCalled(“FunctionName”, timeInterval, args) after you have done all your sanity checks and the object will replicate perfectly!

Here is an example of what I did in my test class!

[size=5][size=6]LINK TO MODEL[/size][/size] - http://www.roblox.com/EverFramework-item?id=184563052
Just stick it in ReplicatedStorage along with your classes.

Hope it helps!

My hero.

I have made something similar but never released it. Props to you for beating me ;;
#OutOfAJob
#;
;
#hashtag

“I should really start learning Filtering Enabled already”

  • Me the past months
    “But it’s really hard and confusing and kind of throws off all logic I know about coding already”
  • Also me the past months

Thanks for this, the first official tutorial I’ve seen, I’ll be reading later, I may (will) have questions

Oh my goodness, thanks for this! I was worried about whether it was worth it to take the extra time to make my games “unhackable” (That’s what I was most concerned of with FE) This really saved me.

Thanks again!