DAG's Forum Posts

  • Moin,

    on browsers (pc) you can download a json from a object like Array or Dictionary.

    But on iOS the Download Function does not work. (Tested with Ejecta).

    I have file "settings.json" (Dictionary) stored in the project folder "Files".

    Ajax load this file OnLayoutStart and loads into the Dictionary OnComplete(Ajax).

    Now I want to store / overwirte the "settings.json" when I suspent the app. To save the current settings (Dictionary Data).

    But this is not working. Or am I doing something wrong?

    PS: I know that there is a "save" and "load" function from system object. Savegame.

    But I ONLY want to save the Dictionary Object. And nothing else. By the way: The savegame function does not work with tilemaps.

    Summary:

    It must be possible to store the Array/Dictionary Data into a File in the App Sandbox Filesystem (Project Files). On mobile devices (iOS).

    I'm looking for suggestions about save/load settings on iOS with Construct 2 and Ejecta. Awesome Tools btw. =)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've solved it!

    Omg why I hadn't seen that?

    Here's the solution:

    Don't use uppercases in the AJAX Request URL string!

    Only use lowercases like "myfile.json". But not "myFile.json".

    If you use uppercases and run your game on a real mobile device like iOS iPhone 5s or iPad 3 then you get an empty string as AJAX.lastData.

    Take a look to the attachment to see a demonstation.

    I hope I could help you.

  • has anyone tested? there's no iOS developer here? who worked with ajax on iOS Device?

    Ok, if there is someone who is interesset to test it, I will create a example project. Just asking for it. Whether it's worth it. Thanks!

    Ashley: I have the problem on all iOS JS Runner like Ejecta and CocoonJS. But as I said: Only on the "iOS Device" (real physical) load the AJAX not all of the json-files. just a few. But the ios simulator / emulator and on PC the AJAX working great.

    At first I thought its a issue of file permission or memory management of array or string length. But I have this problem also on files with a array size of 88x1x1. I have array sizes about 6000 and more. for example a file with 5500 size is working fine. but some greater files are not working. but also the small files (88 size). I'm going mad!

    The Event Handling loads the ajax data into the array successively. ... All working awesome on all other platforms but iOS Device. -.-

    The AJAX jumps into the successful method "On "" completed". But the lastData string is empty.

    How can I debug this? I just have a text object to display the Ajax.lastData.

    Please help me! =)

  • I have a problem with loading a json into an array.

    Mostly it works fine. But there are some files who cannot load into an array.

    This issue is only on the Mobile Device. On PC and iOS Simulator the app is working fine.

    At first I thought the problem is the array. But now I've seen that the lastData of the Ajax object is empty on loading completed.

    ONLY on the iOS Mobile Device (iPhone 5s). But other JSONs are working. The array size its not really decisive.

    x,y,z = summary: result

    1100,5,1 = 5500: is working

    808,7,1 = 5656; is not working

    698,12,1 = 8376; is not working

    88,1,1, = 8376; is not working

    The JSON is 100% compatible to the Array.

    As I said: The problem is the AJAX Object.

    On Ajax "ajax" completed -> Ajax.lastDate = ""; (Tested with a text object.)

    On the iOS Emulator (xcode) the game is working fine. AJAX load ALL JSONs. But on the real device the AJAX just load a few of JSON-Files. Strange!

  • Please implement the feature to scale a layer in both separately directions (width and height).

    Currently it's only possible to scale the whole layer (width/height together).

    It's a really important and great feature.

    So please add this please. Thanks.

  • Ok, there is a bug with ejecta device orientation. quick solution:

    go to xcode "info.plist" and set the orientation you want in "Initial interface oriantation".

    But this value still fix. you can't use both orientation (portrait and landscape). Hope I could help. unfortunately none has helped me. :/

  • Does the landscape mode works with you? (Contruct 2 and Ejecta)

  • I despair of Ejecta, because the device orientations do not work. And when I check the checkboxes in xcode "Landscape Left/Right" an error/break occurs:

    xcode:

    #import <UIKit/UIKit.h>
    
    int main(int argc, char *argv[]) {	
    	@autoreleasepool {
    		return UIApplicationMain(argc, argv, nil, nil); <<< Thread 1: signal SIGABRT
    	}
    }[/code:30py4hw1]
    
    I also tested all fullscreen modes in construct 2. Only the mode "crop" is in landscape but not correct. The screen does not fit. And: The Device Orientations still not work. >.<
    
    For the result click on the image below. 
    Can anyone help me?
    
    Data: 
    Resolution: 1136x640
    Device: iPhone 5s
    Latest Construct 2 and Ejecta
  • I think the problem is Ios doesn't support xml.

    ^^ No, ios does not matter. Construct 2, Ejecta or CocoonJS (etc) need a xml library. I think construct 2 use the brower xml lib. ...

    I hope this feature will be added soon.

  • Hey,

    Ejecta and CocoonJS are awesome, but both do not support xml.

    Does anyone know an ios compiler with xml support?

    Thanks!

  • Just create one text object and set the properties, variables, etc.

    On Start of Layout (System) destroy this object. (optimal)

    Then you can create it everywhere you want in a for-loop. (one tick).

    If you want to update the content of them, just destroy and create again.

    On the for loop event:

    • create a text object
    • set the text of your xml node. etc.

    OR: You can create the text object once and store their UIDs in a Array. So you can call it by "pick by unique id". And set the text.

    ... the xml case is your part.

  • Its a simply score system.

    Scores for password length.

    Scores for if the password has lowercase and uppercase.

    Scores if digits are used.

    etc.

    Example:

    Max. score: 100

    5 conditions a 20 scores.

    ...

  • ok I will summarize again:

    in your game there a fishes. 3 types: Good (1 score), Bad (Lose), Gold (5 score).

    Also: You want to check if a fish is not catched.

    We need more information about your gameplay!

    I think you have a screen like a aquarium. Fish swim from one to the other side.

    So just subtract 1 from your score when a fish is outside the screen. Or then the fish can't catched anymore.

    This is simple logic. Just try and play with some events.

  • CocoonJS has more than one engine for project compiling. Try another settings. Compiler version 1.4.7 or 2.0 beta. Run using Canvas+, WebView+ or System WebView. For more support of CocoonJS post your issue on Ludei forums.

  • Have all the layouts the same Event Sheet? Take a look to the layout properties. "Event Sheet". If so, check on what layout you are.