Author: Gene

Foobar2000 – The Windows Soundfont

Okay, this post is a bit different from what I normally write about here, but after the journey I went through to figure this out, I figured I’d share it with the internet because I know I’m not the only person that’s been through this and the amount of help out there is minimal at best. Well, I’m here to help!

So you want your midi files played in Foobar2000 to sound like they do in Windows Media Player Classic or Winamp, but you’ve downloaded the foo_Midi component and the audio presets it comes with are… not good. So what do you do? You Google, of course! And all you come up with is a bunch of less-than-helpful posts from folks across the breadth of the internet. Well, I’m going to tell you step-by-step how to get Foobar2000’s midi component to sound just like it would if you were to play your music in Windows Media Player Classic or Winamp. Let’s get started!

First thing you’ll want to do is grab the foo_Midi component and get it installed. Once that’s done you need to grab your Windows soundfont. I’m running Windows 10 and the soundfont can be found in the “\Windows\System32\drivers” folder. You’re looking for a file called [strong]gm.dls[/strong]. Copy it to your desktop or something, you don’t want to accidentally bork the original copy, so make a new one.

Once you’ve got your gm.dls file properly relocated, head on over to this site and download the demo of Extreme Sample Converter. You’ll only need the demo for this guide. Install it and boot the program. You’ll be greeted with the following:

Find your gm.dls file and before pressing convert, click the ‘Destination Format’ tab up in the menu bar. Look through the list and find “SF2 – Soundfont” and select the “Bank” sub-option. Once that’s done, go ahead and click the spiffy CONVERT button down below the file selection window. Give it a minute to convert your .dls file into a .sf2 file that Foobar2000’s midi component can work with. Once that’s done, it’s time to boot Foobar2000.

Once Foobar2000 is up and running, press Ctrl+P to open the preferences window. Navigate to the midi player component and set it up as shown here (be sure to set your SoundFont to gm.sf2!):

Having done that, mouse down to the Advanced option of the left menu. Open the “Playback” dropdown menu and then the “MIDI Player” dropdown. Change your settings to the following:

And that’s it. You’re done. When you play .midi files they should sound like the DOS games you probably remember from your youth. Enjoy!

Read More Foobar2000 – The Windows Soundfont

Fiancée Game – 10 – Nearing Feature Complete(-ish)

Estimated Hours of Work Since Last Update: ~27

   Time for another update! Work’s been particularly rough this year, on both fronts. I’ve definitely not had as much time to devote to Fiancée Game as I’d like, but I’ve made a great deal of progress in what time I’ve managed to squeak in here and there. I’d like to get at least one more dev stream in before the holidays start up full swing, but we’ll just have to wait and see if that’s possible. As usual, if you’d like a more detailed look at everything that’s taken place for this update, check out the Fiancée Game Trello or follow me on Twitter.

Combat
   The majority of this update has been mechanical and graphical updates to combat and many mechanics thereof. Since last time I’ve implemented the first tier of abilities for all the primary classes (magician, priestess, rogue, warrior), and fully completed the basic skills for the rogue (tiers 1 to 3). I’ve also added support for buffs/debuffs on all MOBs.


Stunning!

   In addition, I’ve finally gotten around to adding some animations to combat. It’s amazing how much better it feels to have enemies animating when they attack and having (basic) particle effects go off with attacks. There’s currently a bug in my particle implementation that causes it to only work when I’m testing it in the Unity editor, but I’ll get that fixed for the next update, ideally.

   To go alongside the combat updates I’ve gone ahead and gotten around to implementing a fair number of item properties. Mostly damage-dealing stuff, but properties like Stunning (has a small percent chance to stun an enemy on any attack) are also in there. If nothing else it gives me a large number of cool effects to work with.


Animations! Enemies flash red when they take damage and wiggle at the screen when they attack.

Character Creation
   Character creation has see an overhaul as well. The screen is now much clearer, has proper working tooltips, and I even managed to squeeze in a fifth class and added proper ability point allocation. Overall I’m much more pleased with the presentation. I’ve also gotten a proper ‘quick start’ implemented alongside finally getting around to implementing each class’s starting gear.


New and improved character creation.

   Character creation is now much cleaner looking than it used to be and also gives you more information on-screen. Alongside these implementations I also rebalanced starting class attributes to be generally lower than they were previously.

UI Improvement
   The UI has seen a bit of work, mostly in updating fonts and getting displays working as they should. We now have basic tooltips in the post-combat loot screen. I’ve decided against providing details for items found as part of loot, because I want the player to get an idea of what items are worth picking up through play as opposed to just mousing over everything and taking what’s worth the most money. The player won’t be able to actually gauge an item’s value until they take it to a shop to be sold.


Examining items after a fight gives you a little information, but not much.

   I’ve also finally gotten skill trees implemented to the point where I’m (more or less) happy with how they work with regards to UI functionality. I’m currently half working on getting them set to draw lines between skills that require one another (Backstab, for example, requires Shiv — I want the UI to automatically draw a line between the two skills), but it’s definitely a work in progress. I also got bored and added self-calculating values to tooltips; abilities that scale in effect now display their scaled numbers instead of giving a baseline and expecting the player to do math to figure out the proper numbers they’re working with.


