choas
-
This post did not contain any content.wrote on last edited by [email protected]
Alt text: In the 60s, Marvin Minsky assigned a couple of undergrads to spend the summer programming a computer to use a camera to identify objects in a scene. He figured they'd have the problem solved by the end of the summer. Half a century later, we're still working on it.
Edit: seems I'm the third person to comment this! :')
-
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.
That just is running into the problem the original comment was trying to avoid in the first place:
You are constantly jamming into the surface and doing a whole bunch of collision checks to basically scrape the player across the surface...
...because you have to keep doing those checks in a loop untill you determine the obstacle is finally cleared, and then switch back to unrestricted or 'normal' grapple-movement.
You have to keep doing 3d vector collision mesh check calculations for the whole time the player is being 'scraped'... because you don't know when to switch 'perpendicular movement only' mode off, otherwise... so this is inefficient.
Assuming this is a 3D environment... there's no way you can just totally null out one dimension of the movement vector unless the player is perfectly perpendicular hitting a perfectly perpendicular surface.
If your level design is any degree of complex, with objects beyond basically perfect boxes that are all perfectly orientes to the world grid... and if the player is allowed to rotate... this doesn't work, your calcs still always involve 3 dimensions.
What you're saying might work in a 2D game... or I guess 2.5D, maybe?... but it wouldn't work in a 3D game.
...
Something possibly, sort of like what you've described, I think? but not really?... another idea that might work would be:
Upon detecting a collision, before the player has gotten to the grapple end point... the grapple movement basically complexifies with more nodes.
So you use a pathfinding algorithm to draw, instead of just a line between two points... now you have a point of origin where the player is, the end point, and a third point that is off to the side of the obstruction.
Now for that first segment, now the grapple pulls the player perpendicular to the obstruction surface, so it isn't constantly colliding and doing friction... and then when the player clears the obstruction, hits that midpoint, the movent vector changes.
This is basically what I described with doing the 'draw a giant skinny box' to check if a player can do an unobstructed grapple... but now more complicated as it involves 3D pathfinding...
This could possibly work, but it would take a good deal more work to optimize this, to make your entire world work with 3d path finding... normally, nav meshes are just done on more or less flat ground, up to some degree of incline... but now you also have to do this on literally all surfaces.
Again... this might work ... but it would take a lot of game dev work to implement, as you'd have to fully 3d navmesh every level... and this potentially would not handle complex surfaces well.
3D, aerial pathfinding in a very complex environment ... to my knowledge, still isn't really a thing many games have done very well, efficiently, with a general system. It usually just a bunch of manually placed aerial nav nodes, particular to the level itself... very intensive, manual work.
...
This will allow them to slide along walls/floors/ceilings realistically.
You have an odd definition of 'realistically'.
...
For the case where they need to move "through" a small object, you could treat their collision as a sphere...
Whoah whoah whoah wow ok gotta stop you there.
Spheres tend to be the absolute worst objects to use in a collision mesh or hull, because they are comprised of far, far more tris or rects than a box.
This is a terrible idea.
There is a reason hitboxes... are called 'boxes'.
...and have it collide with the object; for small objects, this could let them pass by.
I think what you are trying to describe is a common concept in games where many objects that are basically... clutter, vegetation, extra fluff... they just do not interact with the player collision mesh/hull at all, for many parts of the engine/game.
Like a uh, a small pile of trash or rock that doesn't interact with the core player movement controller, but it might interact with an inverse kinematics system that slightly modifies the player's animation so that their foot rests on top of the rubble or rock.
But uh... doing a 'estimate everything's size by bounding it with a sphere and then negating movement collision if its small?'
This is not something you'd want to call when the grapple attempt is started, it'd be a massive stutter or slowdown, you'd have to index every object in the level... and you'd end up with like, if you have a pile or array of many small things, all together... well individually they are all small, so you can phase through a pile of many small things that is in totality actually large.
This is the kind of thing you just design your whole game and level and objects around from the ground up.
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.
Again this 'solution' of yours (which just entirely abandons the concept of just not colliding with small objects, which you literally just described) just causes the problem the original comment was trying to avoid: having to do a whole bunch of collision calcs every time any obstacle is encountered.
... You speak as if you know what you are talking about, but you clearly do not.
Have you ever actually mocked up a 3 physics scenario in a game engine, or modded an existing game in a manner that is very reliant on or interactive with its physics engine?
wrote on last edited by [email protected]… You speak as if you know what you are talking about, but you clearly do not.
You are constantly jamming into the surface and doing a whole bunch of collision checks to basically scrape the player across the surface… …because you have to keep doing those checks in a loop untill you determine the obstacle is finally cleared, and then switch back to unrestricted or ‘normal’ grapple-movement.
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.
You have to keep doing 3d vector collision mesh check calculations for the whole time the player is being ‘scraped’… because you don’t know when to switch ‘perpendicular movement only’ mode off, otherwise… so this is inefficient.
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.
Assuming this is a 3D environment… there’s no way you can just totally null out one dimension of the movement vector unless the player is perfectly perpendicular hitting a perfectly perpendicular surface.
If your level design is any degree of complex, with objects beyond basically perfect boxes that are all perfectly orientes to the world grid… and if the player is allowed to rotate… this doesn’t work, your calcs still always involve 3 dimensions.
What you’re saying might work in a 2D game… or I guess 2.5D, maybe?.. but it wouldn’t work in a 3D game.
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![the 3d pathfinding idea]
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.
You have an odd definition of ‘realistically’.
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.
Spheres tend to be the absolute worst objects to use in a collision mesh or hull, because they are comprised of far, far more tris or rects than a box.
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.
There is a reason hitboxes… are called ‘boxes’.
They're called that because boxes are common, not because they're the best.
I think what you are trying to describe is a common concept in games where many objects that are basically… clutter, vegetation, extra fluff… they just do not interact with the player collision mesh/hull at all, for many parts of the engine/game. [...]
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.
Again this ‘solution’ of yours (which just entirely abandons the concept of just not colliding with small objects, which you literally just described) [...]
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.
[...] just causes the problem the original comment was trying to avoid: having to do a whole bunch of collision calcs every time any obstacle is encountered.
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.
… You speak as if you know what you are talking about, but you clearly do not.
Have you ever actually mocked up a 3 physics scenario in a game engine, or modded an existing game in a manner that is very reliant on or interactive with its physics engine?
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.
-
This post did not contain any content.
Only in 3D. In 2D, you slap some pixels on top and there's your scarf:
-
I want dresses, and I don't care if they clip through literally everything!
My bg3 character is female. She was in slacks until act 3 where she could finally have a dress
We looted everything. I feel like there are two dresses in the game: the robe Gale wears and a white dress you find in a Balders Gate house near the end of the game
-
Always have to remind myself of this when managers ask me if something could be done. If it's easy, I naturally get a little annoyed that they're even asking. But knowing that is my job, not theirs, and it's good that they ask. There's lots of places where they assume and things go badly.
Remember the phrase "it's not in-pattern". Another one is "it's possible, but expensive"
-
minecraft allows left-handedness ever since they added the off-hand mechanic
I think before that even
-
Now try to identify if it's a fish
There's no such thing called fish.
- Stephen Jay Gould (Biologist)
-
or you’re asking me to implement an accessory-anchor system all for the sake of a scarf
It... shouldn't be that difficult?
It's literally adding another piece of gear, like gloves, breastplate, helmet, etc. Now just repeat the process for a scarf.
You're assuming the game in question already had character customization in place.
-
or you’re asking me to implement an accessory-anchor system all for the sake of a scarf
It... shouldn't be that difficult?
It's literally adding another piece of gear, like gloves, breastplate, helmet, etc. Now just repeat the process for a scarf.
A character model is made up of "slots". The head slot, the chest slot, the legs slot and so on. When you equip a piece of gear, it replaced the body mesh in that slot. So a helmet model replaces the head, a cuirass replaces the chest, I think you follow. If you want a piece of gear to only partially cover the character, you need to create a new slot. But gear is easy to implement, since it conforms to the character's "body" and uses the same animations.
Now add a scarf. First, you need to create a new slot, so that equipping the scarf doesn't replace the head or chest. And then comes the question of animations. Are you going to have the scarf just lay flat against the character? That's the easiest approach, but it'll be completely static, look like ass and probably clip through at least some of your armors. You could use a cloth sim. If your scarf mesh has enough polygons, it'll look the best. But it's also computationally expensive, especially if you go with mesh-based collisions for maximum eye candy. And what types of objects can the scarf collide with? Just the character, or world objects as well? Every object the scarf collides with will create a whole new slew of physics calculations, all the time, dropping your performance in the gutter like a mob snitch. Or you could create a bespoke rig for the scarf. It'll look better than a static object and won't have a notable performance hit, but won't look as good as the cloth sim, especially since it won't collide properly with whatever else your character is wearing. And you'd need to create matching animations for literally every animation the character can possibly do. Every. Single. One. Your animators would want to murder you. And they will, when you come back to them a little later and say "Okay, real impressed with the scarf, now let's make 5 different ones. And I want capes."
TL;DR: It's not just another piece of gear.
-
This post did not contain any content.
Sure. Player character? No.
-
Only in 3D. In 2D, you slap some pixels on top and there's your scarf:
and add a couple of frames to the sprite sheet in order to animate the scarf if that's required.
-
Only in 3D. In 2D, you slap some pixels on top and there's your scarf:
wrote on last edited by [email protected]I tend to find it's the other way around. Once you've got a scarf modelled and rigged, it'll work* for all animations, but for animated 2D sprites you have a lot more things to do.
* May have visual artifacts like clipping
-
There’s already a codebase for bursting from the ground in an explosion of lava. Everyone wants that.
You’re the first person asking for a scarf, and our system doesn’t even know what a neck is.
Time for the old NPC-with-a-train-for-a-hat trick.
-
A character model is made up of "slots". The head slot, the chest slot, the legs slot and so on. When you equip a piece of gear, it replaced the body mesh in that slot. So a helmet model replaces the head, a cuirass replaces the chest, I think you follow. If you want a piece of gear to only partially cover the character, you need to create a new slot. But gear is easy to implement, since it conforms to the character's "body" and uses the same animations.
Now add a scarf. First, you need to create a new slot, so that equipping the scarf doesn't replace the head or chest. And then comes the question of animations. Are you going to have the scarf just lay flat against the character? That's the easiest approach, but it'll be completely static, look like ass and probably clip through at least some of your armors. You could use a cloth sim. If your scarf mesh has enough polygons, it'll look the best. But it's also computationally expensive, especially if you go with mesh-based collisions for maximum eye candy. And what types of objects can the scarf collide with? Just the character, or world objects as well? Every object the scarf collides with will create a whole new slew of physics calculations, all the time, dropping your performance in the gutter like a mob snitch. Or you could create a bespoke rig for the scarf. It'll look better than a static object and won't have a notable performance hit, but won't look as good as the cloth sim, especially since it won't collide properly with whatever else your character is wearing. And you'd need to create matching animations for literally every animation the character can possibly do. Every. Single. One. Your animators would want to murder you. And they will, when you come back to them a little later and say "Okay, real impressed with the scarf, now let's make 5 different ones. And I want capes."
TL;DR: It's not just another piece of gear.
TL;DR: It’s not just another piece of gear.
Yes it is. It's identical to adding a cape.
TL;DR: skill issue
-
You're assuming the game in question already had character customization in place.
I mean, if it doesn't then it's just adding to the model.
Django from Boktai had a scarf. I doubt it was difficult to add.
Even then, it becomes a problem of adding a gear system at all and a scarf is pretty irrelevant.
-
TL;DR: It’s not just another piece of gear.
Yes it is. It's identical to adding a cape.
TL;DR: skill issue
I didn't think I'd have to point out that adding a cape is a similar pain in the ass. Dynamic objects like scarves and capes are not the same as a shirt. If your character framework isn't set up for them from the start, implementing them is not as simple as "just plop it in there bruh".
-
I didn't think I'd have to point out that adding a cape is a similar pain in the ass. Dynamic objects like scarves and capes are not the same as a shirt. If your character framework isn't set up for them from the start, implementing them is not as simple as "just plop it in there bruh".
I didn’t think I’d have to point out that adding a cape is a similar pain in the ass.
Yeah, skill issue.
-
I didn’t think I’d have to point out that adding a cape is a similar pain in the ass.
Yeah, skill issue.
Right. Go add capes that aren't just rigged to the existing skeleton to Jedi Outcast or Morrowind, then come back and tell me how easy it was.
-
Right. Go add capes that aren't just rigged to the existing skeleton to Jedi Outcast or Morrowind, then come back and tell me how easy it was.
wrote on last edited by [email protected]Already done.
Soft-body physics aren't hard.
In fact, I challenge you to do it yourself so you can see exactly how easy it is.
-
Already done.
Soft-body physics aren't hard.
In fact, I challenge you to do it yourself so you can see exactly how easy it is.
Took you three minutes to implement soft body physics in the Quake 3 engine, huh? Show your work.