Attention! This is a legacy build of the Mega Man RPG from 2017 and is no longer being maintained. Reported bugs will not be fixed and any progress made here will not be saved. Return to the archive index for more legacy content or play the current version of the game for all the new stuff.

Mega Man RPG Prototype News & Updates

Community  »  News & Updates  » 
 
Developer
Adrian Marceau
Adrian Marceau
113,913,695 BP
204 TP | 518 PP
As per usual, it's been a long time since I last posted an update and I'm sure there are at least a few people wondering what I've been up to. Well, let me break it down.

Background
When I first added user accounts and save functionality to the prototype, I wasn't sure what or how much game data would need to be saved across sessions and decided to take a "quick and dirty" approach to storage. All game data - and yes I do mean *all* of it - was and is stored in the current session as an array named "GAME". The GAME array has hundreds of nested child arrays for different values, counters, and flags. Everything from current zenny, battle points, settings, rewards, unlocked robots/players/abilities, collected stars, shop history, mission progress, and so much more are stored in this one array. Whenever you "save" your game (or it happens automatically), the *entire* GAME array is compressed into a giant text blob and then saved into a single field of a single row in the database. This was very easy to implement but, naturally, my laziness has created many challenges and difficulties for me as the game continues to grow in scope and complexity.

Main Problems
- Slow saving because everything is compressed at once
- Slow loading because everything is decompressed at once
- No data validation on save means bugs can't be detected and fixed automatically
- Format of the save data means developers can't manually detect or fix bugs either
- Even a simple bug could break the save structure and cause the user to lose data forever
- Patches require looping through every save, loading everything, modifying what's needed, and then re-saving everything
- As a result writing even simple updates to the game's mechanics can takes months or in some cases years to complete
- Legacy data sticks around forever even if abilities/etc. have been renamed or removed with no way to remove without patches
- It's impossible to query the database for specific user's game details without decompressing their entire save file
- Even simple details like those shown on leaderboard profile (players, abilities, etc.) require decompressing entire save for each user
- No way to pull simple records for how many people unlocked a specific robot, ability, etc. so can't show on website
- No way to find or filter saves based on criteria like who unlocked a specific robot, ability, etc. so can't show on website
- Being unable to pull stats for robots, abilities, items, etc. makes it hard to see what's good vs bad and is a huge loss for QA
- More issues I'm probably forgetting

What save data looks like now
User save values text blob

The Solution
Given the above, it's super important that I modify the structure of the game's save data and optimize how it's stored/accessed/modified going forward. I need to make sure every one of those nested arrays are instead stored separately in their own database tables. There needs to be a separate table for robots unlocked by users, abilities unlocked by those robots, abilities currently equipped to those robots, abilities unlocked by a specific player, abilities purchased from the shop, etc. and instead of saving all those things to the database at once during a single "save" sequence, they should added/modified *as you're doing them* so they're properly validated and indexed. This is obviously a HUGE task and even though I've been working on it for almost a year I'm still not done. I'm close, but I've been saying that for months and the TODO list is still quite long. Even so, I'm working on it whenever I have time and I hope the community hasn't completely abandoned the project once I finally do finish.

What save data should look like
User database tables
User database table for robots

And After That?
I'm going to try really hard to *not* add any other features or change any other mechanics in this patch so that I can get it out as soon as possible. It's a huge undertaking as-is and if I don't stay focused it will not only take longer but there's a higher chance of bugs. That being said, if I ever do finish the next order of business is a proper admin panel for the developers. MBM, Rhythm, and all the other admins should be able to make changes to robot or ability stats without me, for example, and they should be able to add new ones without my involvement either. The same is true for battle fields, items, and everything else. As soon as I implement a proper admin panel everything will change and updates will no longer be dependant on one person. I hope you'll all be patient with me until that time, and thank you for playing up until this point. :)

P.S. If you care to follow along with my code progress, here's the Git branch I'm working on:
db_user_objects on github.com

mega-man bass proto-man empty-core roll disco rhythm

December 2017 "Update" : What I've Been Working On (In a Nutshell)
Posted by Adrian Marceau on December 9th, 2017 at 1:30pm
Viewed 268 Times

3 Comments

 
Alicia Shadow
421,860,171 BP
11 TP | 41 PP
Posted on December 9th, 2017 at 5:19pm
Posted 2017/12/09 at 5:19pm
#1
Very good thinking
^ Top
 
pokeepoo
14,494,532 BP
0 TP | 38 PP
Posted on December 13th, 2017 at 2:30am
Posted 2017/12/13 at 2:30am
#2
i really don't know that one.
^ Top
 
Buddy1
26,392,542 BP
1 TP | 16 PP
Posted on December 19th, 2017 at 2:47am Edited on 2017/12/19 at 4:42am
Posted 2017/12/19 at 2:47am Edited 2017/12/19 at 4:42am
#3
Are those the dark versions of Mega Man, Bass, Proto Man, Roll, Disco and Rhythm?
^ Top
3 Comments

- comments disabled -

« Back to Home | Mega Man and all related names and characters are © Capcom 1986 - 2018. | Contact & Feedback »
This game is fan-made by Adrian Marceau, not affiliated or endorsed by Capcom at all, and is in no way official. Any and all feedback is appreciated. :)