Happy venting thread

DerpyFast
Pixel Perfection - Hot Pockets Spotted
Solar Supporter - Fought against the New Lunar Republic rebellion on the side of the Solar Deity (April Fools 2023).
Non-Fungible Trixie -
My Little Pony - 1992 Edition
Wallet After Summer Sale -
Friendship, Art, and Magic (2018) - Celebrated Derpibooru's six year anniversary with friends.

I’m finally getting back in the habit of getting code ideas at work, and then implementing them when I get home.
 
Navigation between rooms works as follows: each room has a four-digit number in its name. When the room loads, it gets the number, chops it into two smaller numbers, and those become that room’s x and y coordinates on a grid. When the player leaves the room, the game takes those numbers, and increments or decrements one of them depending on which exit the player takes. Then, it puts the numbers back together and loads the room that matches the new number. That way, I don’t have to manually code nearly as many connection points, and I can move a room around by changing its number. A Link to the Past appears to handle its dungeon layouts in a similar way.
 
Today, I found out how to turn this euclidean geometry into non-euclidean. I made an object where, if the player tries to leave the room, it tricks the game into thinking the player is in a different room. The result is that the game loads the room it thinks is next door. Nothing about this was hard; I’m just really pleased that it worked perfectly on the first try.
Interested in advertising on Derpibooru? Click here for information!
My Little Ties crafts shop

Help fund the $15 daily operational cost of Derpibooru - support us financially!

Syntax quick reference: **bold** *italic* ||hide text|| `code` __underline__ ~~strike~~ ^sup^ %sub%

Detailed syntax guide