Here I am, once again. It's Friday, which means it's time for another blog post. Onwards!
The typical way to draw text in XNA is to load the fonts through a custom content importer called a Spritefont. However, little did I know until recently that you can draw your own fonts and load them almost the exact same way. In the picture above, you can see how the symbols are laid out. All I really needed to do was transform an existing font into .bmp format using separate software, add my own twist to it, and then add other details like outlining and gradients. You'll see the font in action below.
While a very necessary user interface to have, most players will usually only open this a few times through an entire playthrough. I'll describe the settings below.
- Display. This tab contains options for changing the screen resolution, fullscreen, vsync, gamma, and other options.
- Audio. This tab has options for changing the master, sound effect, ambiance, and music volume.
- Controls. This tab lets you change the keyboard controls of the game.
- Stats. A fun tab that shows the player various statistics, like "total deaths", "maps visited", and other information. I may end up moving this to a separate "Player Info" UI.
There is still some minor stuff I need to add in, like icons to represent the different tabs.
A pretty generic game dialogue interface. You click a button to begin conversing, they say words, you say words... repeat. I can have the character check if the player has an item, give the player a new rumor, take money, and other similar actions. It's not quite to the level I want it just yet, but it's getting there. I'll need to add saving and better option limiting, then I can it's on the level of Skyrim's dialogue. If not in code complexity, than in perceived functionality.
This took up the majority of my week, but I'm glad I have a better understanding of pathfinding. The purpose of A*(A-Star) pathfinding is for monsters and animals to find the lowest cost route from their position to the goal, and is perhaps the most popular method of pathfinding in 2D games. If you want to read more about this, here is one of the best articles I've read on the subject (complete with animations, too!). In the picture above, light gray tiles are open, dark gray tiles are walls, and red tiles have a higher cost to travel over. The red tiles can represent a swamp or river where movement is slower, and will discourage creatures from travel through them. However, if there is no other way, the creature will take the slower route.
I've been slowly updating the website when I can, and have changed over from using the default Squarespace commenting system to Disqus. If you don't have an account for Disqus, it's free and the a majority of websites use it. Some other styling features like image borders.
Lastly, I've been working on the character template for both the player classes and characters. Hopefully I'll be able to move away from those convenient but ugly gray blobs soon! It's the animation part that I'm not very good at yet.
That's the end of my past two weeks. I'm currently planning the crafting UI(s), so expect that next week.
Until next week!