Mega Man RPG Prototype Community

Community  »  News & Updates  » 

December 2017

December 9th, 2017 at 1:30pm
 
Developer
Ageman20XX
Ageman20XX
9,269,071 BP
221 TP | 575 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_alt9 bass_alt9 proto-man_alt9 empty-core roll_alt9 disco_alt9 rhythm_alt9
December 2017
Posted by Ageman20XX on December 9th, 2017 at 1:30pm
Viewed 1653 Times

8 Comments

Master Alicia
 
Master Alicia
64,547,715 BP
18 TP | 778 PP
Posted on December 9th, 2017 at 5:19pm
Posted 2017/12/09 at 5:19pm
#1
Very good thinking
^ Top
pokeepoo
 
pokeepoo
3,410,210 BP
0 TP | 40 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
ZeroSoulless
 
ZeroSoulless
8,105,025 BP
6 TP | 82 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
RDash75
 
RDash75
11,136,580 BP
20 TP | 36 PP
Posted on April 11th, 2018 at 7:34pm
Posted 2018/04/11 at 7:34pm
#4
Lets Do Megaman Next Pack!
^ Top
RageSwitch
 
RageSwitch
59,663,806 BP
45 TP | 1068 PP
Posted on August 24th, 2018 at 10:16am
Posted 2018/08/24 at 10:16am
#5
Do you mind and add DS Mega man, Proto Man and Bass as playable costumes (and maybe Mega man 9 robot masters should be added)
^ Top
Shiver
 
Shiver
67,950,531 BP
3 TP | 200 PP
Posted on August 24th, 2018 at 3:25pm
Posted 2018/08/24 at 3:25pm
#6
@Proto Bass : Adrian may or may not add the DS bots as costumes, but he had just teased that there may be Darkness alts for them.

Also never ask him to make any robot masters beyond MM4, ever. The development of Prototype is extremely slow, and the last set of playable robot masters came in years ago. There's next to no chance we'll get any more.
^ Top
RageSwitch
 
RageSwitch
59,663,806 BP
45 TP | 1068 PP
Posted on August 25th, 2018 at 3:10am Edited on 2018/09/16 at 6:44am
Posted 2018/08/25 at 3:10am Edited 2018/09/16 at 6:44am
#7
@Shiver : Later in Development, I'm not asking for right now the day I posted it, am I?!


Hey Adrian I think I found a hacker called Accelman He has a Jewel Man... (I'm kinda jealous)
^ Top
YoshiGuide
 
YoshiGuide
1,359,950 BP
1 TP | 25 PP
Posted on September 22nd, 2018 at 9:52pm
Posted 2018/09/22 at 9:52pm
#8
@Fade Man : Same, he also has Crystal Man.
^ Top
8 Comments

- comments disabled -

MMRPG Prototype v3.8.25 by Ageman20XX | Mega Man Trademarks & Characters © Capcom 1986 - 2024
This fangame was created by and his team. It is not affiliated with or endorsed by Capcom.
« Back to Home | Cookie Policy | Data API | Contact & Feedback | Play the Prototype »