MobileMojo_Games's Recent Forum Activity

  • Thanks much, yeah I have heard somewhere that Rex plugins are not specific to cordova either so that might be an issue too idk. But Ill def give that a shot and also go page by page and search here if its been talked about before :) TY for the quick response!

  • Sure thing. I am adding the coding for the authentication. So, I followed the way it is supposed to check and everything and I am thinking it might be just the inability to show the browser maybe?

    NOTE: I have added the firebase to the app, and also the dependencies in the android studio areas also.

  • I added your authentication plugin and the apiv3 but the authentication is not working on the apk file, only on testing on opera browser. Not on phones

    Any ideas?

  • So, I am using the plugins from Rex for signing into google. It works when I test it on Opera browser trying to log into google and show a play button, but no on the apk, either debug or released.

    Ive tested on different phones and with the emulators. It basically does not open the pop up window for google login for the user.

    Any ideas?

  • Alright, I made two example capx :

    First one is basic, it saves and load the array and update the global variables :

    https://drive.google.com/file/d/1xq6FTed8jhtOrgkKI8yHFUKpXeScQ_u9/view?usp=sharing

    Second is more complex as it also displays the content of each saves on screen :

    https://drive.google.com/file/d/1QbhycuMy43jMu5Pcse-WAi4WaYEzoNsC/view?usp=sharing

    Don't hesitate to ask if you need more help

    I LOVE these! I just need to make an overwrite feature for them just make sure the player is sure they want to do so, and I can implement this idea easily :) Thank you so much, I will actually go ahead and mark this solved because this is EXACTLY like my flow so far, just easier to understand haha! TY and happy coding!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • WOW, thank you very much I will look into these and learn something from them to fix what I have and mark solved when it works out :) You have been a great help, let me know what I can do to return the favor!

    I want to note for anyone that views this thread, there is something important I learned while working to create this save/load system.

    When you make a game, create global variables to use for updating instance variables because the global variables can be used easily to save to the arrays and should be done in three ways:

    1. Upon change of an instance variable

    2. Upon exiting/saving purposely or if a force close happens

    3. Automatically every X seconds (i.e. like MC does with say 3 minutes etc)

    Saving:

    a. Update all the global variables from the instance variables

    b. save the global variables to the array

    c. save the array to local storage

    Loading:

    a. load from local storage into array(update it from save data)

    b. update global variables from array - this way you can EASILY update instance vars

    c. update instance variables from global variables

    That is a flow of save and load I found EASY for me to follow! Ans when I add stuff, I just set the next array positions of XY to the key and value and save it again!

    Now, I will look into these files you have created and see how I can utilize that flow with them to create a multiple save system and make sure I dont make more arrays than I need :P

    God Bless!

  • Thank you for the help. I could be overthinking something so Ill keep chugging :) You dont have to make one if you dont want to but if you do, thank you for everything!

  • Here is a video of what Im doing. I hope it is helpful. Note: In the video I had changed the global save variable to enable and disable for testing. After the video, I changed it back and it still had the same errors or uneventful actions. :P

    youtu.be/AoZKw2tlUH8

    Subscribe to Construct videos now
  • > I'm not sure of why you want to use multiple arrays, is that to display the datas of each saves on a menu screen? Like health, level, weapons, etc

    Exactly, yeah either display, load, or whatever I need to do with that information. Each slot has an array to save to. :)

    What is even more strange is, I can load it from another layout lol. It works when tested the EXACT same way in code from another part of the game. Do you think clearing the array first has a setback on this? I give it time before I try to load it again so I wouldn't think that would be an issue. I just need to make sure I can load it when I need to. Thank you again for your time, I appreciate it very much

  • I'm not sure of why you want to use multiple arrays, is that to display the datas of each saves on a menu screen? Like health, level, weapons, etc

    Oh, so I have 3 arrays, one called playerGameSave1, and 2 and 3. So, each array is going to be used for each "gameslot", that way I can have different values for the players stats and info for each load. SO, if you wanted to load game 2, then it reads from playerGameSave2.Json, and if it does not exist it creates the array information with default values so it doesn't mess with gameslot 1 or 3.

    Each array will hold ALL of the game variables, global and local. The variables will be updated (global for example) when the array is loaded and overwritten when requested or upon autosave of that slot.

    The current issue with LocalStorage I have at this moment is loading it. I did the proper loading setup, but it does not load into the array I select for it to load into, according to debug. Ill show my code for loading:

    So, when the game starts, it will have a blank array and if not, it creates one. If you have never played the game, it will use that array to update, save, and then eventually load. So, say I changed things that needed saving. I update the values in the global variables, and local variables for gameplay, and then the array is updated and then saved AsJson in Local Storage. All is well so far. So, then the loading part.

    LOADING:

    Let me just simplify it. Say I have a button that when clicked, should load the Json into the proper array. I say when clicked, >LocalStorage > get item "[key used to save array]". In my case, this key is "gameData1". So after get item, I make another event saying: LocalStorage > On item "gameData1" get, action: with the proper array:Load from JSON string> LocalStorage.ItemValue.

    This does not load the array. I do clear the previous array too in testing to see if it loads properly then wait before loading and still nothing loads. Hope that makes sense :) The info IS, in fact, correctly saved and its format is correct. So, the LocalStorage has this information in that specific key that cannot be loaded even with simple actions.

  • When I set array.AsJson I am supposed to put the name of the array in "array" correct? So, if my array is named save1, then it would be save1.Json, correct?

    Also, on item get....do I have to load all the items individually this way or can I load the array fully at once? Thank you again for the help! I will be reading and testing the rest of the night :)

  • Ok, cool so NWjs isnt necessary at all because I dont want any manipulation outside of what the game stores and loads. Thats good to know! TY

    So, I have my array that has variables that include the game slot, player name, and then all of the in game vars so far that I have :) I have an issue loading the JSON to array though at the moment.

    When I go to load the Local Storage information for say, slot 1, I do the proper get then on get flow but it does not load correctly. I was wondering then if this is because I am using "set" in the array instead of "insert" maybe because in the long run, these arrays will be expandable.

    SO, what I am thinking is, based on what Ive read, -Do I have to have the initial array always match the W, H, D of the saved array in Local Storage for it to load properly? If so, and I want to make it dynamic, I dont know how I could impliment a dynamic array into Local Storage if the load has to match the current blank arrays dimensions. I heard something about having to make them all 3 dimensions regardless. But That is as far as I have got on reading so far :P

    Thank you for the help, I will focus on Local Storage ONLY for now and test with that to see if I can get the LS to load back INTO the default array.

MobileMojo_Games's avatar

MobileMojo_Games

Member since 8 May, 2018

Twitter
MobileMojo_Games has 1 followers

Trophy Case

  • 6-Year Club
  • Email Verified

Progress

7/44
How to earn trophies