Multiplayer variables problem: is my dream dead?
I have a problem. My latest discovery in Dreams is how to use multiplayer variables, and when used in a single scene, you can read and write each of the four player-assigned variables freely, even when playing the scene single player. Thus I assumed I had hit the new-discovery jackpot, and that using all multiplayer variables effectively quadruples the existing persistent variable limit.
I assumed poorly.
My current project has been a huge endeavor and requires a massive number of variables (well beyond the current limit of 128) so I implemented this multiplayer variables system. Everything appeared to work fine while testing the individual scenes, but once I put the scenes together in a dream, I discovered to my horror that only the variables stored for player 1 were persistent between scenes.
After consulting the forums, I now know that this is not a bug and that I misunderstood the fundamental purpose of multiplayer variables. Essentially, the variables are linked to the profiles of the individual players so that a player could make progress while in another player's game, then replay the dream later when they're alone and find that their progress is still saved.
I don't expect them to change the functioning of multiplayer variables on my account, but I was misled by the fact that I could make use of all 4 variable instances when testing the scenes. If they made it clearer by not allowing the player to store values for nonexistent players when testing scenes I could've avoided this mess.
So now, is there any way to salvage my dream? I could go through and split every variable into 4, but as stated earlier this would far exceed the variable limit. I am already making use of binary encoding for all my booleans, so I cannot conserve variables further that way. I could split the project into multiple dreams and this would reduce variables, but this is far from ideal. So I would need to greatly scale down the scope of the project, or hope that the devs hear my plea and increase the arbitrary variable limit.
So why does my dream use so many variables? I'm making a rhythm game, and hope to be able to add many tracks, and have already published a template that any player can use to make their own ready-to-play tracks with their own music, which I can then add into the dream. Every track uses only 1(ish) variable to store all the high score data, but it uses 3 of the 4 player variables to store the high score for each of the 3 difficulty levels, and one variable which is a concatenation of the highest rank achieved for each difficulty, which are each stored as a digit from 0-9. I have 1 variable which stores all the game settings which includes a binary encoded variable for the Boolean settings, one for the music volume, one for the SFX volume, and one which stores the score for the current stage. I have 4 different types of prompts, 4 different levels of accuracy, max combo and misses, and 2 "alignments" for each, and keep an independent count of every one of these to display on the final results screen, and to determine the player's rank. I can fit them all on 5 multiplayer variables, but without them they would account for 20 separate variables. I have a few more variables which are similarly optimized, but if I wanted to eventually have 30+ playable tracks, there's no way I could achieve this without going over the limit.
So right now I'm looking for solutions. Is there a way to make multiplayer variables work the way I want? Is there another way to conserve variables that I haven't considered? Is there a chance that MM might substantially increase the variable limit? Or do I have to significantly downscale the scope of the project either in terms of number of playable tracks or depth of the gameplay?
Thanks very much for reading all this, if you have any ideas at all I'd love to hear them. I've spent so much time on this project (particularly in the last 2 weeks to prepare for the jam) and I would hate to have to give up on it.
-
Aw, that's a shame. Next time you'll be sure to double check it works all the way through the process at least, so I guess a lesson learned is something at least? Not a great consolation prize I know...
You need to look into ways of compressing values so that you can fit multiple values into a single variable. You can use each digit as its own value for example, and fit 7 0-9 values in one varaible. Or you can go binary and fit 25 (or so?) 0/1 values into a single variable. -
Thanks for the response, and I have managed to make a bit more space by restricting some variables to 3 or 4 digits so that they can be grouped. I was being a bit overdramatic thinking that my dream was dead haha. For now, I'll just keep making tracks until I run out of space and that'll be that. I'm just happy I got everything to work properly in time for the rhythm jam.
Zaloguj się, aby dodać komentarz.