Skip to content

Commit e5c344b

Browse files
authored
Merge branch 'main' into patch-1
2 parents 1d9dc2b + f157e1c commit e5c344b

File tree

11 files changed

+64
-245
lines changed

11 files changed

+64
-245
lines changed

content/en-us/engine.md

Lines changed: 0 additions & 160 deletions
This file was deleted.

content/en-us/input/mouse-and-keyboard.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Mouse and keyboard input
33
description: Explains Roblox support for computer mice and keyboards.
4+
machineTranslated: true
45
---
56

67
A large percentage of Roblox sessions are played on devices with a mouse and keyboard, so it's important to properly support these inputs when designing an experience for a wide audience. Once you're comfortable with mouse and keyboard inputs, make your experience compatible across multiple platforms by setting up [mobile](../input/mobile.md) and [gamepad](./gamepad.md) inputs.
@@ -102,7 +103,7 @@ You can customize the appearance and behavior of a user's mouse icon within your
102103

103104
You can change the user's mouse icon in a `Class.LocalScript` by setting the `Class.UserInputService.MouseIcon|MouseIcon` property in `Class.UserInputService` to a custom Roblox asset ID. For example, the following `Class.LocalScript` changes the user's default mouse icon to a circle with a blue dot in the middle:
104105

105-
```lua highlight='3'
106+
```lua highlight="3"
106107
local UserInputService = game:GetService("UserInputService")
107108

108109
UserInputService.MouseIcon = "rbxassetid://3400146391"
@@ -112,7 +113,7 @@ UserInputService.MouseIcon = "rbxassetid://3400146391"
112113

113114
You can hide the user's mouse icon by setting the `Class.UserInputService.MouseIconEnabled` to `false` in a `Class.LocalScript`. For example, the following code switches the mouse icon from visible to invisible and back every two seconds:
114115

115-
```lua highlight='5,7'
116+
```lua highlight="5,7"
116117
local UserInputService = game:GetService("UserInputService")
117118

118119
while true do
@@ -129,7 +130,7 @@ You can lock the mouse icon's position to the screen using `Class.UserInputServi
129130

130131
If a user's mouse icon is locked in a position, `Class.UserInputService.InputChanged` still fires when the user moves the mouse, passing in the distance the mouse has moved. For example, the following code sample locks the user's mouse icon after one second, then Studio prints the mouse delta whenever the user moves their mouse:
131132

132-
```lua highlight='5'
133+
```lua highlight="5"
133134
local UserInputService = game:GetService("UserInputService")
134135

135136
task.wait(5)

content/en-us/parts/solid-modeling.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Solid modeling
33
description: Solid modeling is the process of joining parts together to form complex shapes.
4+
machineTranslated: true
45
---
56

