Ow that one hits me right in the briefcase
- 0 Posts
- 174 Comments
You could plausibly implement some physics to deal with it. If the player is moving into a surface, move them along the part of their grapple movement component that’s perpendicular to that surface. This will allow them to slide along walls/floors/ceilings realistically. For the case where they need to move “through” a small object, you could treat their collision as a sphere and have it collide with the object; for small objects, this could let them pass by. Eg. for grappling sideways over a small rock on the ground, their point of collision would be mostly below them and a bit to the right, but they’re being pulled mostly straight to the right, so they would move perpendicular to the point of contact and move up-right over the rock, then continue their grapple path. Depending on your game’s physics system there are other solutions, but for a typical game engine, that should work well.
Having taken an ML class, with some of my college notes I could do this and “understand” it… but the weights would still be a black box. AI training is black (box) magic.
The location that the player is visually interacting with would be different, but the world wouldn’t know that. Eg. in a cutscene, the player reaches out and touches a button on a control panel. If the player’s X is flipped, their left hand will be further left than their right hand, and will miss the button visually as they go to press it. Asymmetrical animations might also be fucked, ie. sidestep/jump right normally extends the left leg for leverage, but now their right leg would push off visually and they would still move right.
It isn’t technically wrong
Feathercrown@lemmy.worldto Selfhosted@lemmy.world•I'm guilty of not reading the f..ing documentationEnglish5·24 days agoDay 564: I have become lost in the forums amidst flake debate threads. Do not search for me, it is already too late.
I admire that glass’s self confidence
Feathercrown@lemmy.worldto Programmer Humor@programming.dev•The state should be purely passed through function inputs and outputsEnglish1·3 months agoThe factory helps make the goods though
Feathercrown@lemmy.worldto Programmer Humor@programming.dev•What's stopping you from writing your Rust like this?English51·4 months agoIt took me way too long to notice the horror on the right
Feathercrown@lemmy.worldto Programming@programming.dev•To people making shitty guides/tutorials.English31·4 months agoErm ackshually a monad is a monoid in the category of endofunctors
Feathercrown@lemmy.worldto Star Trek Social Club@startrek.website•Just Finished Lower DecksEnglish2·4 months agoHaven’t watched any yet, but I’ve heard good things about DS9.
Feathercrown@lemmy.worldto Star Trek Social Club@startrek.website•Just Finished Lower DecksEnglish2·4 months agoDare I ask what the 930th episode is?
Feathercrown@lemmy.worldto Star Trek Social Club@startrek.website•Just Finished Lower DecksEnglish4·4 months agoI’m a counterexample here, although that’s only an anecdote. Lower Decks was the first Star Trek show I’ve ever watched. Granted I was able to get some of the meta humor through cultural osmosis and hanging around other nerds, which was nice and may have helped.
Feathercrown@lemmy.worldto Technology@lemmy.ml•What is AI good for? (derogatory)English1·5 months agoFair!
Feathercrown@lemmy.worldto Technology@lemmy.ml•What is AI good for? (derogatory)English12·5 months agoWas this response also AI generated or do you just naturally sound like ChatGPT
Feathercrown@lemmy.worldto Technology@lemmy.ml•What is AI good for? (derogatory)English11·5 months agoWhat if they had to pay the relative costs of hiring a human vs asking an AI
Feathercrown@lemmy.worldto Programmer Humor@lemmy.ml•In case you've ever wondered why the Windows control panel was so awful...English3·5 months agoW H A T
Feathercrown@lemmy.worldto Programmer Humor@programming.dev•*Permanently Deleted*English2·5 months agoThe solution is clear: Don’t use any strings
Unnecessary “…”, and no, you don’t loop the check until the obstacle is passed any more than you would “loop” the player’s ordinary movement. As normal, each tick you attempt to move the player forward some distance. If there is an obstacle in the way, they’ll move less distance, which is fine-- this prevents them from rocketing up walls if they’re slightly below a target grapple point beyond the wall, as in the below scenario.
What would be more efficient? Depending on how the game physics work, the player’s collision mesh is probably a capsule, simple box, or sphere. It’s really not that expensive to add this check; the player is presumably already doing collision checks using their mesh every tick for like, standing on the ground and touching walls.
When did I ever say that you would accomplish this effect by nulling out one component of their movement vector? That idea is a fabrication of your own delusions. It’s pretty easy to do a mesh collision check, get the normal of the tri the player collided with, and use that to remove all the player’s movement in that direction. This is probably already part of the engine’s physics calculations anyways!
This could work, especially if the grappling hook is one of those ones where gravity stops affecting you (could be good for gameplay, that’s valid). But to construct this path in a realistic manner, you would need to do similar calculations to what you’re saying are inefficient, except all at once instead of spread over multiple frames. If you simplify the pathfinding checks to make the movement simpler, you could in most cases do the same thing with the player collision checks. Depends on how you implement it though I suppose. Too specific to cover all cases in a general discussion.
It is realistic that if I grapple into a surface I will move a shorter distance than if I was grappling freely, yes. This is true without friction etc. as well. Think of the extreme case: grappling directly downwards into the floor, in which case I would not move at all.
LMAO are you kidding me??
First of all you could do a check using a proper sphere rather than a mesh with tris. This can actually be faster than using a box-- eg. checking if two spheres (or a sphere and a point) collide is literally just a distance check compared to their combined radii. I bet even sphere-tri collision is easier than tri-tri, although my game engine knowledge doesn’t extend far enough to say for sure in that case.
They’re called that because boxes are common, not because they’re the best.
This entire line of critique is invalid because I wasn’t saying that at all. I’m saying that as a consequence of the collisions, they could pass around an obstacle; not that they could go through it. A rock under the player as they grapple sideways would push them upwards and slightly away due to the angle of the collision, and they could then continue moving sideways as before.
How on God’s green Earth could you possibly, after I literally just described the precise mechanism by which the player would interact with small objects, still believe that I meant they should simply pass through them??? Maybe if you read the whole post instead of replying to each sentence individually you would’ve made that connection. Yes, I see the irony; I did read your whole post first though.
If you apply the grapple as a force it’s literally the same collision calcs the player makes every single tick. If you can’t due to engine/game/etc. limitations, it’s still not that much extra collision calculation.
Try me. I am extensively aware of the way physics is typically handled in games. I will admit I don’t often use game engines, because I usually try to make 2d games from scratch and implement my own simple physics. But yes, I’m aware of how 3d engines handle physics as well.