▲ 100 ▼ Big Decimals: Stop Using Floats or Cents for Money (medium.com) submitted 10 months ago by Trev13@programming.dev to c/programming@programming.dev 54 comments fedilink hide all child comments
[–] MonkderVierte@lemmy.zip 12 points 10 months ago (1 child) And KSP (rocket exploding game) had ten years worth of floating point errors. permalink fedilink source parent hideshow 2 child comments replies: [–] Treczoks@lemmy.world 8 points 10 months ago (1 child) Like Minecraft has, too. Just go on a long, long walk in one direction. permalink fedilink source parent hideshow 2 child comments replies: [–] LowtierComputer@lemmy.world 3 points 10 months ago (2 children) What happens? permalink fedilink source parent hideshow 4 child comments replies: [–] ZILtoid1991@lemmy.world 5 points 10 months ago (1 child) The physics starts to glitch out, or at least used to, until it got upgraded to doubles. I also use doubles for my game engine, as well as (optionally) limiting pixel-precise things within int.max and int.min. permalink fedilink source parent hideshow 2 child comments replies: [–] LowtierComputer@lemmy.world 2 points 10 months ago (1 child) Does the world repeat after a set point? permalink fedilink source parent hideshow 2 child comments replies: [–] ZILtoid1991@lemmy.world 3 points 10 months ago Technically yes, and with tile layers, you can even set them repeating on a shorter area. permalink fedilink source parent [–] Treczoks@lemmy.world 3 points 10 months ago (2 children) All kinds of weird things. There is a video explaining the details, and you've got to be far, far out. permalink fedilink source parent hideshow 4 child comments replies: [–] LowtierComputer@lemmy.world 2 points 10 months ago I'll have to look it up after work. Sounds interesting. permalink fedilink source parent [–] ICastFist@programming.dev 2 points 10 months ago (2 children) Used to*, it was fixed in some version or another, where the procgen no longer evaluated how far you were from the origin permalink fedilink source parent hideshow 4 child comments replies: [–] kuberoot@discuss.tchncs.de 2 points 10 months ago The game, including worldgen, will still bug out at longer distances - the issues were reduced and a world limit was added to prevent you going too far, and IIRC past a certain point the world turns into non-stop ocean, but I'm pretty sure if you bypass those limits you'll encounter chunks that outright fail to generate. permalink fedilink source parent [–] Treczoks@lemmy.world 2 points 10 months ago OK, I have not played it for AGES. Nice to see something like that fixed, as it was a bit system-inherent. permalink fedilink source parent
[–] Treczoks@lemmy.world 8 points 10 months ago (1 child) Like Minecraft has, too. Just go on a long, long walk in one direction. permalink fedilink source parent hideshow 2 child comments replies: [–] LowtierComputer@lemmy.world 3 points 10 months ago (2 children) What happens? permalink fedilink source parent hideshow 4 child comments replies: [–] ZILtoid1991@lemmy.world 5 points 10 months ago (1 child) The physics starts to glitch out, or at least used to, until it got upgraded to doubles. I also use doubles for my game engine, as well as (optionally) limiting pixel-precise things within int.max and int.min. permalink fedilink source parent hideshow 2 child comments replies: [–] LowtierComputer@lemmy.world 2 points 10 months ago (1 child) Does the world repeat after a set point? permalink fedilink source parent hideshow 2 child comments replies: [–] ZILtoid1991@lemmy.world 3 points 10 months ago Technically yes, and with tile layers, you can even set them repeating on a shorter area. permalink fedilink source parent [–] Treczoks@lemmy.world 3 points 10 months ago (2 children) All kinds of weird things. There is a video explaining the details, and you've got to be far, far out. permalink fedilink source parent hideshow 4 child comments replies: [–] LowtierComputer@lemmy.world 2 points 10 months ago I'll have to look it up after work. Sounds interesting. permalink fedilink source parent [–] ICastFist@programming.dev 2 points 10 months ago (2 children) Used to*, it was fixed in some version or another, where the procgen no longer evaluated how far you were from the origin permalink fedilink source parent hideshow 4 child comments replies: [–] kuberoot@discuss.tchncs.de 2 points 10 months ago The game, including worldgen, will still bug out at longer distances - the issues were reduced and a world limit was added to prevent you going too far, and IIRC past a certain point the world turns into non-stop ocean, but I'm pretty sure if you bypass those limits you'll encounter chunks that outright fail to generate. permalink fedilink source parent [–] Treczoks@lemmy.world 2 points 10 months ago OK, I have not played it for AGES. Nice to see something like that fixed, as it was a bit system-inherent. permalink fedilink source parent
[–] LowtierComputer@lemmy.world 3 points 10 months ago (2 children) What happens? permalink fedilink source parent hideshow 4 child comments replies: [–] ZILtoid1991@lemmy.world 5 points 10 months ago (1 child) The physics starts to glitch out, or at least used to, until it got upgraded to doubles. I also use doubles for my game engine, as well as (optionally) limiting pixel-precise things within int.max and int.min. permalink fedilink source parent hideshow 2 child comments replies: [–] LowtierComputer@lemmy.world 2 points 10 months ago (1 child) Does the world repeat after a set point? permalink fedilink source parent hideshow 2 child comments replies: [–] ZILtoid1991@lemmy.world 3 points 10 months ago Technically yes, and with tile layers, you can even set them repeating on a shorter area. permalink fedilink source parent [–] Treczoks@lemmy.world 3 points 10 months ago (2 children) All kinds of weird things. There is a video explaining the details, and you've got to be far, far out. permalink fedilink source parent hideshow 4 child comments replies: [–] LowtierComputer@lemmy.world 2 points 10 months ago I'll have to look it up after work. Sounds interesting. permalink fedilink source parent [–] ICastFist@programming.dev 2 points 10 months ago (2 children) Used to*, it was fixed in some version or another, where the procgen no longer evaluated how far you were from the origin permalink fedilink source parent hideshow 4 child comments replies: [–] kuberoot@discuss.tchncs.de 2 points 10 months ago The game, including worldgen, will still bug out at longer distances - the issues were reduced and a world limit was added to prevent you going too far, and IIRC past a certain point the world turns into non-stop ocean, but I'm pretty sure if you bypass those limits you'll encounter chunks that outright fail to generate. permalink fedilink source parent [–] Treczoks@lemmy.world 2 points 10 months ago OK, I have not played it for AGES. Nice to see something like that fixed, as it was a bit system-inherent. permalink fedilink source parent
[–] ZILtoid1991@lemmy.world 5 points 10 months ago (1 child) The physics starts to glitch out, or at least used to, until it got upgraded to doubles. I also use doubles for my game engine, as well as (optionally) limiting pixel-precise things within int.max and int.min. permalink fedilink source parent hideshow 2 child comments replies: [–] LowtierComputer@lemmy.world 2 points 10 months ago (1 child) Does the world repeat after a set point? permalink fedilink source parent hideshow 2 child comments replies: [–] ZILtoid1991@lemmy.world 3 points 10 months ago Technically yes, and with tile layers, you can even set them repeating on a shorter area. permalink fedilink source parent
[–] LowtierComputer@lemmy.world 2 points 10 months ago (1 child) Does the world repeat after a set point? permalink fedilink source parent hideshow 2 child comments replies: [–] ZILtoid1991@lemmy.world 3 points 10 months ago Technically yes, and with tile layers, you can even set them repeating on a shorter area. permalink fedilink source parent
[–] ZILtoid1991@lemmy.world 3 points 10 months ago Technically yes, and with tile layers, you can even set them repeating on a shorter area. permalink fedilink source parent
[–] Treczoks@lemmy.world 3 points 10 months ago (2 children) All kinds of weird things. There is a video explaining the details, and you've got to be far, far out. permalink fedilink source parent hideshow 4 child comments replies: [–] LowtierComputer@lemmy.world 2 points 10 months ago I'll have to look it up after work. Sounds interesting. permalink fedilink source parent [–] ICastFist@programming.dev 2 points 10 months ago (2 children) Used to*, it was fixed in some version or another, where the procgen no longer evaluated how far you were from the origin permalink fedilink source parent hideshow 4 child comments replies: [–] kuberoot@discuss.tchncs.de 2 points 10 months ago The game, including worldgen, will still bug out at longer distances - the issues were reduced and a world limit was added to prevent you going too far, and IIRC past a certain point the world turns into non-stop ocean, but I'm pretty sure if you bypass those limits you'll encounter chunks that outright fail to generate. permalink fedilink source parent [–] Treczoks@lemmy.world 2 points 10 months ago OK, I have not played it for AGES. Nice to see something like that fixed, as it was a bit system-inherent. permalink fedilink source parent
[–] LowtierComputer@lemmy.world 2 points 10 months ago I'll have to look it up after work. Sounds interesting. permalink fedilink source parent
[–] ICastFist@programming.dev 2 points 10 months ago (2 children) Used to*, it was fixed in some version or another, where the procgen no longer evaluated how far you were from the origin permalink fedilink source parent hideshow 4 child comments replies: [–] kuberoot@discuss.tchncs.de 2 points 10 months ago The game, including worldgen, will still bug out at longer distances - the issues were reduced and a world limit was added to prevent you going too far, and IIRC past a certain point the world turns into non-stop ocean, but I'm pretty sure if you bypass those limits you'll encounter chunks that outright fail to generate. permalink fedilink source parent [–] Treczoks@lemmy.world 2 points 10 months ago OK, I have not played it for AGES. Nice to see something like that fixed, as it was a bit system-inherent. permalink fedilink source parent
[–] kuberoot@discuss.tchncs.de 2 points 10 months ago The game, including worldgen, will still bug out at longer distances - the issues were reduced and a world limit was added to prevent you going too far, and IIRC past a certain point the world turns into non-stop ocean, but I'm pretty sure if you bypass those limits you'll encounter chunks that outright fail to generate. permalink fedilink source parent
[–] Treczoks@lemmy.world 2 points 10 months ago OK, I have not played it for AGES. Nice to see something like that fixed, as it was a bit system-inherent. permalink fedilink source parent