Clarissa Toney :linux: on Nostr: I hate using magic numbers and making assumptions, but I just added a hardcoded case ...
I hate using magic numbers and making assumptions, but I just added a hardcoded case to the camera code where if the map is 31 tiles wide or less, the camera's x position locks to the center of the map. It's honestly the cleanest solution
#GameDev #IndieDev #Programming
Published at
2024-06-07 03:04:26Event JSON
{
"id": "3382b08db682237a4c31c91afc1d21efd7333008a1bc9c4dc656fb0d3f76684b",
"pubkey": "03d1d576e07584d647c53e8f2f49e19d163da1b7ae0d89c29aef260236871356",
"created_at": 1717729466,
"kind": 1,
"tags": [
[
"t",
"indiedev"
],
[
"t",
"programming"
],
[
"proxy",
"https://peoplemaking.games/@ClarusPlusPlus/112573118338913132",
"web"
],
[
"t",
"gamedev"
],
[
"proxy",
"https://peoplemaking.games/users/ClarusPlusPlus/statuses/112573118338913132",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://peoplemaking.games/users/ClarusPlusPlus/statuses/112573118338913132",
"pink.momostr"
]
],
"content": "I hate using magic numbers and making assumptions, but I just added a hardcoded case to the camera code where if the map is 31 tiles wide or less, the camera's x position locks to the center of the map. It's honestly the cleanest solution\n#GameDev #IndieDev #Programming",
"sig": "d8d23337ab5b2938a00599afedd95840fc587a0990933d6a5aa5e95e9e7ae255c1f30864a3c49aa0bfeaa3888f7ddf02a76620f99ec8b1525f94d671980fb1b7"
}