Big update coming tomorrow

February 9th, 2008

I’ve thrown all sorts of things into this update, and it’s almost ready. I was hoping to have it tonight, but debugging the timing on image movement took a long time.

Expect to see:

  1. Create, move, and erase image commands fully implemented.
  2. The BGM-related event commands implemented. (Although SDL_Mixer still doesn’t like MIDIs all that much…)
  3. The Wait event command.
  4. Parallel and auto-start events working.
  5. A real title at the top of the Map Viewer screen.

This is going to be an exciting update. With parallel events, delays, and image management, a lot of the most popular event commands will now be working. This is finally starting to feel like a real RPG engine!

Music is improving

February 8th, 2008

There was a bug in the Map Viewer’s music handler that made MIDI music only come out the left speaker.  Unfortunately, the trouble was in the SDL library, not my own code.  Well, I just got an updated version of SDL, and that’s been fixed.  Background music will play right now.  But there still seems to be a problem with switching between one MIDI and another.  I’ll report that to the SDL developers’ list and see what happens.

The hard part is almost over

February 4th, 2008

Coding the event system has taken several months of hard work. I’m almost done with the second page, as RPG Maker categorizes them. There are still 11 second-page commands to go, though, and they’ll be hard work. But after that comes the third page, which is mostly fluff, from a programmer’s perspective. I should be able to finish the third page in much less time than the first or second pages took. Then I just have to put the finishing touches on the event system and move on to implementing multiple maps.

More event commands coming up!

January 8th, 2008

The teleport-related commands were a piece of cake to code. (The Memorize Location command isn’t currently working, though, due to an error in the script compiler. I’ll add it once an updated version comes out.) Next on the list are vehicles. Half the code for them is in place now. It took me about two hours to figure out why they weren’t showing up on the map yet and get them to appear, but now they’re working. That’s the easy part. The hard part is to make the hero enter them and get them to move right. That’ll probably take up the rest of the week, but I should have an update ready on Saturday.

Huzzah! Progress at long last!

January 3rd, 2008

No, the project’s not dead. It’s not vaporware. I’ve just been too busy with Christmas and coding to write much on here lately. But finally I have something worth writing.

I just finished creating and testing the shopping system. It works, the menu system revamp works, and the menu scripting system works. It’ll take a lot more work to get the menu system to be as customizable as I’d like it to be, but this works well enough for now. (The full system, which will give users full control over the layout and functionality of the menu system, will require so much work to code that it’ll most likely not be available in the free version.)

Now all I have to do is code the Name Input box and I’ll have the next prerelease version ready. Now that all the heavy lifting is behind me–revamping the menu system codebase was a real killer, but now that it’s done it makes adding new menu screens much easier–this part should be done within a couple days.

Unfortunate delay

December 7th, 2007

I got started with adding the new shopping system, and it became clear very quickly that I’d need to rewrite the menu system eventually. In my haste to get something that would run, I hard-coded all the menus together, which works well until you try to extend the system. But since extensibility and customizability are some of the main design goals, I’m rewriting the entire menu system as a component system based on Delphi’s form designer. It will only use hard-coded commands for the most basic common functionality (how to draw itself to the screen, how to move the cursor around, etc.); everything else will be run by the script engine, and accessible to the designers once I get an editor built.

What this means, in the immediate term, is that the update I was hoping to have ready tomorrow… won’t be. It’ll probably take me all day tomorrow to finish rewriting the menu system. Then I’ll start working on adding more features.

Next up: shopping and name changes

December 3rd, 2007

Now that I’ve got the menu system written, I’m going back to coding the event system.  The features planned for this week’s release are going to be two rather complex event commands, and in a bit of a break from tradition, neither of them will work exactly as they worked in RPG Maker 2000.

First, shopping.  The shopping event code has already been implemented as a do-nothing command in order to fix another bug.  Now that I’ve got a working menu system, I can build on that code base to build shops.  But the shopping system will include one thing that, in my opinion, is an essential feature whose absence from RPG Maker greatly hindered gameplay: the ability to access the “Equip” menu from within the shopping system.

The other event command will be the one to input hero names.  This command is badly broken in RPG Maker’s English translation, trapping the player in an input box that it’s impossible to leave, because the program was designed for the Japanese language, which for technical reasons handles letters on a computer in a different way than we’re used to.  I’m going to design this in English, but in such a way that translating it to run properly in other languages shouldn’t cause compatibility problems.

Skills are on their way!

November 23rd, 2007

I’ve spent most of this week (when I’m not working or playing DragonFable or MechQuest) working on the menu system. I’ve almost got skill use working, I caught and fixed a couple glitches with items, and I coded a handful of under-the-hood refinements to the menu system that’ll make new menus easier to code in the future. I should have a release ready by tomorrow.

It’ll also contain a minor update to the RPG Script system: Label/Goto label will be working. I would have had this several weeks ago, but a glitch in the PascalScript compiler kept labels from working properly under certain conditions. I reported it to the author, and he says he’s looking into it, along with a handful of other things. But the PascalScript system is published with the source code available (not exactly the same thing as “open source software,” but close enough for many purposes) and another programmer went and created a patch, which I’ve incorporated into RPG Script until an “official” fix comes from the author. (Which may well be simply taking this other guy’s patch and making it official.)

Mason

Potion of Death!

November 12th, 2007

It’s funny how bugs can interact with each other in unexpected ways. Case in point: The Potion of Death I accidentally created last night as I was coding item usage in the menu system.

The RPG Maker item data structure has a list of flags representing which conditions the item cures. But since most items don’t cure any condition, the program saves space in the file by simply skipping the entire list if the whole thing’s set to false. In my code to read the data structure, I accidentally had it set the entire set to true if the list was missing from the file. So an ordinary item, such as a potion, suddenly becomes a cure-all item.

But it gets worse. Characters can be afflicted with various conditions, as defined by the game writer, and one condition that’s hard-coded into the system: “dead”. If a character’s dead, it changes a bunch of the code for his behavior. (For example, he can’t be healed while dead.) In the code to set a character’s condition, I had a check for whether the condition being set was condition #1 (dead), and if it was, to set a couple other things in the hero’s data structure relating to being dead. Unfortunately, this check didn’t look to see whether the “dead” condition was being turned on or off.

You can probably see where this is going. I tested out a potion on a hero, and… he died?!? That confused the heck out of me, of course. Turns out the potion (with the “cure condition” attributes set to all true) had tried to cure the hero of being “dead”–for technical reasons, it’s more efficient to simply set the condition to false than to check whether it’s set and then only set it if it’s already true–and this set off the special code. So instead of getting healed by 50 HP, the hero died. Huzzah for Potions of Death!

Item use, coming up!

November 7th, 2007

As part of my ongoing work to get the menu system running, it’s time to write the code for items.  This is a major part of an RPG, probably as big as the menu system itself.  I’m not sure how much time I’ll have to work on it this week, but when I get this release done, you’ll have a working menu system and be able to select and use out-of-battle items from it.  Hooray!