Hi everyone,
This topic may turn into a discussion on design, but I feel it’s primarily a question of best coding practices. Sorry if I got it wrong.
I’m creating a small game / proof of concept for a puzzle in another game, based on elements of the magic system in Brandon Sanderson’s “Stormlight Archive”. If you’re a fantasy fan, I highly recommend it! I’m not sure what the rules are about derivative works, so I want to make it clear that the ideas here aren’t mine, and that I’m not selling this in any way.
Readers of Stormlight will be familiar with the concepts of the three lashings, but for those unfamiliar, here is what I want to do. I tried to make the following section containing the explanation collapsible, but am not sure how.
The player will have the magical ability to impermanently alter the definition of their personal gravity (including their inventory) and/or any visible object they choose, called a “basic lashing”. This effectively changes the direction of down for whatever is being lashed in this way, e.g. Turning the ceiling into the floor.
As well as basic lashings, they will also be able to perform full lashings and reverse lashings. A full lashing causes an object to adhere to a chosen surface without being able to freely move (such as binding a door to its frame or sticking an object to the wall), while a reverse lashing causes the lashed object to draw other objects toward it; sort of like a basic lashing, but making the surface attractive to something rather than attracting something to the surface.
At the moment, my primary focus is the first type, changing the direction of “down” for the player and visible objects. I already have a reasonable idea of how to get the game to observe the players orientation in the body text of the room description. Either by writing different room descriptions for the various orientations and directions the player could be facing in (“A room has some text called the ceiling-down description”, etc), or by writing an activity to change the room description body text based on orientation.
Other aspects seem more complex to me. Inform has some pretty good ideas about what is physically acceptable, and I intend to quite literally turn those ideas upside down, so here is where the questions start.
When the player is (say) standing on the north wall, their concept of direction will be completely different to when they had their feet sensibly on the ground. Assuming a perfectly square room, and that the player is still facing the same way, the former south wall is now the ceiling (up), while the former ceiling is now the north wall. If the player were then to walk up this wall and lash themself to the ceiling, the whole compass would then be the other way around. They might also want to turn around to see the room, which could be tilted at a number of admittedly nauseating angles.
Is there a way to rotate the compass in three dimensions so that the game will understand where the player wants to go based on their new understanding of what is where? Or is re-mapping every direction and adjacent room on each orientation change my best bet. I also considered doing away with the standard compass entirely and inventing a new set of subjective directions, but this sort of ruins the puzzle in the thing.
My second question has to do with the existing surfaces that the player and/or their targeted objects might occupy, and adjusting the player’s scope appropriately.
If a player is standing on the ceiling and they drop something without lashing it first, it’ll fall to the floor (player’s up), because gravity isn’t a lie, it’s just being lied to. But if they accommodate that eventuality, where does the object go?
I’ve considered creating a kind of enterable scenery supporter for valid surfaces and placing them in each room, but this poses a problem. If the player lashes something to the ceiling when they are on the floor, they shouldn’t be able to reach it unless they too are on the ceiling. Likewise, if they drop something while they’re hanging out up there and it falls down, it shouldn’t be accessible until they’re near it. How might I go about making that possible?
I’m aware this is probably going to be a lot of work, especially dealing with the strange scenarios the player could find themself in, e.g. Should there be a check to prevent the player from falling through a doorway and cracking their silly skull on the opposite wall of the adjacent room? What if the player lashes an object high up on a wall? How should the game decide when the binding force on objects runs out?
But I’ve always had fun with the idea of playing with gravity, and would enjoy doing it in a game, so I’m prepared. Opinions and advice appreciated, and I hope someone else has fun with this idea too. I searched for similar topics, but couldn’t find anything with the queries I tried.
Hope everyone’s well!