Obscured References

This whole conundrum is a non-issue in the modern world of programming, what with fancy objects and classes and types.

There are now 4 characters on screen.  Whee.
There are now 4 characters on screen. Whee.

So, Sully’s Battlesystem had a problem.

It worked well as long as you had character 0 in party slot 0, and character 1 in party slot 1, but as soon as anything changed from that configuration… shit got real.

The problem was due entirely to vergec’s type-poor environment.  In the battle system party[party_idx] and party_idx were used interchangeably.  Hey, they’re both ints and they look the same, right?

After identifying the source of the issue, it was a matter of a global search on “party[” and identifying the spots where it was misused.  I’ve also wrapped this whole operation in a function to give a level of english for humans to see and go “oh, maybe I should give thought to this.”

This whole conundrum is a non-issue in the modern world of programming, what with fancy objects and classes and types.

The most fun part about this is, once I solved the party reference problem, there was a renderstack problem of exactly the same type, where renderstack references and sprite references (which are stored in two different int-indexed global stacks) were used interchangeably. I was already in the mindset to solve this issue.

The whole task is documented between r187 and r197 in the sully svn repository.  Top to bottom the tasks were about 8 hours of braining and typing.

It’s my fault for continuing down this path of madness, but there’s a massive amount of code and effort in this so I have lock-in.  Converting the whole thing to Lua would still have these issues to track down.

Battle A-go-go

Battle A-go-go

 


Woo, technology.

So here’s some of the fancy shenanegans I’ve been up to lately with Gayo on Sully. I’ve been working on putting the render stack under test to hunt down some obscure bugs and mystery crashes, and that’s been going nicely. Lesson learned: FreeImage on a bad index is bad… so I augmented the verge3 engine to noisy-error in that circumstance: although we might eventually just want it to do a noop instead of doing a fragile error or doing a bad operation.

I’ve also made a bit of progress on the http://beta.verge-rpg.com site. I should work out a good stylesheet for the forums and be done with that major third of the site… although really I need to make the forum management UIs. Which are just two screens, as far as I can tell…

Nothing’s been happening on the iPhone front in the last week. I’ve been sorta really busy at week getting IMVU’s Music Portal whipped into shape. And shape has been whipped into it. So all is well now.

Clamfest 2008!

Clamfest 2008!

Although this isn’t all I’ve done in the last week, I’ll focus on Sully.

I’m tired, so I’ll just recap from the SVN logs. Here’s a selection of entries I made in the last week, from revision 108 to revision 143 (most of those are mine, some are Gayo.)

  • Fixed the queueing problems. Now actions properly have charges and delays.
  • Making it so allies always animate on battle start.
  • Added initialization code for the sprite engine.
  • Added the revive spell’s unique effects.
  • Implemented effects for Revive and Shield.
  • Augmented GATTACA for arbitrary string display
  • Generified Standard Battle effects
  • Added an onComplete function to GATTACA.
  • Added multi-stike to BasicAttackFunc.
  • Added the bottoms to many palm trees in the simpletype_overworld.map
  • Updating stuff to make strikes work better. Sworddance is in, functionally.
  • Fixing the battle menu so the “b-side” can be triggered.
  • Fixing a McFAIL bug where custom keyboard mappings would crash if you changed to custom joystick mappings.
  • Fixed the battle_menu/McFAIL interplay. Now all is well.
  • Fixed the “non-battle items showing up in battle” bug.
  • Added Meditate as a usable action. Added TARG_SELF as a targetting function.
  • Got the Skill Menu to not hate usable skills quite so much.
  • Update menu to use mcgrender.
  • OMG SLIDEY MENU
  • BETTER SLIDEY!
  • EVEN MORE SLIDEY
  • I am king awesome.

…I got excited by the end. I did awesome things.

I’m also close to shipping an iPhone game with Rusty, but I’ll make a full post about that when it’s out.

Sully Battle Updates.

Sully Battle Updates

Too tired right now to give a full dissertation on the week’s productivity. So instead I’ll comb through the week’s Sully SVN commits and post the notable ones. Supersorry.

  • Fixed the sprite parser, removing (hopefully) all tab literals.
  • Updated the battle hud so that the HP/MP bars worked.
  • Fixing bugs in the battle menu and the targetting system, both conspiring to cause suck.
  • Fixed the quantity bug, removed debugging statements.
  • Updated the mcgrender engine to clean up more of it’s shit.
  • Making it so enemies always animate on battle start.
  • Fixed the queueing problems. Now actions properly have charges and delays.
  • Sped up the bounce of the numbers
  • Making it so allies always animate on battle start.

So that’s that. The battle system now, for once, doesn’t feel ‘broken’. It feels good. Most of what’s left now is to fill it with content… which is, one assumes, the “fun” part. :)

Another fortnight…

This week I got a demo running on an iPhone emulator of a tile engine. Tiles render, you can scroll across the map, tap and/or double-tap on a tile to access information associated with it, and draw text. Whee. I did this with the assistance of Rusty Larner from work, while pairing in my living room.

I also started work on a map editor coded in vc. If everything goes well, Overkill will be joining in on this on his next update.

Finally, I updated the Sully codebase to the mark 5 render engine: now with fully functional clickable renderstack items! Yay!

Better off dea… late.

Better off dead late.



A wild screenshot approaches!
(click to embiggen)

