Archive for July, 2013

Progress Journal: You Shall Not Pass (unless you’re supposed to)

Thursday, July 25th, 2013

So at the end of the last post, I said that the two things I’d focus on next are getting glyphs to draw in message boxes, and fixing the timing issues I’d observed in the intro to Love And War.  Well, I made the glyphs draw.  The timing problem is going to be a bit trickier.  It turns out it’s related to another area where RPG Maker does something “magic”.

Basically, there are several places in the intro where it uses this pattern:

Image[1] = New Image (blah blah blah)
Show Screen (Fade In)

And what that does, if the screen is already shown, is fades the image in instead of displaying it all at once.  It creates the image, but doesn’t begin to display it before the fade operation starts, so you get a gradual transition.  I didn’t know about that trick when I was setting up the Transition code, so it tries to do the sensible thing and just do nothing if told to fade in while the screen is already visible.  It’ll take some extra work to get this right. (more…)

Progress Journal: Getting out into the world

Monday, July 22nd, 2013

(NOTE: Because of all the bugs I’ve been fixing lately, many of which can impact the editor as well as the game engine, I’ve built a new version of the installer.  Check it out on the Downloads page.)

Once I was able to make battles play through properly, I moved on to the next part of the game.  Lutine heads out into the world, a great deal of which is composed of small, single-screen maps that don’t scroll. (Kind of like the original Legend of Zelda.)  I walked around a while, and ran into some bizarre issues where characters could walk off one edge of the map and around to the opposite edge, but only in certain conditions. (more…)

Progress Journal: Messages and Inputs

Thursday, July 18th, 2013

When last we saw our heroine Lutine, she was able to enter battle, but not able to actually participate in it, because the custom battle system requited global events, which I hadn’t gotten around to adding support for in the script engine yet.  So I added the code to ensure that global events that were supposed to fire automatically (ie. not the ones that got invoked by the Call Event command) would actually begin as expected.

Now, pressing the Menu key was supposed to open a box on-screen for you to select various options.  But it didn’t show up when I pressed it.  Turns out there was a problem in the code that shows Images, so I fixed that.

Then I could pull up the menu, but trying to navigate it did bizarre things with the cursor.  Another script interpreter problem.  Fixed that.  Next!

Now I could navigate the menu, but the options spun by incredibly fast.  The Key Scan command in RPG Maker has two modes of operation, one where it waits for the user to press a valid key and one where it doesn’t.  What it doesn’t say anywhere is that if you’re in Wait mode and it gets called twice in a row, it will also wait for you to release any keys you were holding down before reading new ones.  (If you’re not in Wait mode, it doesn’t wait for you to release the key, which is how Zero Base is able to build a smooth-scrolling space shooter on top of the RPG Maker engine.)  So I implemented the Wait correctly and tried again.

Next up, Lutine has to select a plate and place it on the grid.  The Frozen World uses the Choice box to confirm your selection, asking a Yes/No question.  So I had to implement that, but it didn’t quite come out as clean as it does in RPG Maker.  In RM, if you put a Message Box immediately before an input box of some sort, and there are enough lines available, it will magically merge them into a single box that shows the message and then displays the input at the same time.  It’s able to do that by looking at the script at a very high level, which isn’t possible in the TURBU script engine.  So instead, I changed the project importer code to do the merging when such a high-level view is still available, before building the script code.

Once I got the Choice box working, I went to work on the Input Number box, which The Frozen World uses instead of the normal inventory system, to select items to use.  It took some time to get all the details worked out there, but I’ve got it working now.

The last thing that was broken with the custom battle system was that the background image didn’t show up.  I fixed that this morning, and it’s all checked in to source control.  Now Lutine is able to fight the enemies around her, and I’m able to progress further in the storyline.

Once I’ve got things to the point where I’m able to complete The Frozen World, I’ll build a new TURBU release.  For now, though, compatibility’s getting a lot better, and we’re getting closer and closer to a fully-functional game engine.

Progress journal: a clear goal

Friday, July 5th, 2013

My focus right now is on getting the script system implemented.  I just looked over the code, and I’ve got about 80% of script commands implemented.  That sounds pretty good, until you try to actually run something.  Then it becomes painfully clear that an 80% success rate is a 20% failure rate!  And with the number of scripts running in your typical RPG Maker project, each of them dozens or even hundreds of lines long, that can screw things up pretty quickly.

Of course, some script commands are more important than others.  Message Box is used all the time in pretty much every RPG Maker project ever, for example, but I think I’ve only ever seen Play Movie used once.  So if I’m going to work on getting things to work, I should probably prioritize by what’s most important to actual games.  And to do that… I’m playing an actual game.

I decided on The Frozen World, because it’s a fun, technically involved game that will give the engine a good workout, but it doesn’t use two features that will be very tricky to get right: the built-in menu system, and the built-in battle system. (more…)