|
TooMuchAbstraction posted:Amateur game developer here. Most 3D games these days use "rigid bodies" for their physics simulations. Each one has mass and velocity, a shape (which may or may not accurately reflect the visuals; the shape typically is composed of one or more convex shapes like boxes, capsules, and spheres), and perhaps attributes like bounce elasticity (how much energy is lost in a collision) and friction and so on. When two rigid bodies intersect, the game will calculate the energy of the collision based on their velocities, masses, and the degree of intersection, and then attempt to force the two apart again. However, there isn't necessarily any effort made to ensure that the energy in a system is conserved -- that expulsion force can cause there to be more energy in the system than there was before the collision. If it also then doesn't actually succeed in removing the intersection between the two rigid bodies (perhaps because it removed the intersection in one area but added a different intersection in another area), then on the following frame even more energy is added to attempt to remove the collision...
|
# ? Jun 7, 2020 14:51 |
|
|
# ? May 28, 2024 16:10 |
|
TooMuchAbstraction posted:Amateur game developer here. Most 3D games these days use "rigid bodies" for their physics simulations. Each one has mass and velocity, a shape (which may or may not accurately reflect the visuals; the shape typically is composed of one or more convex shapes like boxes, capsules, and spheres), and perhaps attributes like bounce elasticity (how much energy is lost in a collision) and friction and so on. When two rigid bodies intersect, the game will calculate the energy of the collision based on their velocities, masses, and the degree of intersection, and then attempt to force the two apart again. However, there isn't necessarily any effort made to ensure that the energy in a system is conserved -- that expulsion force can cause there to be more energy in the system than there was before the collision. If it also then doesn't actually succeed in removing the intersection between the two rigid bodies (perhaps because it removed the intersection in one area but added a different intersection in another area), then on the following frame even more energy is added to attempt to remove the collision... Thanks for the writeup. My dumb rear end sees game glitches and just goes "why can't they just not let objects clip into each other, problem solved" but I know from experience, it's way more complicated than that, and lots of things have to clip together to make it look right, so weird things happen sometimes. Good news is I love game glitches!
|
# ? Jun 7, 2020 15:12 |
|
I teach classes in drawing and animation with code. When we get to the class where a circle 'bounces' off of the edge of the screen to change direction, it's fun to make the students figure out how. "Just check to see if it's passed the edge, then reverse the velocity!" circle hits the edge and then gets stuck flipping its position in and out of the detection area "Oh. Ohhhhhh that's why the Skate 3 glitch videos exist."
|
# ? Jun 7, 2020 16:17 |
|
I'm glad my eyesight is lovely enough that I don't need to run games higher than 30 fps
|
# ? Jun 7, 2020 16:18 |
|
lord funk posted:I teach classes in drawing and animation with code. When we get to the class where a circle 'bounces' off of the edge of the screen to change direction, it's fun to make the students figure out how.
|
# ? Jun 7, 2020 16:21 |
|
Remember that computers do not have intuition or common sense, they will only do exactly what you tell them and you need to explicitly tell them absolutely everything down to the smallest detail. This is something that it's hard for humans to wrap their brains around at every level of programming experience which is why you still get weird glitches even in AAA projects by large teams of veterans.
|
# ? Jun 7, 2020 16:24 |
|
Cardiovorax posted:Got any funny stories? What's the weirdest accidental behaviour one of your students somehow managed to make an object do? Not really. It's a very introductory course (99% of the students have never written code before). So it's a lot of drawing circles and squares. There are some great moments, though. Students don't really get 'optimization' yet (they've barely learned what a loop is). So they might have thousands of objects checking every pixel on the screen each frame, and it runs like a slideshow. Cleaning that up with them and then seeing their reaction when it runs at 60fps is always a treat.
|
# ? Jun 7, 2020 16:30 |
|
LifeSunDeath posted:Thanks for the writeup. My dumb rear end sees game glitches and just goes "why can't they just not let objects clip into each other, problem solved" but I know from experience, it's way more complicated than that, and lots of things have to clip together to make it look right, so weird things happen sometimes. Yeah, things clipping is...I wouldn't say it's unavoidable, but you're sharply limited on what you can do if you make it a rule that things are never allowed to intersect. The underlying issue for a lot of this is that game time isn't continuous, but occurs in (typically) 1/60th of a second increments. Consequently, game physics doesn't actually move objects around, it teleports them. On one frame you're at X position, on the next you're at X+1 position, without having occupied any of the space in-between. If there's a wall at X+.5 then whoops, you're slightly embedded into it. It's possible to avoid this, but it's expensive and complicated. Let's say your object is a box. That means that each frame, the game checks a rectangular shape to see if it's overlapping something. What you can do instead is "sweep" the box along its movement vector, for a length equal to the amount of distance the box moves each frame. This creates a new shape that covers all of the space the box would occupy during its movement, if time were continuous. You can then blap that shape down and check for collisions, and if you find one, do a bunch of math to figure out exactly when "during" that frame the collision occurred, and stop the box just short of collision. Similar swept collision detection also exists for 3D games (Unity has them for boxes, spheres, and capsules, for example). The problem is that they're sufficiently expensive that nobody I know of uses swept collision detection for standard physics behaviors. Instead they're reserved for things like "is there enough land in front of this unit for it to keep walking forward" -- stuff where if you just did a raycast (draw a line from point A to point B) you might get false positives.
|
# ? Jun 7, 2020 19:46 |
|
TooMuchAbstraction posted:Yeah, things clipping is...I wouldn't say it's unavoidable, but you're sharply limited on what you can do if you make it a rule that things are never allowed to intersect. The underlying issue for a lot of this is that game time isn't continuous, but occurs in (typically) 1/60th of a second increments. Consequently, game physics doesn't actually move objects around, it teleports them. On one frame you're at X position, on the next you're at X+1 position, without having occupied any of the space in-between. If there's a wall at X+.5 then whoops, you're slightly embedded into it.
|
# ? Jun 7, 2020 19:54 |
|
haveblue posted:Remember that computers do not have intuition or common sense, they will only do exactly what you tell them and you need to explicitly tell them absolutely everything down to the smallest detail. This is something that it's hard for humans to wrap their brains around at every level of programming experience which is why you still get weird glitches even in AAA projects by large teams of veterans. except neural nets, which in addition to lacking intuition or common sense, are also impossible to give explicit instructions to.
|
# ? Jun 7, 2020 20:02 |
|
Cardiovorax posted:And when your framerate doesn't match up with the update rate the physics engine expects, that's when the really weird poo poo happens. Then you know you are in a Bethesda game.
|
# ? Jun 7, 2020 20:04 |
|
Neural networks are very intuitive, which is why they tend to learn the completely wrong things anytime you leave their own devices. They're the digitalized essence of "that sounds about right-ish, let's go with that" as someone's basic attitude to life.
Cardiovorax has a new favorite as of 20:08 on Jun 7, 2020 |
# ? Jun 7, 2020 20:04 |
|
Tunicate posted:except neural nets, which in addition to lacking intuition or common sense, are also impossible to give explicit instructions to. The fun thing about Neural Nets is how they are impossible to debug not just because they are extremely complicated systems that develop themselves in a way that is not comprehensible to humans, but also because if you try to force a particular behaviour without adjusting your training/reward mechanism somehow, they have a habit of just evolving to completely bypass the hard coded behaviour because it sees it as less efficient. So basically any time you want a NN to change its behaviour, you have to retrain it from scratch and just hope it evolves it organically. The Cheshire Cat has a new favorite as of 21:06 on Jun 7, 2020 |
# ? Jun 7, 2020 20:17 |
|
And let's not forget that you need to randomize input and box them in with rules in regards to how they're allowed to act. Otherwise you'll get stuff like the machine that had a 100% detection rate of.. I believe it was poisonous mushrooms. Not because it had learned to recognize them, but because it recognized that the dataset wasn't randomized, so it knew the odd ones were safe, and the even numbered ones were dangerous. I remember it from a fun excel list I saw once, where there was an overview of various machine learning examples where the machines did out-of-the-box solutions such as that. A pretty useful resources for what -not- to do when setting up training examples.
|
# ? Jun 7, 2020 21:04 |
|
SubNat posted:And let's not forget that you need to randomize input and box them in with rules in regards to how they're allowed to act. Yeah, which is pretty funny because it basically boils right back down to the original statement: haveblue posted:Remember that computers do not have intuition or common sense, they will only do exactly what you tell them and you need to explicitly tell them absolutely everything down to the smallest detail. just with a bunch of extra steps thrown in the middle.
|
# ? Jun 7, 2020 21:08 |
|
you don't have to explicitly tell them anything you have to implicitly tell them everything
|
# ? Jun 7, 2020 21:15 |
|
SubNat posted:And let's not forget that you need to randomize input and box them in with rules in regards to how they're allowed to act. Yeah my favorite from that list was the one they were trying to train to detect cancerous moles, so it learned that pictures where a mole next to a ruler were cancerous and the ones where they were not weren't.
|
# ? Jun 7, 2020 21:54 |
|
There were a few that found very 'gordian knot' solutions. Like being tasked to sort lists, and deleting entries that didnt fit, because it's faster than moving them about.
|
# ? Jun 7, 2020 22:21 |
|
This is the list, I think: https://docs.google.com/spreadsheets/u/1/d/e/2PACX-1vRPiprOaC3HsCf5Tuum8bRfzYUiKLRqJmbOoC-32JorNdfyTiRRsR7Ea5eWtvsWzuxo8bjOxCG84dAg/pubhtml My favorite one I don't think is in the list- they used machine learning to design a chip to do a task, only to wind up with a chip that depended on the EM interference from garbage in seemingly unused parts of the die. Also: quote:Creatures exploit a collision detection bug to get free energy by clapping body parts together Help I'm trying to train creatures to evolve a survival strategy but they're dummy thicc
|
# ? Jun 7, 2020 22:27 |
|
Elfface posted:There were a few that found very 'gordian knot' solutions. Like being tasked to sort lists, and deleting entries that didnt fit, because it's faster than moving them about. nah that was too difficult, it just deleted the whole list because an empty list has no entries out of order Tunicate has a new favorite as of 22:33 on Jun 7, 2020 |
# ? Jun 7, 2020 22:29 |
|
Well, it's a perfectly valid solution to the problem, if no one remembers to specify that all the entries still have to be there afterwards.
|
# ? Jun 7, 2020 22:42 |
|
haveblue posted:My favorite one I don't think is in the list- they used machine learning to design a chip to do a task, only to wind up with a chip that depended on the EM interference from garbage in seemingly unused parts of the die. Yeah, probably since that was more evolutionary design in the pre-machine-learning-hype days. Or 'evolvable hardware.' even though it was the design that went through evolving iterations, as opposed to the hardware itself. I believe I know of the case you're referring to, where they used a tiny 10x10 FPGA way too simple to do the task in conventional ways, to see what design the computer could magic up after a couple thousand iterations. And it began using unconnected gates to manipulate nearby ones, by reading off the slight signal changes due to the intereference. Meaning that while the grid was 10x10, it could connect and run logic disconnected from the grid layout, thus increasing the complexity of tasks it could do. drat Interesting article which is probably where a lot of people heard about it: https://www.damninteresting.com/on-the-origin-of-circuits/ study: http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=6691182CC83AE8577D7C44EB9D847DA1?doi=10.1.1.50.9691&rep=rep1&type=pdf The whole 'evolutionary iteration' design thing was a pretty interesting blip, but it seems like it mostly got swallowed up under the general machine learning umbrella. SubNat has a new favorite as of 23:10 on Jun 7, 2020 |
# ? Jun 7, 2020 23:07 |
|
Sounds like neural nets are a lot like children.
|
# ? Jun 8, 2020 11:36 |
|
dialhforhero posted:Sounds like neural nets are a lot like children. nah, these days they spend a lot of money on supporting the future of machine learning
|
# ? Jun 8, 2020 12:43 |
|
haveblue posted:My favorite one I don't think is in the list- they used machine learning to design a chip to do a task, only to wind up with a chip that depended on the EM interference from garbage in seemingly unused parts of the die. There was another one (possibly from the same list) where the chip evolved without an oscillator, but was still clocked -- turned out one of the random greebles sticking off the side functioned as an antenna to pick up an oscillating radio tone from elsewhere in the lab. If you took it out of the room it stopped working.
|
# ? Jun 8, 2020 13:55 |
|
I've been having fun experiencing the path finding in mafia 3 In most games they just tell you to eat poo poo if the ai cant find a path to get you into the car but by god Lincoln Clay is determined as hell https://i.imgur.com/FN7xAT5.gifv https://i.imgur.com/HXWqlYH.gifv
|
# ? Jun 8, 2020 20:53 |
|
|
# ? Jun 8, 2020 20:55 |
|
He's just making little exercise goals for the day. Before you open the fridge, do ten squats. Before you get dressed, do ten pushups. Before you get in the car, run around the building and steamroll anyone who dares get in your way.
|
# ? Jun 8, 2020 21:00 |
|
moist turtleneck posted:I've been having fun experiencing the path finding in mafia 3
|
# ? Jun 9, 2020 01:58 |
|
SubponticatePoster posted:I've been having fun (sometimes) with the AI in Mafia 3. I'll kill a dude off by himself with a silenced gun, and somehow some rear end in a top hat on the other side of the map "sees" it and puts the whole area on alert. This has happened through walls, floors, ceilings, etc. And no matter where I am on the map they will always make a beeline to me. It does get hilarious when they come in a slow conga line and I just kill them from around the corner one after the other and end up with a huge pile of bodies in a stairwell or whatnot. Reminds me of playing a Splinter Cell game (I forget which, the one where Sam starts out as a civilian and gradually acquires his old kit over the course of the game). There's a bit with a well that comes out in the middle of a large open area with a fair number of guards wandering around. One of your ways to kill enemies is to lure them into poking their heads over an area where you're hanging, and you just grab them with one hand and yank them down to their deaths. I piled up at least a half-dozen guards at the bottom of that well.
|
# ? Jun 9, 2020 02:04 |
|
When you get a high enough level of stealth in Vampire the Masquerade the Bloodlines, the game completely breaks and enemies won't detect you even if you are right in front of them. The final area also has infinitely spawning enemies that rappel down from a helicopter, so you can just endlessly kill them, generating a huge pile of corpses.
|
# ? Jun 9, 2020 02:09 |
|
I prefer the MGS approach of using infinite tranq ammo to create large piles of enemies enjoying a peaceful nap
|
# ? Jun 9, 2020 02:11 |
|
There's also the elevator of death in Blood Money, where you can get up on top of the car and just murder people indefinitely. Not a glitch though.
|
# ? Jun 9, 2020 05:55 |
|
IShallRiseAgain posted:When you get a high enough level of stealth in Vampire the Masquerade the Bloodlines, the game completely breaks and enemies won't detect you even if you are right in front of them. The final area also has infinitely spawning enemies that rappel down from a helicopter, so you can just endlessly kill them, generating a huge pile of corpses. Also see: Alpha Protocol.
|
# ? Jun 9, 2020 08:54 |
|
Captain Hygiene posted:I prefer the MGS approach of using infinite tranq ammo to create large piles of enemies enjoying a peaceful nap When I play Dishonored, there's usually a dumpster called Naptime.
|
# ? Jun 9, 2020 10:14 |
|
SubponticatePoster posted:I've been having fun (sometimes) with the AI in Mafia 3. I'll kill a dude off by himself with a silenced gun, and somehow some rear end in a top hat on the other side of the map "sees" it and puts the whole area on alert. This has happened through walls, floors, ceilings, etc. And no matter where I am on the map they will always make a beeline to me. It does get hilarious when they come in a slow conga line and I just kill them from around the corner one after the other and end up with a huge pile of bodies in a stairwell or whatnot. https://i.imgur.com/a73gwki.mp4
|
# ? Jun 9, 2020 10:23 |
NoClip did a neat video on Dwarf Fortress https://www.youtube.com/watch?v=VAhHkJQ3KgY
|
|
# ? Jun 9, 2020 19:26 |
Kennel posted:Copied from the Steam thread. Actually badly thought virtual economy rather than a proper glitch, but fits here nicely: The tendency of the rate of return to fall to zero
|
|
# ? Jun 9, 2020 21:56 |
|
Captain Hygiene posted:I prefer the MGS approach of using infinite tranq ammo to create large piles of enemies enjoying a peaceful nap Some men just want to watch the world snore.
|
# ? Jun 9, 2020 23:58 |
|
|
# ? May 28, 2024 16:10 |
|
IShallRiseAgain posted:When you get a high enough level of stealth in Vampire the Masquerade the Bloodlines, the game completely breaks and enemies won't detect you even if you are right in front of them. The final area also has infinitely spawning enemies that rappel down from a helicopter, so you can just endlessly kill them, generating a huge pile of corpses. This reminds me of Rainbow Six Vegas 2's "Terrorist Hunt" mode, where enemies will start swarming on your position when they hear a gunshot. So, the optimal strategy is often just finding a chokepoint, firing your gun once, setting the sights at head height and just headshotting everyone with a single mouse click when they approach your position with no regard to the growing pile of corpses.
|
# ? Jun 10, 2020 09:24 |