Sunday, March 28, 2021

RPG: Map Pins / Packaged Build / Sounds

Map Pins

This month had many improvements in the game. First off are Map Pins. I don't like the modern ARPG mechanic of "here's a quest you don't need to read, here's an arrow on your mini map pointing directly to the quest location, break everything there, and after that you'll get a new arrow with where to go next". Players don't read the quest text because there isn't any need to. On the other hand, modern players aren't going to get out the graph paper and take copious amounts of notes (nor should they have to).

I liked how Dragon Warrior on the NES did quests. You had to talk to the NPCs to get clues on where to go and what to do. But if you wanted to have any sort of break from the game, you were going to have to jot down a few notes to remember how everything came together for the next time you played. Just a few words and a marker on the map would suffice.

My game's presentation is of a giant map you're walking around on. What better way for a user to write down notes on quest items than as pins on a map. In the bottom right section under Notes, you can select to "Add Map Pin".


A dialog box will then appear where the map is centered asking for a name. (You can pan the map using the middle mouse button, so the map pins can be placed anywhere; not just where your player is.)


Give it a name, and the pin is placed! Multiple pins on the map...


Adding pins for areas I've never even been to but someone told me to go there...


You can toggle the visibility of the pins with the "Show Pins on Map" checkbox. Now someone can play the game, get a clue of a quest item, mark it on the map, and even if they don't play for weeks they'll have their notes loaded and ready to go. But at the same time it's not the modern complete hand-holding of a "go here arrow".  


Packaged Build

Something very important in software development (or anything really) is fast iteration and minimizing steps to deployment. When just debugging on my local computer it wasn't a big deal, but I commonly test this multiplayer with other computers. I've added a Post-Build event when compiling in Release to execute a batch file that packages the game up in a ready to deploy zip file.


One click in Visual Studio and I have a build ready for release...


It's not uploading anywhere (I'm not at that point yet), but that will be the natural addition to the script when the time comes.

Sounds

A while ago I had added random sounds that game characters could play (birds chirping from trees). Last month I added sounds when you got hurt. I had considered sounds to be a minor part of the game, but the more I played with them the more ideas I had.

All the code handling loading sounds and what sounds to use has now been externalized. Terrain tiles can now play sounds (waves on the beach), different sounds play depending on what you're moving on (walking on gravel vs walking on dirt vs walking on stone), and attack sounds play when using weapons. All volumes are adjusted based on your distance from them source of the sound.


These few additions have really made the world more immersive. When standing in the town, a street musician could be playing a song (fairly loud if you're close by). The beach isn't far off so you can hear the waves on the shore but much quieter than the musician. Then occasionally you'll hear birds chirping from the trees. If you walk through town on the path you get a unique sound for it.

Since the birds chirping is random and the volumes are based on your distance, it sounds very natural and immersive. (And if you cut down all the nearby trees, you won't hear birds singing anymore!) Sounds went from a minor part of the game to something that can be really key to the gameplay.