Skip to content

Commit

Permalink
Merge branch 'main' into patch-7
Browse files Browse the repository at this point in the history
  • Loading branch information
lack-of-gravity-jack committed Jul 4, 2024
2 parents da5498b + bd4e851 commit 752114d
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 22 deletions.
2 changes: 1 addition & 1 deletion content/en-us/art/accessories/classic-clothing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Classic clothing are decals you can apply to a classic character mo
---

<Alert severity="warning">
Current user-generated avatars do not support 2D classic clothing. For information on creating modern 3D cosmetics, including rigid accessories and clothing items, see [Getting Started](../../avatar/index.md).
Current user-generated avatars on the Marketplace do not support 2D classic clothing. For information on creating modern 3D cosmetics, including rigid accessories and clothing items, see [Getting Started](../../avatar/index.md).
</Alert>

Classic clothing are a type of 2D cosmetic item that you can apply to the surface of a classic avatar character. You can [create](#creating) your own classic clothing items and sell them on the [Marketplace](https://www.roblox.com/catalog).
Expand Down
2 changes: 1 addition & 1 deletion content/en-us/cloud-services/memory-stores/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ To keep your memory usage pattern optimal and avoid hitting the [limits](#limits

- Split giant data structures into multiple smaller ones by [sharding](<https://en.wikipedia.org/wiki/Shard_(database_architecture)>).

It's often easier to manage data in smaller structures rather than storing everything in one large data structure. This approach can also help avoid usage and rate limits. For example, if you have a sorted map that uses prefixes for its keys, consider separating each prefix into its own sorted map. For an especially popular experience, you might even separate users into multiple maps based on the first digits of their user IDs.
It's often easier to manage data in smaller structures rather than storing everything in one large data structure. This approach can also help avoid usage and rate limits. For example, if you have a sorted map that uses prefixes for its keys, consider separating each prefix into its own sorted map. For an especially popular experience, you might even separate users into multiple maps based on the last digits of their user IDs.

- Compress stored values.

Expand Down
34 changes: 23 additions & 11 deletions content/en-us/luau/queues.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,40 +34,52 @@ Priority queues are useful for situations where you want to read or access data
You can use built-in queues of `Class.MemoryStoreService` or use [tables](../luau/tables.md) to implement queues for all other usage. The following code sample shows the implementation a **regular queue**. To use this implementation for your experience, you should save it as a `Class.ModuleScript` and store it in `Class.ReplicatedStorage`, so your queue is accessible for both client and server.

```lua title="Implementing a Regular Queue Using Table"
--!strict
local Queue = {}
Queue.__index = Queue

function Queue.new()
local self = setmetatable({}, Queue)

self._first = 0
self._last = -1
self._queue = {}
export type Queue<T> = typeof(setmetatable(
{} :: {
_first: number,
_last: number,
_queue: { T },
},
Queue
))

function Queue.new<T>(): Queue<T>
local self = setmetatable({
_first = 0,
_last = -1,
_queue = {},
}, Queue)

return self
end

-- Check if the queue is empty
function Queue:IsEmpty()
function Queue.IsEmpty<T>(self: Queue<T>)
return self._first > self._last
end

-- Add a value to the queue
function Queue:Enqueue(value)
function Queue.Enqueue<T>(self: Queue<T>, value: T)
local last = self._last + 1
self._last = last
self._queue[last] = value
end

-- Remove a value from the queue
function Queue:Dequeue()
local first = self._first
function Queue.Dequeue<T>(self: Queue<T>): T
if self:IsEmpty() then
return nil
error("Cannot dequeue from empty queue")
end

local first = self._first
local value = self._queue[first]
self._queue[first] = nil
self._first = first + 1

return value
end

Expand Down
2 changes: 1 addition & 1 deletion content/en-us/performance-optimization/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ From a business perspective, performant games often have higher user engagement,

- **Memory usage** is the amount of RAM or swap that your experience uses. Even if an experience has low starting memory usage, memory leaks can cause that amount to increase over time.

On the server, excessive memory usage can cause crashes, which disconnect all players from the experience. Each Roblox server has approximately 6.9 GB of available memory.
On the server, excessive memory usage can cause crashes, which disconnect all players from the experience.

Excessive memory usage causes client crashes, too, but it also prevents users on lower-end devices from playing your experience in the first place. Reducing memory usage can greatly expand your addressable audience, especially on mobile.

Expand Down
15 changes: 11 additions & 4 deletions content/en-us/reference/engine/classes/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1645,11 +1645,18 @@ events:
thread_safety: Unsafe
- name: Instance.Changed
summary: |
Fired immediately after a property of the instance changes.
Fired immediately after a property of the instance changes, with some limitations.
description: |
This event fires immediately after most properties change on the instance.
It is possible to find the present value of a changed property by using
`object[property]`.
This event fires immediately after an instance property is changed
and it works with most use cases (see limitations below). The new value
of a changed property is **not** passed in as a parameter, so it must
be accessed by using `object[property]`. For example:
```
object.Changed:Connect(function(property)
print("The new property's value is", object[property])
end)
```
If you are only interested in listening to the change of one specific
property, consider using the
Expand Down
5 changes: 2 additions & 3 deletions content/en-us/reference/engine/classes/UserInputService.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1112,9 +1112,8 @@ methods:
location of the player's `Class.Mouse` in pixels relative to the top left
corner. This does not account for the `Class.GuiObject|GUI` inset.
If the location of the mouse pointer is offscreen or the players device
does not have a mouse, the value returned will be undetermined instead of
Vector2.
If the location of the mouse pointer is offscreen or the player's device
does not have a mouse, the returned value will be undetermined.
As `Class.UserInputService` is client-side only, this function can only be
used in a `Class.LocalScript`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ properties:
tags: []
deprecation_message: ''
- name: RotationCurveKey.Value
type: number
type: CFrame
summary: |
The `Datatype.CFrame` value of this `Datatype.RotationCurveKey`.
description: |
Expand Down

0 comments on commit 752114d

Please sign in to comment.