Played around with the various arbitrary values I was using for Mass and Gravity. Things were still going through walls occasionally, even with a terminal velocity implemented.
Finally, I figured out that I could just turn up the substeps. At about 10 substeps, things seem to finally be working the way I want them to in order for it to look like "real" crates and oil drums falling at 1 gee, without any noticible clipping errors so far.
Currently, the game is trying to run at 50fps, is spending 8ms on physics and another 12-18ms on rendering. It was less than 1ms for physics using the demo's default settings for substeps. Basically, I just kept increasing it until I could make the stuff fall fast without piles of stuff pushing each other out of the world through the corners.
It works pretty well, all things considered. And using the techniques I'd picked up while implementing this, I also created a surreal little day/night cycle using 2 dynamic spotlights attached to a pivot. I feel like I'm starting to get the hang of Blitz for the first time since buying it.
Regarding Tokamak, is there any way to make the entities stop moving when they get close enough to "at rest?" They do that automatically on a flat surface with the built-in gravity active, but I guess I'd have to implement it manually using Active and Isactive, coupled with in-game triggers such as "this object has been sitting around idling, minding its own business, but it just got touched by a player."
I'm still eager to hear if there's anything I can do to read an entity's mass.
to summarize: That's the secret, folks! If you want Tokamak to do thigs it wasn't designed to do, you have to script the gravity yourself manually. If you want manually scripted physics to look nice and use all the Tokamak trimmings, you have to set the the TOKSIM_Advance command's substep value RIDICULOUSLY HIGH, like(1.5/FPS,10) or something. And if you do this, it slows down your game's FPS noticibly.
In the end, it's up to you to decide how badly you want your weird little special effects, and what you're willing to sacrifice to achieve them. For my game, which I'm planning to be pretty high-concept, I think it might be worth it to make sure the physics are both convincing and dynamic. For an FPS (First Person Shooter, this time, not Frames Per Second,) on the other hand, I'd probably lay the graphics on heavier and worry less about physics.
Say, if I post the entire code so far, would you guys be willing to help me optimize things...? :)
Finally, I figured out that I could just turn up the substeps. At about 10 substeps, things seem to finally be working the way I want them to in order for it to look like "real" crates and oil drums falling at 1 gee, without any noticible clipping errors so far.
Currently, the game is trying to run at 50fps, is spending 8ms on physics and another 12-18ms on rendering. It was less than 1ms for physics using the demo's default settings for substeps. Basically, I just kept increasing it until I could make the stuff fall fast without piles of stuff pushing each other out of the world through the corners.
It works pretty well, all things considered. And using the techniques I'd picked up while implementing this, I also created a surreal little day/night cycle using 2 dynamic spotlights attached to a pivot. I feel like I'm starting to get the hang of Blitz for the first time since buying it.
Regarding Tokamak, is there any way to make the entities stop moving when they get close enough to "at rest?" They do that automatically on a flat surface with the built-in gravity active, but I guess I'd have to implement it manually using Active and Isactive, coupled with in-game triggers such as "this object has been sitting around idling, minding its own business, but it just got touched by a player."
I'm still eager to hear if there's anything I can do to read an entity's mass.
to summarize: That's the secret, folks! If you want Tokamak to do thigs it wasn't designed to do, you have to script the gravity yourself manually. If you want manually scripted physics to look nice and use all the Tokamak trimmings, you have to set the the TOKSIM_Advance command's substep value RIDICULOUSLY HIGH, like(1.5/FPS,10) or something. And if you do this, it slows down your game's FPS noticibly.
In the end, it's up to you to decide how badly you want your weird little special effects, and what you're willing to sacrifice to achieve them. For my game, which I'm planning to be pretty high-concept, I think it might be worth it to make sure the physics are both convincing and dynamic. For an FPS (First Person Shooter, this time, not Frames Per Second,) on the other hand, I'd probably lay the graphics on heavier and worry less about physics.
Say, if I post the entire code so far, would you guys be willing to help me optimize things...? :)