{"id":"asetasar/aseta-remotes","name":"aseta-remotes","scope":"asetasar","platform":"roblox","description":"Simple remote wrapper which allows better functionality","version":"1.0.2","latest":"1.0.2","versions":["1.0.0","1.0.1","1.0.2"],"license":"MIT","licenseRating":"safe","licenseCaveats":["License identified from the packaged LICENSE file; the manifest declared none."],"licenseVerified":true,"dependencies":{"asetasar/signalplus":{"version":"^3.7.1","alias":"SignalPlus"}},"integrity":"d05af7874223616b5496a83ea7b1582b71ac1bde9fdb339c1a448677a2aa18c6","likes":0,"downloads":0,"install":"forest install asetasar/aseta-remotes","url":"https://forest.dev/p/roblox/asetasar/aseta-remotes","files":"https://api.forest.dev/ai/package/roblox/asetasar/aseta-remotes/files","readme":"# Aseta-remotes\r\n\r\nSimple yet powerful remote wrapper into master remote structure with emphasis on ease of use.\r\n\r\n### Why?\r\n\r\n* This module was created as part of [Asetasar framework](https://github.com/Asetasar/Asetasar-Framework) where it is one of the recommended ways to approach networking.\r\n* Roblox development is filled with nonsensical, overcomplicated systems for very marginal improvement on performance, with its only performance mainly being able to spam thousands of events in the remote optimization scene.\r\n* Roblox handles usage of multiple remotes badly.\r\n* I wanted my own module where I know that the quality of code won't hinder rest of the project.\r\n\r\n### Benefits from usage of this module\r\n\r\n* **No complicated setup**: Aseta remotes are used the same way as normal remoteEvents are, syntax matches roblox's default syntax, meaning replacing existing remotes is as difficult as requiring the module and doing .New instead of WaitForChild.\r\n* **Easy use of URE**: Usage of unreliable remote events in Aseta-remotes is as simple as instead of calling methods :FireServer(), :FireServerUnreliable().\r\n* **Optimized signal handling**: Aseta remotes uses optimized [Aseta signals](https://github.com/Asetasar/Aseta-signals) which is generally more consistent that implementation from roblox and has no restriction on who can :Fire it.\r\n* **FireSelf**: Option in which you can essentially fire remote events from client-side to client-side and vise-versa with server, being able to achieve cross-script communication even without the use of Asetasar framework.\r\n* **Dynamic approach to event indexes**: Because of Aseta remotes masterRemote approach, event indexes are a must and the type of index which is necessary is not specified, meaning you can use integers with small size where heavy traffic happens, while being able to use strings where readibility matters.\r\n* **Simplicity**: Everything has been achieved with least amount of code and without implementing any unnecessary bloatware\r\n\r\n### Future plans\r\n\r\n* Add data compression for fun, because it is not really necessary but I want to create my own algorythms for compression.\r\n* Add additional debugging features\r\n\r\n## How to use\r\n\r\n*Creation of class*\r\n\r\n```lua\r\nlocal remoteEvent = asetaRemoteModule.New(\"Combat\") : dictionary\r\n\r\n\r\n--// Returns OOP class dictionary\r\n```\r\n\r\n*Essential usage*\r\n\r\n*Client*\r\n\r\n```lua\r\nlocal remoteEvent = asetaRemoteModule.New(\"Combat\")\r\n\r\n--// Connections >\r\n\r\nlocal function onClientEvent(damageRecieved, doVisualDamage)\r\n--// Processing!\r\nend\r\n\r\nremoteEvent[\"OnClientEvent\"]:Connect(onClientEvent)\r\n\r\n--// Firing to server >\r\n\r\nremoteEvent:FireServer(321, true)\r\nremoteEvent:FireServerUnreliable(Vector.one * 6)\r\n\r\n--// Firing self\r\n\r\nremoteEvent:FireSelf(321, false)\r\n--// Triggers OnClientEvent connection.\r\n\r\n```\r\n*Server*\r\n\r\n```lua\r\nlocal remoteEvent = asetaRemoteModule.New(\"Combat\")\r\n\r\n--// Connections >\r\n\r\nlocal function onServerEvent(player, damageRecieved, doVisualDamage)\r\n--// Processing!\r\nend\r\n\r\nremoteEvent[\"OnServerEvent\"]:Connect(onClientEvent)\r\n\r\n--// Firing to server >\r\n\r\nremoteEvent:FireAllClients(324, true)\r\nremoteEvent:FireAllClientsUnreliable(Vector.one * 2)\r\n\r\n--// Firing self\r\n\r\nremoteEvent:FireSelf(_, 321, true)\r\n--// Triggers OnServerEvent connection.\r\n\r\n\r\n```","readmeTruncated":false}