Mr. Project DX

Discuss and unveil current Marathon projects.

Re: Mr. Project DX

Post Oct 18th '16, 14:41

Holy, moley, great balls of fire! That's probably the first time I've thought flames looked good in this engine, and it seems all you're using tech-wise is transparency and bloom. Most impressive.

Kuurin wrote:I was looking at Crater's bridge gimmick, and it reminded me that the real problem with 3d stuff is that you're still using the hit cylinders which are a boondoggle for anything that isn't a cylinder. You walk off of the proxy polygon and your head goes through a bridge span on the way down. The engine doesn't respect the 3d geometry outside of rendering it when it does. It worked great with sprites back in the day, but anything rectangular sucks noise unless you use many invisible objects and some math to make up a sort of volume. I'm looking into using search tables and trees and CSsy crap like that to Lua it into the game where you can have projectiles and monsters and players respect rectangular prisms of volume. It will probably be slow and messy.


So I confirmed this. The bridge can be any shape that map geometry in general supports. But you can't collide with the sides of a bridge; only the top, plus the step height. The problem can be minimized by using thin bridges, avoiding inside corners, and only using adjacent bridges if they function as stairs (this last is covered in the documentation).

If you want to do better using 'CS-y' tricks, I would suggest detecting when the collision should happen in Lua (look for the height check), and then dynamically spawning an invisible scenery object off of which the player can bounce (or more accurately, slide). If you can tolerate one frame of getting inside the bridge, the amount of calculation should compare favorably.
User avatar

Crater Creator

Post Oct 19th '16, 03:39

Crater Creator wrote:Holy, moley, great balls of fire! That's probably the first time I've thought flames looked good in this engine, and it seems all you're using tech-wise is transparency and bloom. Most impressive.


Thanks.

Crater Creator wrote:If you want to do better using 'CS-y' tricks, I would suggest detecting when the collision should happen in Lua (look for the height check), and then dynamically spawning an invisible scenery object off of which the player can bounce (or more accurately, slide). If you can tolerate one frame of getting inside the bridge, the amount of calculation should compare favorably.


Basically that's the only way. Of course the manner in which the player interacts with scenery is no picnic either. Sliding is just one possibility. Working with so much scenery has shown me that many times you'll just get bound up and stopped in your tracks if the angle is off. That and the dimensions of the cylinder are set in place, so you'd need a very general object yet one that suits most possibilities and also moves with the player. Moving objects seems to make them less than entirely solid while in transit, judging by my swinging doors, although I'll need to test that rigorously to make sure.

Anyway, I started thinking about your script, and that helped me to script some better swimming behavior. The player can dive and such, and then when they want to surface they can keep their head above water entirely while holding down the swim key. I had to disable "swimming" in MML to pull it off, but I also disable weapons while doing what I call swimming since it's more like actually swimming in water than "swimming" when you have a gun in your hand and are basically moving upright (walking) through the water like it's thick air. The result being that right now the alternate fire key does what the run key used to do, more or less. You can't surface by default, just like before.

But, while the run or now alt fire key is not being held down, you can swim up or down depending on aim and forward movement, even down to the floor (although when the player's z is under the floor (though we never let them go far enough to start clipping the floor), a difference of 0.3 WU will make it impossible to pass into polygons where there's a z difference in either the ceiling or floor on the side you want to cross. I forget what affects player step height.)

The only caveat is that unless you hold the alt fire/swim key, you won't surface.

The issue is that in order to move forwards or perpendicular when the player's head is above water (where the camera won't breach the surface of the media and spoil the faders and fog that make the water look good underwater but won't render unless the player's head is under water), the player has to have its feet on the ground or have its head under water. These are both impossible, unless you reposition the player and back between physics and rendering.

Ah, but then that's basically what your script does to pull off movement on 3d scenery, right? Now the only problem is that the faders for the liquid still show up after all. So, we just remove the liquid, move the player's z to the polygon's floor z, then in postidle reposition the player back to where they were, and replace the liquid. Again, trying to push stuff between physics and render. Still some bugs with it, but in general it works really great.
User avatar

Kuurin

Post Oct 20th '16, 00:55

Here's a video of some buggy swimming. Drowning included.

https://youtu.be/qMLWbjyK5B8
User avatar

Kuurin

Post Oct 20th '16, 21:55

Whipped up some nicer, animated water. Thanks to Goran for putting out a plug-in from which I was able to understand how to make that work.

https://youtu.be/zkSSMUgJpB8
User avatar

Kuurin

Previous

Return to Projects



Who is online

Users browsing this forum: No registered users

cron