Valheim's secret hell - Journey to the end of the world

Поделиться
HTML-код
  • Опубликовано: 13 янв 2025

Комментарии • 49

  • @Lynoxus
    @Lynoxus 2 года назад +28

    What's happening here has to do with how computers store numbers (and specifically the unity engine). Simply put, numbers that have fractions are represented in a pretty clever way.
    [Simplification that uses decimal instead of binary for the sake of example explanations] Here's how computers store these kinds of numbers. Suppose you have a number like 0.773. A certain amount of data (23 bits of 32, called the mantissa) goes to representing the number 733. Then you have another chunk of data that describes how far to the left or right the decimal point should be (this is 8 bits of 32), then a final bit describing whether it's positive or negative. It basically works that way, except in binary rather than decimal.
    There's a limit to how big that actual number (the mantissa) we can store. This is 8,388,608. Suppose one of our coordinates is 838,860. We'd only have one decimal place left to play with. This means there are only 10 different positions for each 1m in-game distance. If you go OVER that number, you now don't even have single-digit precision.
    Why does it let you go to the limit of a 32 bit integer, then? Well, this has little to do with how the game's world works (probably), it actually is just how the console works. The console is looking for a number you type, and it happens to be looking for an integer. Theoretically the highest value of a 32 bit float is incredibly high, since it can move the binary equivalent of a decimal place a huge amount.
    You have me interested on the Ashlands thing, so I'm going to look at the disassembled code and try to see whats's happening.

    • @Lynoxus
      @Lynoxus 2 года назад +10

      Okay so I think I've parsed the disassembled code and have an answer for why it generates Ashlands! (I hope you find this interesting because wow it's a mindfuck trying to read disassembled functions).
      Valheim has a GetBiome function, which does what you would expect. We expect Ashlands to be at the bottom of the world. To check for Ashlands, it more or less does the following.
      - Get the position 4000 units south of the player. (i.e the player's Y coordinate - 4000)
      - Find the magnitude of that distance (essentially how far away it is from 0,0)
      - If it's over 12000, the biome is Ashlands.
      You can imagine this best as Ashlands being anything outside a circle with a radius of 12000 centered at 0, 4000. So you can break out the pythagorean theorem and find that to the east, Ashlands begins at 11313, 0!
      Why does this not happen for the Deep North? Essentially because it's not coded the same, and so isn't exempt from oceans.

    • @Lynoxus
      @Lynoxus 2 года назад +8

      More specifically, the Deep North is coded the same as Ashlands, but in reverse (i.e. it adds 4000 instead of subtracts). However, it:
      1) Comes after Ashlands, so would always be overriden
      2) Deep North performs an additional check that takes the generated base terrain height and checks if it's under 0.40. If it is, it's ocean, if it isn't, it's Deep North. That's why there's no "deep north" at the top of the world, but there is ashlands at the bottom.

    • @BigBrianGameplay
      @BigBrianGameplay  2 года назад +5

      This is super interesting. Makes so much sense now why past Deep North you get Ocean followed by Ashlands! Thanks so much for this!

    • @Lynoxus
      @Lynoxus 2 года назад +4

      @@BigBrianGameplay Thanks, and thanks for the great video it inspired me to go check this stuff out, nice to have a silly thing to dive into.
      It does make me wonder at what distance Valheim will stop generating the map, but I guess since you can't teleport any further it's probably the farthest you can get.
      Honestly shocking the game doesn't instantly crash

    • @BigBrianGameplay
      @BigBrianGameplay  2 года назад +4

      You're welcome mate, let me know if you find out anything else because what you found is really cool!

  • @bladeriders
    @bladeriders 2 года назад +7

    So basically you transition into a 2D universe of creatures invisible to you because they’re on a 2D plane. Yeah that’s hell

  • @TheLaluciDaniel
    @TheLaluciDaniel Год назад +4

    It is all glass!
    The Crimson eye watches!
    WARNING! 16 // 16 // 16 // 16 // 16 //

  • @sunkistinabottle
    @sunkistinabottle 2 года назад +9

    0:10 I never knew Vikings got so close to launching people into space

  • @mikeappell9197
    @mikeappell9197 2 года назад +2

    The visual effects remind me of depictions in science fiction of what it's like to view 4D space as a 3D creature. Or, what it looks like to be in the event horizon of a black hole.
    Freaky and cool.

  • @matthewjenkins914
    @matthewjenkins914 2 года назад +3

    It looks like, from the regular map, that the Ashlands are a large circle that's just bigger than the map, so it creates the crescent shape of the Ashlands normally. But if you go off the map, you run back into the Ashlands via teh top edge of that massive circle

  • @jcaffery8414
    @jcaffery8414 Год назад +1

    brian never misses

  • @microman502
    @microman502 2 года назад +1

    oh my god, shit keeps spawning... This is really interesting, you've got a subscription from me!

  • @briondalion
    @briondalion Год назад +1

    This is just like how the universe exists irl as well, kinda weird. You go out to the edge of the universe, there's also a version of you, only it's still you, but in 2 dimensions on the surface

  • @Bukakanga
    @Bukakanga Год назад

    That force outside the edge is the current's force, which pushes us into the abyss while sailing on the edge. This force outside the actual playing world always going towards outside desert

  • @AverageJoe1999
    @AverageJoe1999 2 года назад +3

    I think what may be happening is not something to do with the edge of world push force, but a coordinate rounding error (I may be mistaken here), where the larger the coordinate number gets, the less precise everything's position gets, causing everything to flicker between the nearest coordinates.
    This may also explain why you can only move east and west at a certain point, because the east-west coordinate is at 0 and therefore has no rounding error.

    • @BigBrianGameplay
      @BigBrianGameplay  2 года назад +2

      This makes a lot of sense! I think my theory was debunked by someone else in the comments using a cheat engine to remove the force applied to the player and it was still glitching out in the same manner.
      It also didn't make sense to me that the force would be increasing radially, I mean it depends on how it is coded but surely a constant force if you drop off the edge of the sea would be the easiest thing to implement.

    • @dekippiesip
      @dekippiesip 2 года назад

      So in essence, we get some some quantum mechanics. Where your 'position' is less and less well defined.

    • @nootman4771
      @nootman4771 2 года назад

      This is correct and is technically known as floating point error. Floating point numbers are designed in such a way that they, well, have a floating point and can dynamically allocate a certain amount of memory to be stored in either the whole part of a number or the decimal part of a number. This amount of memory is limited though, so if you have a very large whole number then you'll have much less to give towards the decimal portion, leading to the weird behavior of everything being super blocky.

    • @Lynoxus
      @Lynoxus 2 года назад

      I explained in greater detail, but this is correct. Unity uses 32 bit floating point which hits predictable limits where things get increasingly wild.
      My guess with the not being able to move thing is that you hit some kind of break point where the amount each game tick that your movement changes your position by always gets rounded down to zero.

    • @Lynoxus
      @Lynoxus 2 года назад

      @@nootman4771 Oh did not realise you just replied about it too.

  • @tales9476
    @tales9476 2 года назад +1

    The spagetification kinda reminds me of the glitches that occur in KSP when the physics engine gives up. (mostly due to floating point errors compounding at the extremely large position values)

  • @6Twisted
    @6Twisted 28 дней назад

    Man discovers floating point errors.

  • @S.o.13
    @S.o.13 Год назад +1

    He traveled back in time

  • @khrismanauval4383
    @khrismanauval4383 Год назад +1

    Man just opening 5th dimension

  • @sabotagetyler
    @sabotagetyler Год назад +1

    oh naw vikings done found the lean

  • @Maceyoshiman
    @Maceyoshiman 2 года назад

    Great editing

  • @alexclark7284
    @alexclark7284 Год назад +1

    south ?

  • @BeltfedJoe
    @BeltfedJoe 2 года назад +1

    didnt it used to be ashlands at the north AND south before they added the frozen north? makes me wonder if the base of the world will just always be ashlands because they never thought us freaks would wanna do this kinda stuff lol

    • @BigBrianGameplay
      @BigBrianGameplay  2 года назад

      I wasn't sure as I didn't get the game at launch, but I had a look and the earliest reference (on Reddit) that I could find to the Deep North was only a few days after the game was first released. I guess that means Deep North always was there, but I do agree that the base of the world is Ashlands. I played around with it a bit more after filming this and it seems like there is a square with sides of 30 km around the map, and past that you get Ashlands.
      First Deep North reference I could find: old.reddit.com/r/valheim/comments/lffbhj/map_of_valheim_north_deep_north_south_ashlands/

  • @iuhchiuhhgbnr
    @iuhchiuhhgbnr 2 года назад

    You can disable instant dead/push force by cheat engine or edit game file (push force is very annoying)
    I do this long time ago but no one care my video at all lol

    • @BigBrianGameplay
      @BigBrianGameplay  2 года назад

      I just had a look at your vid, what happens if you then teleport out like a million km, do the visuals still glitch out like crazy?

    • @iuhchiuhhgbnr
      @iuhchiuhhgbnr 2 года назад

      @@BigBrianGameplay awww sorry didn't try it yet. I will answer you later

    • @iuhchiuhhgbnr
      @iuhchiuhhgbnr 2 года назад

      @@BigBrianGameplay Answer visuals still glitch out like crazy
      can't build anything in 2147483647

    • @BigBrianGameplay
      @BigBrianGameplay  2 года назад

      Interesting! Could you see your own character? I wonder what the cause of the visual glitch is then...
      Thanks for checking it out, I've subbed to show my appreciation haha

    • @iuhchiuhhgbnr
      @iuhchiuhhgbnr 2 года назад

      @@BigBrianGameplay No. Visual gitch is too much and blur the scene but you still can place object but it will instant break

  • @reginaldbeef
    @reginaldbeef 2 года назад +1

    Made it past the edge of the world and glitched into the backrooms