67
**Solid modeling** is the process of joining [parts](../parts/index.md)
@@ -173,7 +174,7 @@ When performing a `Class.BasePart:UnionAsync()|UnionAsync()`, `Class.BasePart:In
173174

174175
To demonstrate `Class.BasePart:UnionAsync()|UnionAsync()`, the following `Class.Script` uses the **Part1** `Class.BasePart` from the workspace, unions it together with the **Part2**, **Part3**, and **Part4** `Class.BasePart|BaseParts`, then parents the resulting `Class.UnionOperation` to the workspace at the original position of **Part1**.
175176

176-
```lua highlight='6'
177+
```lua highlight="6"
177178
local Workspace = game:GetService("Workspace")
178179

179180
local mainPart = Workspace.Part1
@@ -201,7 +202,7 @@ end
201202

202203
To demonstrate `Class.BasePart:IntersectAsync()|IntersectAsync()`, the following `Class.Script` uses the **Part1** `Class.BasePart` from the workspace, intersects it with the **Part2** and **Part3** `Class.BasePart|BaseParts`, then parents the resulting `Class.IntersectOperation` to the workspace at the original position of **Part1**.
203204

204-
```lua highlight='6'
205+
```lua highlight="6"
205206
local Workspace = game:GetService("Workspace")
206207

207208
local mainPart = Workspace.Part1
@@ -229,7 +230,7 @@ end
229230

230231
To demonstrate `Class.BasePart:SubtractAsync()|SubtractAsync()`, the following `Class.Script` uses the **Part1** `Class.BasePart` from the workspace, negates the **Part2**, **Part3**, and **Part4** `Class.BasePart|BaseParts` from it, then parents the resulting `Class.UnionOperation` to the workspace at the original position of **Part1**.
231232

232-
```lua highlight='6'
233+
```lua highlight="6"
233234
local Workspace = game:GetService("Workspace")
234235

235236
local mainPart = Workspace.Part1

content/en-us/performance-optimization/design.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ Designing for performance means following a handful of best practices **as you b
99

1010
Lower-end devices, particularly mobile devices, have severe memory limitations and are succeptible to crashes due to out of memory (OOM) errors:
1111

12-
- If you want to support lower-end devices, choose a baseline set of devices with certain performance characteristics, test your experience on them throughout the development process, and pay close attention to frame rate and memory usage. As you find problem areas in your experience, use those areas to identify the limits of your devices.
12+
- If you want to support lower-end devices, choose at least one "baseline" device, test your experience on it throughout the development process, and pay close attention to frame rate and memory usage. As you find problem areas in your experience, use those areas to identify the limits of your device.
1313

14-
For example, you might test an experience with the **Render** (<kbd>Shift</kbd><kbd>F2</kbd>) and **Summary** (<kbd>Shift</kbd><kbd>F2</kbd>) debug stats enabled. If the frame rate starts to drop in a particularly cluttered area, you could examine the **Draw (scene)** numbers and determine that you need to stay below 600 draw calls and 650,000 triangles. Or you could examine the **Developer Console** (<kbd>F9</kbd>) and note that memory usage is a bit high unless you enable [streaming](../workspace/streaming.md). Having a clear understanding of device limits can help you stay under them as you continue to build your experience.
14+
For example, you might test an experience with the **Render** (<kbd>Shift</kbd><kbd>F2</kbd>) and **Summary** (<kbd>Shift</kbd><kbd>F2</kbd>) debug stats enabled. If the frame rate starts to drop in a particularly cluttered area, you could examine the **Draw (scene)** numbers and determine that you need to stay below 1,000 draw calls and 1,000,000 triangles for the experience to run well on your baseline device.
15+
16+
Or you could examine the **Developer Console** (<kbd>F9</kbd>) and note that memory usage is a bit high unless you enable [streaming](../workspace/streaming.md). Having a clear understanding of device limits can help you stay under them as you continue to build your experience.
1517

1618
![A Roblox experience with three overlays active.](../assets/optimization/perf-hud.png)
1719

@@ -23,8 +25,6 @@ Roblox does not have access to all of a device's memory. Some amount is required
2325

2426
More generally, testing on a variety of devices can help you check that the experience matches your visual and performance expectations at different graphics quality levels. For a much more detailed example of how you might think about optimizing your experience for low-end mobile devices, see [Real World Building and Scripting Optimization](https://devforum.roblox.com/t/real-world-building-and-scripting-optimization-for-roblox/3127146).
2527

26-
<a target="_blank" href="https://devforum.roblox.com/t/real-world-building-and-scripting-optimization-for-roblox/3127146"><img src="../assets/optimization/chicken-rocket.jpg" width="400" alt="Header image for Real World Building and Scripting Optimization." /></a>
27-
2828
## Streaming and teleportation
2929

3030
- [Instance streaming](../workspace/streaming.md) lets Roblox dynamically load and unload 3D content and is a great option for most experiences, especially larger ones. Streaming improves join times, reduces memory footprint, and increases frame rates. For more information, see [Improving performance](improve.md#instance-streaming).
@@ -37,11 +37,11 @@ More generally, testing on a variety of devices can help you check that the expe
3737

3838
- As you create assets, convert them into [packages](../projects/assets/packages.md). Making packages part of your workflow helps avoid the common issue of duplicate assets with different IDs, which can hurt performance.
3939

40-
- When you add meshes and textures, use and reuse them rather than importing duplicate copies. By resizing, rotating, and overlapping, you can create rich, varied environments that require very few [draw calls](improve.md#draw-calls). For more information, see [Remove duplicate textures](../tutorials/environmental-art/optimize-your-experience.md#remove-duplicate-textures).
40+
- When you add meshes and textures, use and reuse them rather than importing duplicate copies. By resizing, rotating, and overlapping, you can create rich, varied environments that require very few [draw calls](improve.md#draw-calls). For more information, see [Remove duplicate textures](../tutorials/curriculums/environmental-art/optimize-your-experience.md#remove-duplicate-textures).
4141

4242
## Transparency
4343

44-
- Avoid transparency values other than 0 (visible) and 1 (invisible). When you use partial transparency, be especially careful to avoid [high transparency overdraw](../tutorials/environmental-art/optimize-your-experience.md#delete-layered-transparencies).
44+
- Avoid transparency values other than 0 (visible) and 1 (invisible). When you use partial transparency, be especially careful to avoid [high transparency overdraw](../tutorials/curriculums/environmental-art/optimize-your-experience.md#delete-layered-transparencies).
4545

4646
## Scripting
4747

content/en-us/reference/engine/classes/RunService.yaml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,9 @@ events:
567567
Fires every frame, after the physics simulation has completed.
568568
description: |
569569
The `PostSimulation` event fires every frame, after the physics simulation
570-
has completed. The `deltaTimeSim` argument indicates the time that has
571-
elapsed since the previous frame.
570+
has completed. The `deltaTimeSim` argument indicates the time that the
571+
current frame has stepped the physics simulation, not accounting for
572+
physics throttling.
572573
573574
This event is useful for making final adjustments to the outcome of the
574575
simulation. Following this phase, the engine triggers the
@@ -579,7 +580,8 @@ events:
579580
type: double
580581
default:
581582
summary: |
582-
The time (in seconds) that has elapsed since the previous frame.
583+
The time (in seconds) that the current frame has stepped the physics
584+
simulation, not accounting for physics throttling.
583585
tags: []
584586
deprecation_message: ''
585587
security: None
@@ -592,7 +594,7 @@ events:
592594
description: |
593595
The `PreAnimation` event fires every frame, prior to the physics
594596
simulation but after rendering. The `deltaTimeSim` argument indicates the
595-
time that has elapsed since the previous frame.
597+
time that the current frame has stepped animations.
596598
597599
This event is useful for modifying animation objects, such as adjusting
598600
their speed or priority. Once the `PreAnimation` event is complete, the
@@ -607,7 +609,7 @@ events:
607609
type: double
608610
default:
609611
summary: |
610-
The time (in seconds) that has elapsed since the previous frame.
612+
The time (in seconds) that the current frame has stepped animations.
611613
tags: []
612614
deprecation_message: ''
613615
security: None
@@ -656,7 +658,8 @@ events:
656658
The `PreSimulation` event (replacement for
657659
`Class.RunService.Stepped|Stepped`) fires every frame, prior to the
658660
physics simulation. The `deltaTimeSim` argument indicates the time that
659-
has elapsed since the previous frame.
661+
the current frame will step the physics simulation, not accounting for
662+
physics throttling.
660663
661664
This event is useful for adjusting properties like velocity or forces just
662665
before they're applied as part of the simulation. The simulation then
@@ -669,7 +672,8 @@ events:
669672
type: double
670673
default:
671674
summary: |
672-
The time (in seconds) that has elapsed since the previous frame.
675+
The time (in seconds) that the current frame will step the physics
676+
simulation, not accounting for physics throttling.
673677
tags: []
674678
deprecation_message: ''
675679
security: None
@@ -679,7 +683,13 @@ events:
679683
- name: RunService.RenderStepped
680684
summary: |
681685
Fires every frame, prior to the frame being rendered.
682-
description: ''
686+
description: |
687+
Fires every frame, prior to the frame being rendered.
688+
689+
##### Migration Note
690+
691+
This event has been superseded by `Class.RunService.PreRender|PreRender`
692+
which should be used for new work.
683693
code_samples: []
684694
parameters:
685695
- name: deltaTime
@@ -688,17 +698,21 @@ events:
688698
summary: |
689699
The time (in seconds) that has elapsed since the previous frame.
690700
tags: []
691-
deprecation_message: |
692-
This event has been superseded by `Class.RunService.PreRender|PreRender`
693-
which should be used for new work.
701+
deprecation_message: ''
694702
security: None
695703
thread_safety: Unsafe
696704
capabilities: []
697705
writeCapabilities: []
698706
- name: RunService.Stepped
699707
summary: |
700708
Fires every frame, prior to the physics simulation.
701-
description: ''
709+
description: |
710+
Fires every frame, prior to the physics simulation.
711+
712+
##### Migration Note
713+
714+
This event has been superseded by `Class.RunService.PreSimulation|PreSimulation`
715+
which should be used for new work.
702716
code_samples: []
703717
parameters:
704718
- name: time
@@ -713,10 +727,7 @@ events:
713727
summary: |
714728
The time (in seconds) that has elapsed since the previous frame.
715729
tags: []
716-
deprecation_message: |
717-
This event has been superseded by
718-
`Class.RunService.PreSimulation|PreSimulation` which should be used for
719-
new work.
730+
deprecation_message: ''
720731
security: None
721732
thread_safety: Unsafe
722733
capabilities: []

0 commit comments

Comments
 (0)