RayLib 2D Challenge Part 11 - Collecting Coins (a.k.a., Making Objects Interact in the Game World)

  Рет қаралды 1,549

Kea Sigma Delta

Kea Sigma Delta

Күн бұрын

Пікірлер: 2
@mr.shredder5430
@mr.shredder5430 10 ай бұрын
would threading hlep the performance just asking im still a beginner
@KeaSigmaDelta
@KeaSigmaDelta 10 ай бұрын
Multi-threading can help performance, provided you can break the tasks down into segments that can be run in parallel. For example, running game AI code and physics code on separate cores could help. That said, multi-threaded programming can be a nightmare if you don't know what you're doing. Multi-threading is NOT a solution for the performance issue I mentioned in the video, though. The problem in the video is that the same files keep on being loaded from disk, which is simply wasteful of both processor time and memory. No amount of multi-threading will save you if your game's images can't fit into VRAM. When that happens, your images/textures have to be paged into and out of VRAM multiple times a frame. Even if it does fit into VRAM, having too many copies of the same image would mean that the GPU['s caches can't operate efficiently any more. Why? Because your many copies of the same image become too big to fit into the caches, resulting in more reads from VRAM, and slower performance. This doesn't matter with a small 2D scene like the one in the video, but when you've got 100s of megabytes of textures, and you have 100s of copies of those textures, then you will notice. As hinted at, the solution is a "resource manager," which will ensure that only one copy of a texture (or other resource) is loaded, and that one copy is shared between everything that uses it.
Building a Game Engine Resource Manager - RayLib 2D Challenge Part 12
4:15
6 Months of Testing C++ Build Systems: Here’s What You Need to Know
16:33
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
Why I Made My Game... Worse?
17:06
Deynum Studio
Рет қаралды 194 М.
LEVEL UP Your Game Design Toolkit (Godot for Beginners)
23:30
Coco Code
Рет қаралды 195 М.
I made Tetris in C, this is what I learned
15:15
Austin Larsen
Рет қаралды 15 М.
HACKING UNITY GAMES (FOR NOOBS)
16:11
cazz
Рет қаралды 103 М.
Why Majora's Mask's Blue Dog Took 25 Years to Win the Race
21:04
Vidya James
Рет қаралды 2,5 МЛН
CMake vs Make - A Real Life Comparison (With Actual Code)
12:16
Kea Sigma Delta
Рет қаралды 6 М.
CMake vs Meson - a real life comparison with actual code
12:20
Kea Sigma Delta
Рет қаралды 2,5 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН