Voxels in HL2
Using Source's I/O system for some terrible things...
The idea was to teleport a spherical trigger_multiple which breaks surrounding voxels. But this isn't as easy as it may seem, when constrained to the I/O system:
- A logic_relay can't get "the entity that called it", so each voxel needs some duplicated code (change its targetname, for later reference).- Execution order is all over the place, so I gotta do things across multiple frames, which somehow works out in this case.
- point_teleport is pretty broken in HL2 and can not be used here.- Can't teleport a trigger entity using trigger_teleport, so I teleport an invisible prop_physics instead, with the trigger parented to it.- Can't detect collision with func_breakable, so I use a func_physbox and enable its physics simulation for a single frame to detect collision.
Furthermore, Source has a limit of 1024 brush entities it seems. So the voxel grid could neither be finer, nor much bigger, without reaching some limitations. Besides, it seems like the engine is already struggling to do collision detection of this many entities at once...
TL;DR: Write some C++ instead of doing it via I/O, or better yet, use another game engine for this.
Other Videos By Red Mser
2025-01-05 | Bad Odyssey!! |
2024-04-04 | Void Stranger Soundtrack - EX |
2023-11-17 | Plug Hand Play Trailer |
2023-11-01 | [SPOILERS] Void Stranger - All Void Court Scenes |
2023-01-19 | Programmable CPU in Half-Life 2 |
2022-07-21 | Mechaccountant Trailer |
2022-04-25 | [Black Mesa] Hat & Pizza - End Game |
2022-04-25 | [Black Mesa] Hat & Pizza - 8 Jump Pads (SUCCESS!) |
2022-04-24 | [Black Mesa] Hat & Pizza - 8 Jump Pads (Idea 2) |
2022-04-24 | [Black Mesa] Hat & Pizza - 8 Jump Pads (Idea 1) |
2022-03-28 | Voxels in HL2 |
2022-02-17 | Feeling Lucky in Spelunky |
2021-08-19 | Spelunky's Greatest Mystery |
2021-06-24 | Custom Models in Overwatch |
2021-03-13 | Comba Bud |
2019-09-30 | Half-L.A.I.F. 2: Episode 2 - Chapter 7 - T-Minus One |
2019-09-28 | Half-L.A.I.F. 2: Episode 2 - Chapter 6 - Our Mutual Fiend |
2019-09-28 | Half-L.A.I.F. 2: Episode 2 - Chapter 5 - Under the Radar |
2019-09-13 | Half-L.A.I.F. 2: Episode 2 - Chapter 4 - Riding Shotgun |
2019-09-12 | Half-L.A.I.F. 2: Episode 2 - Chapter 3 - Freeman Pontifex |
2019-09-11 | Half-L.A.I.F. 2: Episode 2 - Chapter 2 - This Vortal Coil |