• 1 Post
  • 143 Comments
Joined 2 months ago
cake
Cake day: April 10th, 2025

help-circle

  • sp3ctr4l@lemmy.dbzer0.comtoProgrammer Humor@programming.devchoas
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    20 hours ago

    Yep, those first 3 are either exactly or almost exactly what I ended up with when I toyed around with making something similar, haha.

    Honestly, I think what you are describing as ‘janky workarounds’… are actually how you do this right, they are ‘efficiently implemented game mechanics’.

    Maybe the code could be cleaned up and de-spaghettified a bit, but I’ve seen many other systems like this in many games and mods.

    If it seems stupid, but it works… it isn’t stupid.

    The word for that is actually ‘clever’.

    … you’d be amazed how much enterprise level business software, for instance, relies on some weird ancient library or function that literally has a comment in the code that says “I do not know why this works, but it does, DO NOT CHANGE”.

    But also: oh god WATER.

    Fuck video game water rofl.

    I feel your pain.


  • sp3ctr4l@lemmy.dbzer0.comtoProgrammer Humor@programming.devchoas
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    20 hours ago

    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?


  • As another mod maker/game tinkerer…

    Genuinely, how did you fix this?

    If I understand this right, the problem would be… ignoring certain collision meshes/hulls while in grapple movement mode… but then if you stop your grapple while basically inside or intersecting with those meshes/hulls, now insane nonsense happens, right?

    Assuming this is an OoT hookshot style, just throw the player directly at the grapple end point thing, and not a more complex and realistic ‘throwing and climbing a rope like a mountain climber’ style grapple… the way I would try to address this would be:

    Give the grapple movement mode some kind of shut down mechanism/recovery.

    Like… oh the player is still trying to grapple toward point A… but they aren’t moving at anywhere near the speed they would be if they were unobstructed, cancel the grapple mechanic.

    Or: oh, the player is in grapple movement mode, but they collided with something, and they’re nowhere near the grapple end point, stop the grapple mechanic and stop moving them.

    For either (or both) of these, at the end now transition the player into some kind of specifically designed ‘grapple mode has failed due to an obstruction’ state, where the player now gets some amount of damage, a ‘collided into object’ animation, during which the player gets repositioned into a ‘collison safe/no collision violation’ nearest position, like a ‘get unstuck’ check in an mmo or something.

    Or another way would be: before the player actually begins being moved by the grapple… do the vector trace from the player, to the end point, and around that vector, quickly draw a large box, rectangular cuboid, perhaps with endcaps of some kind… that just projects what the straight line movement of the player’s collision hull would be… maybe make it a bit bigger than the player’s collision hull just to be safe…

    …just ‘draw’ that real quick, if it intersects with anything, no can do chief, grapple attempt fails, doesn’t engage.

    That would at least work for static world objects that don’t move, you’d still also need one or both of the above methods to handle colliding with things that can move, npcs, other dynamic objects.




  • Amazon still can’t even figure out how to reliably get human drivers door passcodes into an apartment building, and then into its mail/package locker room.

    The map system it uses for telling drivers how to get around a city to make deliveries is also garbage, can’t account for traffic, punishes people for using faster side routes to get to the same place, tells you to park in areas that either have no parking at all, or where parking there would majorly disrupt traffic, or assumes available street parking will always exist in places and times it almost never does.

    I once did an Amazon delivery gig where they booked me in for the time slot, I get to the FC, after waiting an hour they tell half of us: ‘oops we booked too many drivers, so today you all get $200 for showing up and doing nothing, go home now’

    ???


  • the issue with dosage is more likely to be in the opposite direction, with significant side effects due to overdosing.

    Yes, I wasn’t clear enough about it, but that is what I would be worried about, lol.

    Its… probably not just as simple as a direct proportion between cow weight:cow cow dose to human weight:human dose… as … humans are not cows.

    I suppose if you overdose hard enough, it would cure COVID in addition to the brain worm

    I remember reading hermancainaward posts about idiots who did actually take waaay too much oral (or in some cases, suppository…) ivermectin…

    So now they’re on a ventilator from the covid, and also uncontrollably shitting themselves and massively dehydrated.

    Can’t say I remember a case of ivermectin OD leading to CNS shutdown… but yeah.

    Covid skeptic/deniers were and still are astoundingly, lethally, suicidally stupid.

    EDIT: Also, … ataxia.

    Could ataxia lead to muscular control difficulty with say… your diaphagm, your throat?

    Boy would that be counter productive as a covid ‘cure’ fucking christ…


  • … somewhat ironically, it is at least barely, slightly plausible that ivermectin could have taken out the brain worm…

    it is an actual anti-parasitic, but uh… its only been tested and approved as an anti-parasitic for humans via oral ingestion…

    … but it is intravenously administered to cows and pigs as an anti-parasitic.

    So… IV ivermectin in a human could potentially work, but … good luck figuring out the right dosage, and hopefully human bio chemistry and blood brain barrier just function identically as within pigs and cows.

    I am not a medical expert, but I suspect that latter part just maybe might not be a great assumption.



  • sp3ctr4l@lemmy.dbzer0.comtoScience Memes@mander.xyzwhat is north?
    link
    fedilink
    English
    arrow-up
    58
    arrow-down
    34
    ·
    edit-2
    3 days ago

    Mark here either has poor reading comprehension, or is intentionally being a little shit by cherry picking part of the title and not reading the whole thing.

    The location specified is not ‘north of Antarctica’.

    It is, ‘the Weddell Sea, north of Antarctica.’

    Giving ‘the Weddell Sea’ as the location is actually decently specific, and the ‘north of Antarctica’ that follows is modifying / adding to the description of ‘the Weddell Sea’… not the entirety of the location description.

    I would snarkily, rhetorically, ask if people are even taught how to diagram out a sentence structure anymore, but I already know the answer is ‘not really, no’, because the average adult American literacy level is that of a 6th grader.

    Mark, and anyone else who also finds this to be a funny, poignant zinger, need to go back to middle school and relearn grammar.






  • sp3ctr4l@lemmy.dbzer0.comtoScience Memes@mander.xyzAirbuddy 🦛
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    5 days ago

    Happy to help put a little getty-up in your get-along, haha!

    I feel like I am part of a rather rare confluence of relavant demographics here:

    Was raised around horses, have dated horse girls, have ridden and cared for horses.

    Have been a copy editor for a student newspaper.

    Have also done a lot of game modding and aleays been a tech dork, so the kinematics/mechanics of properly animated horses are also interesting that way.