Skill tree navigation and display. I still have some prettying up to do, but I’m happy with the layout. Lots of room to expand, too!

   Finally, I’ve updated how tooltips are displayed. While they look the same, they’re much faster to draw and use less system resources. I still have some work to do on them, notably adding a delay to when they actually appear on a mouse-over, but I’m fairly happy with how they work now.

What’s Left
   With this update I’m nearing the end of what I consider to be the most major hurdles of Fiancée Game: the major systems that make things work. I have a few left, but once they’re done it’ll be on to what I think is going to be the hard part of finishing the game: content development.

   The first of the two major systems remaining is the conversation system. I’m leaning very heavily towards a conversation system reminiscent of the Infinity Engine games, or Neverwinter Nights. Due to how they’re structured, I’m most likely going to throw together an editor in either Visual Basic of Visual C# that’ll let me put them together more easily than doing everything by hand. Before the conversation system is done I’ll need to to be able to have tests for various conversation options as well as the ability to fire off triggers so that I can start combat at the end of a fight, or reward the player for a completed quest.

   The second remaining system (and probably the first of the two that I’ll tackle) is the shop system. This is something that I probably should have implemented sooner, but I’ve wanted to get the core gameplay loop hammered out before I took the time to add something like this which I consider a less interesting part of the game. I’m planning on having the shop work on a stock system. There will be a handful of items that the shop always has in stock (basic gear, healing potion, and so on), but everything past that items will be available in limited numbers based off of what the player has sold. Item prices will also be variable based on the number currently in stock — the first few items of a given type will be worth much more than the tenth or twentieth versions. I’m also likely to have the shop’s

   I also want to tackle enemy AI and finally get around to implementing consumables, but I’m in no rush. I’m hoping to get some basic AI work done for the next update, notably adding the ability for enemies to employ special attacks, but I’m going to be spending most of my time focusing on getting the shop and conversation systems implemented. I foresee the conversation system in particular being a good challenge to get working how I want it to. I’m looking forward to it!

Read More Fiancée Game – 10 – Nearing Feature Complete(-ish)

Fiancée Game – 09 – It’s Been a While

Estimated Hours of Work Since Last Update: ~40

   Oh. Hey! I have this blog thing that I totally haven’t been neglecting. I’m back!

   Update time! I’ve not had nearly as much time to work on Fiancée Game as I’d have liked over the past handful of months. I normally do my programming after work in the evening, but work has been particularly busy this year and has no signs of stopping so I’ve had to get work in where I could. I did manage to squeak in a pair of dev streams in May (Links for those interested: 1 | 2) which were a blast. I’d like to do more dev streams, if only because it forces me to sit down and work for a handful of hours without distraction. I feel that I’ve made a lot of progress given the time I’ve put in, all things considered. As per usual, if you want a more granular look at everything that’s taken place for this update, check out the Fiancée Game Trello.

   Apologies ahead of time for the lack of pictures. Most of the work on this update was on mechanics, not so much new features that are player-visible.

Old Become New
   The biggest chunk of time spent on this update was moving old systems to some much newer (and easier to work with) design choices. In the past, an enemy and a player were different types of objects as far as the game’s code was concerned. No longer is this the case. Now the player, companion, and enemies are all of the same stats_MOB class. This means that instead of having to do something like dealing damage three ways (once for the player, once for the companion, and once for enemies) I just do it one way. Nice!

   In addition to making a single mob class, I completely rewrote how items and the inventory were handled. Things are much faster now. There are still some improvements to be made in this area, but they’re far from necessary at the moment and I don’t even know if they’ll be needed in the final version of the game.

UI
   I’ve mentioned it in the past, but I don’t much care for UI work. That said, on one evening I sat down and hammered a decent chunk of time into prettying up the UI for the game. I have to admit that it certainly feels more polished, if nothing else. I’ve also switched the default font from a blocky styled font over to Fontin, which most would recognize from Path of Exile.


The windows match and tooltips now have formatting! There’s still some work to be done, but the UI is getting there.

   There’s still more work to be done (as per protocol), but it’s certainly coming along nicely and looks much better than the stock gray windows I was using before. As you can see I also added prerequisites for skills, green prerequisites are ones you meet. Once a skill has all of its prerequisites met it will have a white outline instead of a red one. Skills with green outlines are ones that the player has learned.

   I also managed to squeeze in time to finally get the UI to properly orient itself based on the game’s window resolution. It looks pretty crappy on anything less than 1080p, but you can go all the way down to 720p and it’s still playable.

The Sounds of Battle
   While I previously implemented a very basic sound system into the game for playing music, I went a bit further and implemented a sound handler. This will allow me to play sounds for the player (novel, I know) in addition to whatever music. I threw in some placeholder sound effects for combat and they definitely make it feel much more like a proper game. I was very surprised by how much more like a proper game having even basic combat sound effects made Fiancée Game feel. I also implemented fading between tracks on the music player; no longer is switching areas in the middle of a music track super jarring.

   To go along with the above changes, I picked up a few sound packs from Epic Stock Media which I’m hopeful to get some use out of for this project as well as future ones. I’m likely to pick up a few more off of the Unity Asset Store at some point, but these delay that need a great deal.