I didn’t mean to let this post get so late. almost five days now. My ever-tardy master nemesis Kildorf, who is of this writing 41 days tardy must be sapping my will to be punctual. I might have to choose a new enemy! glambourine looks like an ideal target, what with his pristine 0.0% loss and tantalizingly long, screenshot-laden posts. Ohhh yeah, the ‘dorf is strong with this one. Much stronger than in the actual ‘Dorf.

Anyways: what I’ve been working on recently is a battle group editor for Gayo for Sully. In the interests of getting as much going on as possible with all mah peeps, I figured it was time to finally get my hands dirty in the land of c# win32 apps. The concept is simple: you load a .dat file (anonymous/anonymous), and the app parses out all the unique locations and enemy group contained within. You can then visually add, delete, or edit the existing groups, then save a new file out.

So that’s that! This here’s a mockup picture, as the drawing canvas is only a 320×240 magenta square in the real version, but the verge battle group file parsing and drop downs are done. I’ll be getting to the custom canvas code shortly. Mad props to my “homeboy” and “roommate”, kael, who’s very familiar in these areas and generally knows what I’m looking for within a sentence or two of frustrated explaination. There’s no svn for this unnamed project yet, but if anyone actually wants to play with the WIP, just email me. I’m all about being open up in this kimono, baby.

ah, crap.

I took monday off from work to sleep. And so I thought tonight was posting night. Ha… whoops. 20 hours late.

On verge3 I’ve been working on making a verge.cfg variable to specify an optional subdirectory that your maps and map vc can live in, so as not to clutter up the root directory.

In sully I diagnosed a battle action queue error that sends an action to linger far too long at the bottom of the stack (fix pending). I fixed a problem where the cursor would wildly list to the left and bottom when you entered a battle. I also helped the always awesome Gayo with some stuff he’s doing with the Sully battle system. Yay for doing things!

On the website side I added some preliminary RSS features to the front page and the forum page. I also fixed the HELL out of registration.

Also I worked enough in my day job last week to need a day off to sleep this week. So yeah. Anyways: where’s Kildorf? I take back all those mean things I said, baby. We can make this work. Give me another chance… ;_;

One day there’ll be pretty things again.

One day there’ll be pretty things again…

So, here’s what I did this week:

  • Fixed the battle selection code. There were problems with the selectmap’s setup that were causing terrible, horrible, really bad problems. I was afraid it was a much more complicated problem than it ended up being. Go team venture! Clearing up this problem removed the last “major” bug blocking battle system development.
  • Added the vc code to add Kildorf’s new cels into Sully.
  • Augmented verge.exe so that if you use textpad’s tool option to run your verge game, and it exits, you can click on the output and it’ll open the right file at the right line number. This is, by the way, awesome.
  • Reformatted the skills.dat file, and implemented the white magic spells *Shield and *Revive.
  • Fixed selection so skills that require targets with specific conditions (like “can only be used on dead allies”) don’t let you select them if there are no valid targets on the field.

Isn’t that swell? As per the usual, you can grab all these updates and much, much more over at The Sully Chronicles SVN. One day I’ll do something with more exciting explanations and pretty pictures… but for now I’m more interested in actually doing lots of work than in doing lots of explanation. Sorry!

Things I’ve done this week

Things I’ve done this week

I added 4 new ways for fucntions to be called in verge3: trigger.onStep, trigger.afterStep, trigger.beforeEntityScript, and trigger.afterEntityScript. They are neat, and explained in detail in a news post and a new docs page.

Updated Sully using trigger.onStep so in battle zones every step you take decrements the counter until the next battle. When it hits 0, you enter the battle system, and when you exit the battle system the counter is replenished beginning the cycle anew.

I also bound trigger.beforeEntityScript to EntStart() and trigger.afterEntityScript to EntFinish(), and removed every single reference to these functions in map vc. Previously, to make things all kosher, these functions needed to be in every entity’s function at the top and bottom. So annoying.

Then I fixed up Sully so you could get through a lot more of the game linearly again. Yay! You can presently get up to getting sara to the room with the thermal activators in the chests.

I also have fixed two of the major battle system bugs: the original field music now resumes after a battle, and the renderstack seems to work right after any number of battles (whereas before it would slowly corrupt.)

Pretty awesome, eh?

You can get the updated Sully in the SVN. Anonymous/Anonymous

Sparse post #3

For the third time in a row we’ve got a very dull posting! Boo!

But that doesn’t mean I wasn’t productive! Scanning the svn logs shows an assload of work, including adding a massive amount of scripting into jujube (Lance’s mountain cutscene stuff and the seal of evil) as well as map tweaking, some cleanup to the cave, and solving one of the major issues with the battle system breakage problems. Namely, I’d recentyl changed from tabs to spaces in the files, and that inadvertantly broke a bit of the BattleMenu parsing functionality since it had tab-literals involved in the code. The solution there was to use chr(9) instead. Whee.

Anyways, That’s the score, Alan Moore. I’ll be doing more Battlesystem fixing in the next few posts. Maybe I’ll even take screenshots.

In case anyone’s interested in seeing this week’s work, my Arch-Nemesis made a vrpg post highlighting it, and went through the trouble of making new mac and windows zips of Sully. It’s worth noting that Kildorf, Gayo, and Myself didn’t let a single day this week pass without SVN commits to the project. Momentum has been achieved, mofos!