So back in development of TPoC, I asked myself: What kind of features would I like in the game? What would be the best way of doing things? And one of my bug bears was navigation.
The compass never really did anything useful, and I always found it hard to remember paths to different locations. I've seen other developers using various ways of tackling this problem, map inventory, player portrait map etc. But nobody seemed to have played with the compass itself.
Soon after exploring the RAGs designer I came across the line of code that lets you change the compass image:
Media: Set Main Compass Picture
Now considering the Compass is much bigger than the Room Picture (just above the up down compass), it seems logical to me to update that with a map, where the green dots indicates the direction you're heading towards.
So here's the code:
Condition: Multimedia: In Group > ![room.name].png > Compass
On Success: Media: Set Main Compass Picture: ![room.name].png
On Failure: Media: Set Main Compass Picture: <Default>
What the code above does is that it first checks whether the compass image exists based on the room's name. I added the ! in front because [room.name].png or [room.name].jpg would be more sensible choice for the actual Room Image. Now RAGS doesn't have a command that checks if an image exists in your media library at all, so I've picked the Multimedia: In Group as a solution. All you have to do is to add the compass images into your game, and put them in a Group - I've named mine Compass - and check if the image exists in that Group.
If the image is found (On Success) then replaces the default compass. If not, you don't want to do nothing, as the last compass image would be left behind, defeating the point of intuitive navigation that you're trying to create. So you set the Compass Picture to <Default> to reset it to normal.
When I used this for TPoC, I decided to make the map exactly representative of the zone / room I'm in. The problem of jumping from one zone to the next was the sense of continuity.giving little feedback when you move around the world as the map would flick from one zone immediately to the next.
To compensate for this, I've "zoomed out" a little with the current version, which gives more of a sense of actual movement when you navigate the world.
The demo code is here, feel free to have a play!
No comments:
Post a Comment