General Optimization
   Among all of the above I did some optimization on particularly bloated bits of code. I improved tooltips so that they only draw once per frame instead of once per frame per object that could draw a tooltip (don’t ask). Also, at the suggestion of MadJackMcMad (the dev of Dungeonmans — go buy his game) I made some optimizations to how objects face the camera that had some pretty substantial positive effects on performance. I still need to get a proper billboarding system implemented, though.

   There’s still work to be done regarding UI optimization, mostly related to text display, but I’m to the point now where the amount of effort I’d have to put into it probably isn’t worth the gains I’d be looking at. The game runs perfectly fine with how things currently are and I’m debating over whether a fraction of a millisecond worth of frame draw time is worth refactoring a lot of old display code. Were this something I was planning to sell, I’d probably put the time in to fix these old issues, but as it is I probably won’t bother since the performance gains would likely be unnoticeable on anything but the poorest hardware.

New Mechanics
   I finally implemented a buff/debuff system to the game. It’s currently only used by the player for a pair of abilities in the rogue skill tree (Dervish and Smoke Bomb), but it certainly works!

   In addition to support for buffs, I changed how random item drops work. Combat can now result in a decent pile of loot for the lucky player. Where before each creature could drop only a single item, now they can drop many. Creatures have their own personal drop tables, but also share a much larger global drop table that has a chance to drop things based on a critter’s given level. With this change came a revised post-combat victory screen; the player has up to three pages worth of loot to tab through. There’s still a bit of work to be done on it; I want to disable page navigation when there aren’t multiple pages of loot, but that’s hardly a pressing matter.


The new post-combat victory screen. I’ll get a proper !!!VICTORY!!! header image up there eventually. Maybe.

   Along with changing how loot is portioned out to the player I also modified how monster spawning works. Previously, each monster spawner on the map had to be hand-tuned. That is, each had to be populated manually. Now, in addition to allowing that, I also implemented monster spawn tables. If, for example, I wanted an area of the map to swarm with generic undead I could just put together an undead_TrashMOBs spawn list and point a spawner to that instead of having to hand edit each spawner as I place them. This also makes expanding spawn lists much easier. Where I’d previously have to go back and add a new spawn to each spawner, now I can just add it to a single spawn list and all spawners that use that list will have access to the newly added critter beast. I figure 99% of spawners will use these spawn lists. The only ones I can think of off of my head that won’t are boss spawners and perhaps rare spawners that I may or may not hide around the world.

   As mentioned briefly above, I also implemented proper prerequisites for skills. Skills can now have both level requirements as well as skill requirements. I don’t expect the player will have much trouble meeting requirements for skills if they stick to one tree, but if they branch out they might have some issues. Skill points come quickly at early levels, but as the level count increases the rate of skill acquisition decreases. A character will only be gaining 40 skill points over 100 levels and half of those points come in the first 30 levels.

Balance is Changin’
   Finally, I did a bit of work on balancing numbers across the game. While I’m not super concerned about general game balance, I do want to avoid things being too crazy. Working with this in mind, I pulled the numbers down a little bit. Character stats at creation are now generally much lower on the high end — previously a class could hit a 32 in its primary stats before spending up to 10 bonus points on them — while the low ends are slightly lower. All classes now generate a number between 3 and 16 for each stat and have 8 points pre-assigned to them. Once that number is determined the player is given between 1 and 8 ‘bonus points’ to spend as they will. The highest stat a character can start with now is, in general, a 28. Magicians can hit a 32 Magic stat, but having a Magic stat that high is needed because they are so heavily dependent on their spells insta-gibbing things where other classes have enough survivability that they can afford to slug it out with enemies if need be (a magician starts with an average of about 15 HP, the lowest among other classes is roughly 30 — magicians are going to be Hard Mode™ in the early game).

   I’ve been putting some thought into how I want ability/spell costs to scale and while I’d originally thought to have them scale with level, I think I’ll keep them static and instead have Energy be a fairly limited resource. I want using abilities to have an impact in combat, and not something to generally be spammed (that’s what basic attacks are for). To offset this being overly cruel, I think I’m going to have a character’s Energy recharge to full after every combat. This keeps the player from having to worry about “saving it for a boss fight” and lets them really let loose if they’re in a dire situation or want to clear easy fights quickly.

That’s It
   That’s all I’ve got for this round of updates. I’m hopeful that the next update will come sooner rather than later, but only time will tell. I’ve been holding off on updates until I’ve got a decent amount of stuff to go over, but if folks would prefer more frequent incremental updates I could try that, too. Let me know in the comments what your thoughts are. Until next time! (I promise it won’t be ~4 months ’til the next update!)

Read More Fiancée Game – 09 – It’s Been a While