openmultiplayer / openmultiplayer/open.mp

`markForUpdate` method

Open
#412 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
641
Forks
208
PR merge metrics
No merged PRs in 30d

Description

Rather than sending updates to entities instantly, some would be better with a markorUpdate method that sends all the updates at once next tick. This is to combine them in to fewer packets when changing settings involves, say, recreating the entire entity. Currently if a script changes five settings at once that's five recreations when one will do.

This should be an internal function, not in the SDK (probably) as the packets are an implementation detail. The idea is inspired by the current need for setColourAndText to update two things at once.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the internal update path behind markForUpdate and compare it with setColourAndText, which currently combines two updates. Determine where entity changes are queued and packets are emitted on the next tick. Done means multiple setting changes are combined into one recreation/update, with the mechanism kept internal rather than exposed in the SDK.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.