River Nyxx

A development blog for FFVI3D, the fan-made Final Fantasy VI remake in 3D.

平成20年4月6日日曜日

Polishing and upping the standard

I've now gone back and polished up the GUI Manager, and the Script Manager to support more things-- most notably, the GUI Manager now supports scripts being executing on various other events other than merely selecting an item.

Scripts can now be executed when a layout is shown/hidden/paused/resumed, and also as a cursor moves in any of the 4 cardinal directions off of any given item.

Additionally, the layout files can now pass a single identifier into the script they're calling, so a script can be aware of which GUI element is calling it. This will allow the scripter to use a single script for multiple GUI elements. More relative values can also be used for placement/sizing options for the various GUI elements, such as percentages, and centering. This will allow for GUI windows/etc to resize themselves based on the resolution of the game.

On top of those feature additions, various small bugs have been squashed, and some optimisations implemented as well. I'm shooting for a professional level game here, so I want the code to be as robust and efficient as possible.

As far as my work on the battle state goes, I've created the basic classes required for character creation (and theoretically, monster creation as well, although it's not currently implemented...) and have created all the necessary data files for all of the 14 standard characters that will be playable during the game. All of their data (even the unimportant stuff, such as background info) is loading correctly, and I've also created everything required for levelling up, so I can now create any of the 14 characters at any level, and all the numbers will match the original game.

I have yet to decide exactly how I will format temporary playable characters such as General Leo, Biggs, Wedge, and Banon tho.. If I take a hint from the original Super Nintendo game, I'll end up creating them exactly like the other characters, and just never introduce a situation that will allow them to remain in the party permanently. That's still some time away tho, as I still need to implement more important things such as monsters, and the actual battle sequence!

Graphically, I've put together a basic system to allow character meshes to be composed of 3 pieces: Legs, Torso, and Head, (ala Quake3) which will allow for much more complicated animations with much less work required.

Some of the next things I'll be working on will be the scenery loader, to properly load the battle scenery/information, monsters, and the monster formations. Once I have that all in place, then technically all the data I need will be loaded, and it will just a matter of manipulating it to actually perform a battle.

ラベル: , , , , , , , , , , , , , ,

平成20年1月29日火曜日

Beginnings of real profiling, and small additions

So I've almost completed all of the little bits and pieces of my rewriting of my old code, and I've actually added some considerable amounts of other new stuff also while I've been going.

One recent addition was an optionSurveyor abstract class, so now I can have any class derive from it, and register themselves with the optionManager to receive news of changes in specific options. Very useful-- this'll allow me to make sure that as soon as any option is changed, all of the appropriate places will be informed so they can act accordingly- and if they're not, it'll be easy to make it so they are.

In doing that, I've started adding more support for actually CHANGING options dynamically while the game is running, such as resolution and whatnot. Virtually all of my currently used options can be changed runtime now and everything will restructure itself to accomodate the new options, but in setting up things to work with a resolution change (by far the most complicated option to change, since I need to completely remove the engine device and recreate it, losing a good portion of my dynamic data in the process...) I've noticed that I've got something that I'm questioning as whether it's a memory leak or not. "Memory fluctuations," I'll call it.

So I've now dug out a highly recommended profiling tool called AQTime 5 that so far I am [b]very[/b] impressed by. And it's promising much more than I could possibly ask for. With a price tag of only 5 or 6 hundred dollars, I'll have to give some serious consideration to purchasing it. Or a PS3. *shrug* But for now, I'm enjoying all 2 days of the demo that I've experienced so far.

I've been using it fairly extensively (after reading the boatloads of documentation required just to get STARTED with it!) to find many leaks in my code that I didn't even have a clue existed. I hadn't noticed them because they weren't continuous leaks, but rather gradual. A small leak in an initialisation routine here, one over there, etc... As opposed to something that's puking out 3mb of ram every 2 seconds, which I'm happy to say, I've caught all of so far.

With the help of this profiler, and having to patch up various small leaks, it's also forced me to structure some of my code in a better way to allow for some future code that I'm planning on as well, which is good. I think AQTime 5 and I could become pretty good friends. *sagenod*

Since I'm not even going to look back at all at my old GUI code, I can't get any hard numbers for you, but I know for a fact that now that it's about 98% recoded, I'm quite confident that it'll run significantly faster, cleaner, and more readably (I know, the last one only affects me..) than ever before.

I've also gone so far as to download the DirectX SDK and recompiled Irrlicht with symbols to help with my debugging, as well as allowing me to compile it without certain features that I never intend to use, allowing it to be significantly smaller, which is good. I won't know for sure how much smaller I can get it until I've virtually finished the game engine, but I suspect pretty small, as there's a lot of stuff in there that I don't necessarily need ^^v

ラベル: , , , , , , , , ,