Save game on mobile device?

0 favourites
  • 9 posts
From the Asset Store
A futuristic device, can be used as radarscreen, optionscreen, infodisplay, research device, ...
  • I spent last 2 hours searching for how can I save games in Construct 2.. but I wasnt succesfull. Only solutions I was able to find were using cache or internet connection etc.

    Is there any way to save some basic info (hp, how many levels unlocked, ...) in app.folder? Im interested about creating mobile and PC exe games.. but without this being possible it can be hardly done.

    Creating a mobile game without save progress is pointless.. and forcing customers to use internet to save? Lot of people in my country (and lot of countries in europe) dont even pay for mobile connection. And if they do its with 300mb fup or so...

    Have someone made a android app using construct 2 and have it on market? How you solved this problem?

    Thanks for help

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Active Server Pages (.asp) and Microsoft Access (.mdb) file.

    Just like sending Ajax POST and GET requests to php and an sql database except the database (.mdb) is stored right in the application files. Then you just add the .asp coding to access the database and run queries like so:

    <%

    Set POwnn = Server.CreateObject("ADODB.Connection")

    Set OSP = Server.CreateObject("ADODB.Recordset")

    ConnectionString = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("db\database.mdb")

    POwnn.Open ConnectionString

    sql = "SELECT * FROM users"

    OSP.Open sql, POwnn, 3, 3%>

    <%=OSP("username")%>

    <%

    OSP.Close

    POwnn.Close

    %>

  • The tricks would be whether the mobile device can run asp and mdb files and finding a way to have the Ajax request point to the database within file structure of the app.

  • ummm.I don't think expecting localhost ajax support is the best route if the device doesn't natively support a local webserver. Having a customer hack their ipod to install a webserver just to a save a game I think is a fairly large no.

    I'm not sure, but have you the OP checked on dictionary plugin?

    If your looking for native storage your likely going to be out of luck for some time. Local storage is usually not desired as a browser feature for security reasons. I don't think Google or Apple will go with file storage for either of their mobile browsers.

    The other route is the cache method by way of the dictionary(as I understand the dictionary is the cache). If your game is packed to run as offline and set to home screen(IOS) then the cache should be fine. The cache isn't part of the safari cache and wont' be deleted if safari clears. cache is stored in it's own app folder. As for android.

    I could of course be wrong on all of this information. So someone with more experience please speak up :

  • There's always csv files as well.

  • droptank21 raises a good point which I may have overlooked. Do you plan to run your project through the browser and home screen running or do you plan to use cacoonjs/phonegap that wraps your program into a native app.

    If your going through browser then you only have access to dictionary plugin or some other form of cookies.

    If you go through a native app wrapping program then you can have access to file writing. Which droptank21 suggestion of csv files will work well.

  • clay.io ?

  • WebStorage is the best way to save progress client-side. Have you tried it?

  • WebStorage is deleted once cache is cleared, though, isn't it?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)