HOMEBLOGFLASHCARD CLASHCREATURE SWEEPER

Dev Update 2016-11-07

Adam C. Clifton
7 Nov 2016

Over the last few days i've been working on a little tool to be able to edit battle formations.

A lot of data for the game, like monster stats and battle formations are stored in the database. Obviously it's not wise to directly update these things in the live database, so I need to be able to set it up in such a way that I can make the changes locally and be able to repeat the changes later on the live server.

I do have an existing setup that does something like this, using numbered SQL files. The server keeps track of the last sql file it ran, and will not run it again. So since the server last ran the number 10 file, i can put all my changes into file 11 and test them locally. Once I push it live, i can run a script that will then process file 11 and those changes will go live.

This works pretty well with low level changes, like adding or changing tables, or other simple things. But adding a battle can be a bit painful, as it involves having to add multiple rows and looking up the monster ids. So I created a tool to edit the battles that you can see below.

It's ugly but it works!

It would be too much work to have the tool creating sql files for every change, so I make it just output a simple save file. This save file is loaded by the update script and it makes the changes to the database to match the save. That way I can edit the file as much as I want, test it locally then update on the live server.

It's a little bit simple right now, but in future i'll move more of the static data into this file, like monster stats, stage backgrounds and music. So it's one stop shopping for anybody on the team to be able to make changes to the game.

Previous: Dev Update 2016-09-09
Next: Audio In Flashcard Clash
© Numbat Logic Pty Ltd 2014 - 2021
Privacy Policy