Simulation-space Particles
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next timestamp
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu and Index Controls

a
w
s
d
h j k l


Esc Close menu / unfocus timestamp

Quotes and References Menus and Index

Enter Jump to timestamp

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
0:08Recap and set the stage for the day
0:08Recap and set the stage for the day
0:08Recap and set the stage for the day
1:22Blackboard: Particle Cache
1:22Blackboard: Particle Cache
1:22Blackboard: Particle Cache
6:07handmade_particles.h: Remove the notion of a particle system cache
6:07handmade_particles.h: Remove the notion of a particle system cache
6:07handmade_particles.h: Remove the notion of a particle system cache
7:37handmade_particles.cpp: Remove GetOrCreateParticleSystem(), TouchParticleSystem() and InitParticleSystem(), rename PlayAround() to UpdateAndRenderFire() and rework InitParticleCache()
7:37handmade_particles.cpp: Remove GetOrCreateParticleSystem(), TouchParticleSystem() and InitParticleSystem(), rename PlayAround() to UpdateAndRenderFire() and rework InitParticleCache()
7:37handmade_particles.cpp: Remove GetOrCreateParticleSystem(), TouchParticleSystem() and InitParticleSystem(), rename PlayAround() to UpdateAndRenderFire() and rework InitParticleCache()
11:49Run the game and see that this is all fine, although slower than it should be
11:49Run the game and see that this is all fine, although slower than it should be
11:49Run the game and see that this is all fine, although slower than it should be
13:52handmade_particles.cpp: Consider why UpdateAndRenderFire() is so slow
13:52handmade_particles.cpp: Consider why UpdateAndRenderFire() is so slow
13:52handmade_particles.cpp: Consider why UpdateAndRenderFire() is so slow
16:31handmade_particles.h: Introduce particle_4x, simplify particle_system and remove particle_v3, particle_v4 and the operator*()
16:31handmade_particles.h: Introduce particle_4x, simplify particle_system and remove particle_v3, particle_v4 and the operator*()
16:31handmade_particles.h: Introduce particle_4x, simplify particle_system and remove particle_v3, particle_v4 and the operator*()
17:55handmade_particles.cpp: Remove GetParticle() and make UpdateAndRenderFire() work on particle_4x
17:55handmade_particles.cpp: Remove GetParticle() and make UpdateAndRenderFire() work on particle_4x
17:55handmade_particles.cpp: Remove GetParticle() and make UpdateAndRenderFire() work on particle_4x
20:23handmade_particles.h: Introduce operator+=() for v3_4x
20:23handmade_particles.h: Introduce operator+=() for v3_4x
20:23handmade_particles.h: Introduce operator+=() for v3_4x
21:22Run the game and see that we are now running as fast as expected
21:22Run the game and see that we are now running as fast as expected
21:22Run the game and see that we are now running as fast as expected
22:43handmade_particles.h: Introduce operator*(), operator+() and operator+=() for v4_4x
22:43handmade_particles.h: Introduce operator*(), operator+() and operator+=() for v4_4x
22:43handmade_particles.h: Introduce operator*(), operator+() and operator+=() for v4_4x
24:48Run the game and see that we're still good
24:48Run the game and see that we're still good
24:48Run the game and see that we're still good
26:05Reflect on the importance of the profiler
26:05Reflect on the importance of the profiler
26:05Reflect on the importance of the profiler
28:49handmade_particles.cpp: Make UpdateAndRenderFire() take a dt and FrameDisplacementInit
28:49handmade_particles.cpp: Make UpdateAndRenderFire() take a dt and FrameDisplacementInit
28:49handmade_particles.cpp: Make UpdateAndRenderFire() take a dt and FrameDisplacementInit
31:03handmade_particles.h: Introduce ToV34x()
31:03handmade_particles.h: Introduce ToV34x()
31:03handmade_particles.h: Introduce ToV34x()
31:57handmade_particles.cpp: Enable UpdateAndRenderFire() to render particles through the standard path
31:57handmade_particles.cpp: Enable UpdateAndRenderFire() to render particles through the standard path
31:57handmade_particles.cpp: Enable UpdateAndRenderFire() to render particles through the standard path
44:04Run the game, note that we are theortically generating particles and investigate why we aren't seeing them
44:04Run the game, note that we are theortically generating particles and investigate why we aren't seeing them
44:04Run the game, note that we are theortically generating particles and investigate why we aren't seeing them
47:09handmade_world_mode.cpp: Prevent everything but the particles from being rendered, run the game and see them
47:09handmade_world_mode.cpp: Prevent everything but the particles from being rendered, run the game and see them
47:09handmade_world_mode.cpp: Prevent everything but the particles from being rendered, run the game and see them
47:42handmade_particles.cpp: Introduce SpawnFire()
47:42handmade_particles.cpp: Introduce SpawnFire()
47:42handmade_particles.cpp: Introduce SpawnFire()
49:54handmade_entity.cpp: Make entities call SpawnFire() when they land
49:54handmade_entity.cpp: Make entities call SpawnFire() when they land
49:54handmade_entity.cpp: Make entities call SpawnFire() when they land
50:43Run the game and see no spawning occurring
50:43Run the game and see no spawning occurring
50:43Run the game and see no spawning occurring
51:40handmade_world_mode.cpp: Reduce ScreenIndex to 1, run the game and see that the particle spawning is working just fine
51:40handmade_world_mode.cpp: Reduce ScreenIndex to 1, run the game and see that the particle spawning is working just fine
51:40handmade_world_mode.cpp: Reduce ScreenIndex to 1, run the game and see that the particle spawning is working just fine
52:15handmade_world_mode.cpp: Generate two horizontally aligned screens, run the game and see what happens to the particles upon leaving a room
52:15handmade_world_mode.cpp: Generate two horizontally aligned screens, run the game and see what happens to the particles upon leaving a room
52:15handmade_world_mode.cpp: Generate two horizontally aligned screens, run the game and see what happens to the particles upon leaving a room
55:15handmade_particles.cpp: Make UpdateAndRenderParticleSystems() take the FrameDisplacement
55:15handmade_particles.cpp: Make UpdateAndRenderParticleSystems() take the FrameDisplacement
55:15handmade_particles.cpp: Make UpdateAndRenderParticleSystems() take the FrameDisplacement
56:28handmade_world_mode.h: Add LastCameraP to the game_mode_world struct and make UpdateAndRenderWorld() compute that LastCameraP
56:28handmade_world_mode.h: Add LastCameraP to the game_mode_world struct and make UpdateAndRenderWorld() compute that LastCameraP
56:28handmade_world_mode.h: Add LastCameraP to the game_mode_world struct and make UpdateAndRenderWorld() compute that LastCameraP
58:06Run the game, see that the particles are not being displaced correctly and investigate why
58:06Run the game, see that the particles are not being displaced correctly and investigate why
58:06Run the game, see that the particles are not being displaced correctly and investigate why
1:01:51Blackboard: Calculating that displacement
1:01:51Blackboard: Calculating that displacement
1:01:51Blackboard: Calculating that displacement
1:02:33handmade_world_mode.cpp: Correctly compute the FrameToFrameCameraDeltaP and LastCameraOffset
1:02:33handmade_world_mode.cpp: Correctly compute the FrameToFrameCameraDeltaP and LastCameraOffset
1:02:33handmade_world_mode.cpp: Correctly compute the FrameToFrameCameraDeltaP and LastCameraOffset
1:04:34Run the game and see that our particles may now be correctly displaced
1:04:34Run the game and see that our particles may now be correctly displaced
1:04:34Run the game and see that our particles may now be correctly displaced
1:04:58handmade_particles.cpp: Tweak SpawnFire() to shorten the lifetime of the particles, run the game and check them out
1:04:58handmade_particles.cpp: Tweak SpawnFire() to shorten the lifetime of the particles, run the game and check them out
1:04:58handmade_particles.cpp: Tweak SpawnFire() to shorten the lifetime of the particles, run the game and check them out
1:06:37handmade_world_mode.cpp: Remove LastCameraOffset and displace the particles with the WorldTransform
1:06:37handmade_world_mode.cpp: Remove LastCameraOffset and displace the particles with the WorldTransform
1:06:37handmade_world_mode.cpp: Remove LastCameraOffset and displace the particles with the WorldTransform
1:09:51Run the game and admire the particles
1:09:51Run the game and admire the particles
1:09:51Run the game and admire the particles
1:10:33Q&A
🗩
1:10:33Q&A
🗩
1:10:33Q&A
🗩
1:11:20mmozeiko gcc & clang don't have m128_f32 member for __m128. They need _mm_store_ps or something like ((float*)&A->P.x)[index] (or union with float array)
🗪
1:11:20mmozeiko gcc & clang don't have m128_f32 member for __m128. They need _mm_store_ps or something like ((float*)&A->P.x)[index] (or union with float array)
🗪
1:11:20mmozeiko gcc & clang don't have m128_f32 member for __m128. They need _mm_store_ps or something like ((float*)&A->P.x)[index] (or union with float array)
🗪
1:12:05handmade_particles.cpp: Use the M macro for rendering the particles and introduce handmade_simd.h
1:12:05handmade_particles.cpp: Use the M macro for rendering the particles and introduce handmade_simd.h
1:12:05handmade_particles.cpp: Use the M macro for rendering the particles and introduce handmade_simd.h
1:16:04nxsy soysaucethekid was suggesting to slow down the time to make sure it is now right
🗪
1:16:04nxsy soysaucethekid was suggesting to slow down the time to make sure it is now right
🗪
1:16:04nxsy soysaucethekid was suggesting to slow down the time to make sure it is now right
🗪
1:19:52thesizik Not too long ago, you changed world coordinates to be s32 instead of u32. I think they were unsigned originally so that overflow would work correctly to have the world wrap around
🗪
1:19:52thesizik Not too long ago, you changed world coordinates to be s32 instead of u32. I think they were unsigned originally so that overflow would work correctly to have the world wrap around
🗪
1:19:52thesizik Not too long ago, you changed world coordinates to be s32 instead of u32. I think they were unsigned originally so that overflow would work correctly to have the world wrap around
🗪
1:20:27cyberpunkhobo Does the Z position of the particles not get affected by the perspective transform?
🗪
1:20:27cyberpunkhobo Does the Z position of the particles not get affected by the perspective transform?
🗪
1:20:27cyberpunkhobo Does the Z position of the particles not get affected by the perspective transform?
🗪
1:22:58thesizik But when your position goes from INT_MIN to INT_MAX, won't it cause undefined behavior?
🗪
1:22:58thesizik But when your position goes from INT_MIN to INT_MAX, won't it cause undefined behavior?
🗪
1:22:58thesizik But when your position goes from INT_MIN to INT_MAX, won't it cause undefined behavior?
🗪
1:23:49todo.txt: Update the TODO list
1:23:49todo.txt: Update the TODO list
1:23:49todo.txt: Update the TODO list
1:24:16thesizik Signed integer overflow?
🗪
1:24:16thesizik Signed integer overflow?
🗪
1:24:16thesizik Signed integer overflow?
🗪
1:25:45Lament the absence of real 3D and close things down
🗩
1:25:45Lament the absence of real 3D and close things down
🗩
1:25:45Lament the absence of real 3D and close things down
🗩