Replays Revisited


I fixed the bugs I wanted to fix last night (AI stuff, and something else), and tidied up some of the bugs around the replays being launched from the match history screen, but I do have a couple more bits to do on that:

  • Fix bug where program crashes if you press an area level with the y coord of the replay icon in Match History, but above or below where a result is valid (null pointer error)
    • Make sure the click is within the first minimum and maximum
  • The replay itself doesn’t actually work
    • Some kind of thread must actually start, because it flickers and messes up subsequent presses
    • Re-write ‘runMatchReplay()’ to use the existing TV-based replay


  • Need to start getting through all these sequences that need sound effects associated
  • Start trimming the ends off all the transitions – to remove that unnatural stop-start feeling when you watch a match without the option chooser rendered inbetween
  • Think about how to handle the situation where you see the same fail sequence twice if you fail a hip bump sweep, and then fail the follow-up

And an idea that just popped up out of nowhere:

  • Implement a countdown timer when it is P1’s turn, after which the game defaults to choosing to rest
    • This is required for online play anyway, may as well incorporate it into the offline game
    • Maybe just for competitive matches, keep rolling and whatnot “time free”
    • Something similar to the image below, probably give them 5 seconds to act


And there ya go. Aside from that, and a few other bits I can’t really think of, the only other big thing I want to do soon is a complete code clean up. Gotta get this thing looking something similar to the completed version, need to do some spring cleaning!

On a side note, ’tis my last day working here at AD Holdings. I shall miss this place. I start my new job on Tuesday – if I wasn’t so opposed to change of any kind, I would be heartily looking forward to it! Anyway, here’s an image I’d been keeping on my PC in work in the hopes of finding a legit reason to include it in a blog. Ah well…





Quick Tidy Up

messy room

I noticed a bug in the “execute failure” logic earlier, which means that the game always crashes during new game creation whilst running the 20 weeks of competition – so I’ll be fixing that tonight. Should be super quick.

I will also, while I’m there, have another crack at solving the AI issues, with the gameplan hashmaps for blue belt and above – and I need to confirm that I have actually fixed the “constantly displaying coach’s advice for 100% move success” problem.

Aside from that, I will do a bit of a code tidy-up sesh, getting rid of all the “testing” code/comments, and generally making the whole thing look a bit more complete and robust.

That’s about it, really. It’s still all about getting this Option Map finished. I’ve done everything except:

  • Trim down all sequences to < 90, if possible
  • Put sounds in (got over 300 to do)
  • Make sure every sequence ends up where it’s supposed to be, and with the correct orientation

And that will be Option Map 2.0 complete.

Oh, just one more thing ma’am…


I’m going to implement two stages of “skip match” with the screen swipe. I will change the variable from a boolean to an int. When skipMatch == 0 we treat that as false, when skipMatch == 1 we don’t go highSpeed but we do go automated and stop rendering Option Chooser (also removing associated delays), and when we skip again – setting skipMatch to 2 – we do the full highSpeed skip.

Sounds simple enough…



Bugger Off!


I’ve got quite a few bug fixes and things planned for the weekend, including (but not limited to):

  • Potential bug where a fail node attached to a chain move has not correctly identified that it is a “failback” to current position because, in fact, the current position is a GREAT grandparent, as opposed to a grandparent
    • Will incorrectly produce a “no image sequence” sequence
  • Energy change readouts are not working
    • Find where we used to readout “MOVE SUCCESSFUL” etc.
  • Does not appear to be flipping orientation – when required by the playerPosition node – when you rest by pressing the central node in exploreMode and it switches turns
    • Although it does flip orientation if you do a MOVE that flips orientation, or if you press the “invert position” node
    • Check if this same problem exists with regular switchTurns() in competitive/rolling
  • Fix sound bugs by implementing self-closing media players
  • Fix AI bugs
  • Fix “100% successful move” coach’s advice bug

Need to sort out the unit tests again slightly:

  • Omit “missing fail nodes” from list for:
    • 100% successful nodes
    • Nodes with fail sequences that do not include failing back to current position
    • Chain moves?
      • Need to figure out if they just use the initial transition’s fail

And a few other tasks that will be getting done soon:

  • Make more progress with the “online” menu system
  • Finish off ZMPIC
    • Including toggle “guide” images, upload to ZM etc.
  • Commentary!!

Depending on what mood I’m in, I can feel quite close to finishing this, and other times it seems a million miles away. I’m sorta in the middle right now, but I can definitely say I’m well pleased with the progress I’ve made so far. Can’t help but be happy with what I’ve got 🙂



Reporting Back


So, I did a decent sesh last night and got the following things sorted:

  • Finished off current version of unit tests
    • Expanded “redundant” test to encompass:
      • Sound arrangements
      • Keyframes
      • Failframes
      • Special Skill Keyframes
    • Fixed unit tests which listed irrelevant failframes
  • Implemented “flip required” and “toggle orientation” for fail sequences
  • Implemented function to cycle through fail sequences
  • Fixed the issue of orientation flip, even when sequence fails back to where it started
    • I THINK – still need to confirm this
  • Tidied up data structure of Option Map
    • Did all sskf files
  • Implemented auto-capitalisation when entering player names
    • Put this in ZMPIC also!
  • Fixed a bug where “let’s go” crashes when you try to roll again, after the first roll (needed to set “launches dialog” to “true”)
  • Tons of other stuff I can’t remember right now…

I still need to do the following:

  • Add unit test to identify all point scoring sequences without a keyframe
  • Tidy up data structure of Option Map
    • Put in all failframes where required
    • Trim all sequences to proper size
    • Add sound to all relevant sequences
    • Add keyframes where required
  • Put button into GUI underneath/near to “next sequence” button to manually flip the current orientation
    • Will need to update the text on this node to reflect the current status, as it changes due to executing moves etc.

And further down the line I need to continue making headway in the following:

  • Online play
    • Don’t render nodes that are set to invisible
    • Put scrolling list of (arbitary, for now) names into main menu
    • Do online logo (and do ZMPIC logo while I’m at it)
    • Do initial skillset menu
    • Do new background for all online menus
  • Look at fixing any remaining AI bugs
  • Sort out the replays etc. on match history screen
  • Try to catch those sound bugs
  • The list goes on…

And I’m spent.




Priority stamp

My current focus is now solely on getting the Option Map completely watertight, so my task list is as follows:

  • Finish off current version of unit tests
    • Expand “redundant” test to encompass:
      • Sound arrangements
      • Keyframes
      • Failframes
      • Special Skill Keyframes
    • Fix unit tests which lists irrelevant failframes
      • Do not list transitions which have associated fail node that does NOT fail back to current position
        • ie. “Fail Flying Triangle”
    • Add unit test to identify all point scoring sequences without a keyframe
  • Implement “flip required” and “toggle orientation” for fail sequences
  • Implement function to cycle through fail sequences
    • If “executeFail”, when we press “nextSequence” or “prevSequence”, we cycle through fails instead
  • Fix the issue of orientation flip, even when sequence fails back to where it started
  • Tidy up data structure of Option Map
    • Put in all failframes where required
    • Do all sskf files
    • Trim all sequences to proper size
    • Add sound to all relevant sequences
    • Add keyframes where required

When all that is done, I’d say that will be a pretty good core to build on. What am I saying? I’ve already built a shit-ton of stuff around it anyway!

So, yeah, looking forward to getting this finished. Over and out.



Moves Out Of The Way


We finished off all of the move sequence filming on Saturday, so that’s a huge milestone for the app.

I’ve still got plenty of work to do, making sure the entire Option Map is robust and functions correctly, editing the clips to the right size, as well as adding sound, assigning keyframes etc.

Definitely taking shape though.

I might sneak in a quick programming session tonight or tomorrow, where I will be adding code to aid in the completion of the Option Map. Gotta catch any “no image sequence” sequences that may still be lurking.

I’ll probably do a few other minor bits while I’m at it, including making a mini start on the online play menu, amongst other things

I definitely must look into solving these “sounds not playing” issues soon, maybe getting some kind of readout logged when a sound sample fails? I dunno, I’ll sort it anyway.

Chow for now…

mr chow the hangover movie__80631



Call Me Back


I’ve just sketched out the logic of a basic callback mechanism, allowing “code injection” from your main project into a project or .jar file included in its build path – bypassing the undesirable prospect of a circular dependency.

If my writing is too illegible in that image, the basic premise is this:

“LibraryProject” defines an interface “MyCallback”, which declares the method “callback()”. A concrete class within LibraryProject (to give it a name, “LibTestClass”) includes a public “setMyCallback(…)” method which allows a MyCallback object to be passed in.

Within “MainProject”, a class “ExampleCallback” is written, which implements MyCallback from LibraryProject.

Another concrete class within MainProject (“MainTestClass”) will instantiate an ExampleCallback object, and pass it into a LibTestClass instance via the setMyCallback(…) method.

This part is key: The overridden “callback()” method inside ExampleCallback is the code that is eventually injected into (and executed from) LibraryProject when code inside the LibTestClass instance calls {MyCallback}.callback().

That about sums it up I think.