Puzzle processing design


Development continues and a lot of changes and additions have been made. I will summarize them when the next release for testing comes out. I plan for it to be a beta that has almost all the content for the planned 1.0 release.

I was hoping to have that out this month but earlier in the month I hit a snag with how all the different actions are processed in the puzzle matches. After adding more effects and abilities, I was spending a lot of time debugging conflicts and hang conditions. I decided to rewrite the processing logic again. This is the third time. Here is a summary of how things evolved.

Initial version:

I quickly wrote the logic for my weekend challenge. Basically you could just move gems and match them so there wasn't much too it.

Second version:

As I added some effects from items and matching items I noticed some actions would interfere with each other. Eg. if a gem was called to break but it was in the middle of spawning, one of the actions would be overridden. That would create some problems if the engine was waiting for a certain result. So I rewrote the logic to use a registration system and certain new actions could not kick off until all registered actions were completed.

This worked for awhile but still has some occasional hang conditions. There were still cases where actions could be requested unexpectedly. After a lot of attempts at debugging, I decided that the system was just too messy. I was hacking in fixes and I knew it wouldn't scale.

Third (current) version:

I decided to scrap the action registration system which was based on the whole board and changed to a cell (each gem slot on the board) based queue system. In this system, anytime something wanted to do something to a gem, it had to ask the cell. The cell would then determine if it was a valid action and queue it. 

The level processor would then execute the next action in all the cells in "turns". After some tweaking, I haven't been able to hang the board yet and debugging is much easier. The above short gameplay capture shows the results on a test stage the mostly will loop quite a bit with gems that split and break other gems that in turn, create bombs that blow up more of the gems that split.

I played with what things take priority like a shard can't break matched gems or gems that are marked for another action right away but there still might be some things that seem odd to you. Let me know if you have suggestions!

What now?

I will continue pushing for the first beta release. Hopefully before the end of the summer but things are busy. Now that the puzzle processing is fixed up, I can finish up the story line which is about 95% complete. It is mostly a single path but I don't have the time budget to make it more complex if I want to ever release a beta. Being a more relaxing game, it probably doesn't make sense to branch it a lot anyways.

Once I finish the story line I plan to play it through at least a couple times to balance the difficulty, rewards and power ups (abilities).

Then I will release the beta and hopefully get some feedback on further fixes, improvements and balancing. While do that I will start getting things going for further distribution whether it is something like a Steam page, mobile app stores or others. I have not fully thought it through yet but I am open to suggestions here too!


Thanks for reading this far!

Get Puzzle Crossing

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.