Skillpedia
برمجة عامة6.6k · #13839

roblox-networking

ما الذي تفعله

تساعد هذه المهارة المطوّرين على إنشاء الرسائل بين جهاز لاعب Roblox والخادم بطريقة آمنة. وهي مناسبة لمن يقلقون من الغش أو الإغراق بالرسائل أو عدم تزامن حالة اللعبة.

متى تستخدمها

  • ✓عندما تصمم أو تصلح RemoteEvents وRemoteFunctions في لعبة Roblox.
  • ✓عندما يمكن للاعبين الغش بإرسال قيم خاطئة أو بإغراق Remote بالطلبات.
  • ✓عندما تبدو كائنات اللعبة مختلفة لكل لاعب أو تغيب عن بعض العملاء.

رابط المهارة

https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/other-engines/roblox-networking/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/other-engines/roblox-networking/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“يرسل اللاعبون أرقام ضرر مزيفة إلى RemoteEvents الخاصة بي في Roblox، كيف أوقف ذلك؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

توجّه المهارة الوكيل إلى حصر كل Remote ومُرسله، واختيار نوع الرسالة المناسب، وإرسال ما لا يستطيع الخادم استنتاجه بنفسه، وفحص كل قيمة على الخادم.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Roblox networking

Build explicit request and replication contracts in which the server decides authoritative game state and clients provide input or intent. Targets Roblox's rolling platform APIs. This skill goes deeper than the networking primer in roblox-luau.

When to use

  • Use to design, implement, debug, or secure cross-boundary Roblox communication.
  • Use when a remote trusts client values, an exploiter can target arbitrary Instances, messages spam services, streamed objects are missing, or clients disagree with the server.

When not to use: basic Luau/services belong to roblox-luau; persistent state belongs to roblox-datastores; physical ownership mechanics also compose with roblox-physics.

Workflow

  1. Inspect the existing protocol. Find every remote and both endpoints; document direction, sender, payload, frequency, authority, validation, and consumers. Reuse the canonical remote folder—do not create a duplicate because discovery was skipped.
  2. Classify each message. Client request, server fact, or ephemeral cosmetic sample. Choose reliable event, unreliable event, or request/response from semantics—not convenience.
  3. Minimize the payload. Send stable identifiers and intent. Do not send a price, damage, ownership result, arbitrary path, or computed outcome the server can derive.
  4. Validate in layers. Check type/shape/finiteness, allowlisted value, Instance class and ancestry, player permissions/state, distance/line of sight where relevant, server cooldown, and rate budget before doing expensive work.
  5. Apply on the server. The server resolves targets and mutates health, inventory, currency, cooldowns, and progression. Client-side checks improve UX but grant no trust.
  6. Replicate narrowly. Use FireClient for private or local facts; broadcast only shared facts. Avoid sending replicated properties again unless the client needs a distinct presentation event.
  7. Handle time and lifecycle. Requests may arrive after death, respawn, streaming changes, or disconnect. Resolve the current character/state during handling and clean per-player limiter data.
  8. Verify with Server & Clients. Exercise normal, malformed, spam, out-of-range, stale character, rapid respawn, leaving, simultaneous players, targeted, and broadcast cases. Inspect server and each client Output separately.

Choose the transport

Primitive Use Do not use
RemoteEvent ordered, reliable one-way requests/facts continuous samples where newer replaces older
UnreliableRemoteEvent ephemeral cosmetic/continuous state tolerant of loss and reordering purchases, damage decisions, inventory, one-shot state transitions
RemoteFunction bounded client-to-server query that truly needs an immediate reply server-to-client invocation; long/uncertain work; ordinary commands

Never invoke a client synchronously from the server. A client may disconnect, error, or never return. Prefer server RemoteEvent:FireClient() and a separate response event when needed.

Delivery rules that change handler design (per connection, per direction):

  • RemoteEvent messages arrive in send order, even across different RemoteEvents, but order covers when each handler starts. A handler that yields (task.wait, WaitForChild, a DataStore call) lets the next message from the same player start before it resumes, so check-then-yield-then-apply code can approve two requests. Claim the cooldown or mark the request in progress before the first yield.
  • A client firing a RemoteEvent faster than the throttle is delayed, not dropped; the backlog still arrives. UnreliableRemoteEvent traffic over the limit, over 1000 bytes, or with no handler connected is discarded.
  • Messages sent before a handler connects are queued (bounded) for RemoteEvents and RemoteFunctions. There is no ordering guarantee between a RemoteFunction and a RemoteEvent; use one remote type or your own sequence number when order matters.

Pattern: validate before resolving gameplay

-- ServerScriptService/CombatRequests.server.luau
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Workspace = game:GetService("Workspace")

local attack = ReplicatedStorage.Remotes.Attack
local lastRequest: {[Player]: number} = {}
local RANGE = 12
local COOLDOWN = 0.25

attack.OnServerEvent:Connect(func
الأسئلة الشائعة

لماذا يجب أن يحدد الخادم النتائج؟

تبقي المهارة الخادم مسؤولًا عن نتائج اللعب، وتعامل رسائل العميل كطلبات لا كحقائق.

هل تغطي هذه المهارة Luau الأساسية؟

لا. السكربتات الأساسية تغطيها مهارة Roblox Luau منفصلة.

هل تغطي حفظ البيانات؟

لا. حفظ البيانات تغطيه مهارة DataStore منفصلة.

التفاصيل

الوصف الأصلي من المؤلف

Design and harden Roblox client/server networking with RemoteEvent, RemoteFunction, and UnreliableRemoteEvent; server authority, argument and Instance validation, rate limits, proximity/ownership checks, targeted replication, streaming, lifecycle, prediction, and reconciliation. Use for Roblox remotes, exploits, request spam, multiplayer replication, network ownership, high-frequency cosmetic updates, or server/client desynchronization.

repo: gamedev-skills/awesome-gamedev-agent-skills

الشعبية

نجوم GitHub
6.6k
الترتيب
#13839
الترخيص
Apache-2.0
آخر تحديث
28‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة