Rable's Forum Posts

  • Hi everyone,

    I exported my game to iOS through C2 Cordova export, then C3 export manager.

    The problem I have is that on iPhone 7 and 8, the status bar is still visible. It's not visible however on iPhone X.

    I obviously checked the option to hide the status bar in both Construct 2 and Xcode, but it didn't work.

    This is probably a problem with the view controller in Xcode.

    Any idea how I can do this ?

    Thanks !

  • Thanks for your reply

    Ashley

    I don’t have measurment other than my game passing from not crashing to crashing. :)

    I would be glad to send you the project file if it could help, but last time I send it you told me that there were too many third party addons required. Which is also part of why it took me so long to update to C3 and I’m still unable to use C3 runtime.

    I have no doubt that in most situations C3’s spritesheet system is much better than C2’s, and you sure did an amazing job with it. Just in this situation it doesn’t seem optimal. Thanks for the info about the way it’s working. I use a “container” layout which regroups most sprites from the game on a single layout (even though some of them are also dispatched amongst other layouts for loading reasons), from what you say I understand this could be a big part of the problem.

    Biggest problem: performance drop

    I didn’t mention it earlier, but another big problem I have using C3 instead of C2 is the huge performance drop. It runs very poorly on the C3 exported version while C2 was completely fluid (50-60 fps at all times on a mobile phone). To be more precise, there are sometimes freezes of 0.5 up to 1 second in the middle of the gameplay.

    My theory about this is the following: Healer’s Quest sometimes needs to load very small images that are not present on the layout in the editor (they are too situational and there are too many of them to load them all on all layouts). With C3’s spritesheet system, these very small objects may be part of a big unloaded 1024x1024 pixel spritesheet (if not dispatched amongst 3 different 1024x1024 pixels spritesheets), and the game freezes while the spritesheet is loaded. I already put the maximum spritesheet size to 1024x1024 and it didn't help.

    To be complete, I should say that these big freezes not only happen on my phone, but also on my computer when previewing the game, which never happened with C2.

    I even recorded a video of the freezes happening on my computer, here is a link to it:

    youtube.com/watch

    I think at least two of the 3 freezes in the video happened due to the loading of a new object.

    From all this, I conclude that my game has been developed with C2 in mind, and it just doesn’t suit the way C3 works. Don’t get me wrong, I already use C3 for my next project, and it’s much, MUCH better than C2! I’m just saying that Healer’s Quest works better as a C2 game unless I take weeks to completely rework the code...

    To reply to BadMario , Healer’s Quest is already split into something like 300 layouts, but the container layout is probably a big part of the problem.

  • Thanks for all the replies.

    I didn't change the image compression format inside C3, I use tinyPNG to recompress everything.

    Ashley , here is an image from the exported image folder in C3. It contains images from roughly 15 or 20 different objects in the game. That means in every layout where any of these object appears, the whole 1024x1024 image is loaded in memory... In addition to many others.

    So if I'm correct the RAM usage is MUCH higher than if every object type had its own spritesheet, as in C2. This is probably why the game is crashing all the time when exported with C3.

    The secondary (less problematic, but still) problem, is that with so many different colors on one image, tinyPNG's compression gets very crappy.

  • Hi, I'd like to disable the spritesheet system used by Construct 3 and return to the C2 system.

    The reason why I need to do this is that I need to apply a lot of lossy compression on my images so that the game can be reduced to less than 100Mb in order to be uploaded on Google Play. If I do that on the shared spritesheet, the quality is unacceptable (too many different colors on the same file for the compression to look correct).

    Also, the game exported with C3 crashes sometimes, while this never happened with the C2 export. Unless I'm missing something, this is probably due to the different object used on the same spritesheets, which may saturate memory.

    For these two reasons, I'd like to revert to the C2 spritesheet system. If another way of dealing with the problems I have exist, I'm interested in learning about it.

    Thanks!

  • I started this thread construct.net/en/forum/construct-2/how-do-i-18/can-i-replace-the-black-bars-o-141559 as I'm unable to get a correct export for iPhone, but it seems to be related to this thread also.

    For a brief explanation of my problem:

    - I can't get the background of an iPhone X game to be white (white bars in letterbox scale instead of black bars).

    - On iPhone 7 & 8, the background is white, but the status bar is apparent.

    - It's a Construct 2 project exported with C3 export manager.

    Seems like some people here have the same kind of problems. Any solution has been found for these?

    I need to publish my game SOON (publisher involved) so if someone has a quick (even ugly) solution it would be greatly appreciated.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • After modifying everything possible in the index.html file, and modifying the config.xml file as suggested by Asmodean , it looks like nothing works. The background in the Simulator stays black whatever I tried.

    I found a video which may help:

    Subscribe to Construct videos now

    But the guy is using Swift.

    However, I checked the list of files I have in Xcode and looks like I have files named MainViewController

    Maybe the white background should be specified in Xcode itself.

    Do you have an idea of how to do it Ashley ? (having white letterbox scale bars instead of black one when a project is exported to iOS via Xcode)

    It seems like anything I try with the index.html or config.xml has no effect...

    Thanks in advance for any further idea.

  • To keep you updated, the .png file as an image background that newt proposed didn't work. I've tested it on PC first and it worked like a charm, but as for the other methods, the black bars of the iOS version are still there when exported into Xcode.

    I sent a newer version with the XML modification to my publisher, I'll try that tomorrow, but I start to be dubious about the feasibility of this. It seems like Apple is blocking the color of the background to black. Maybe this has to be set in Xcode directly?

    I looked for it already but didn't find anything...

    Thanks for your help so far!

  • Hi newt ,

    No, I didn't try using a png yet. Could you tell me how I should proceed?

    That's a line to add in the index.html body?

    Thanks a lot in advance! :)

  • Just tried purplemonkey 's solution and sadly the bars remained black in the simulator, even though they are white when previewed in C2. :(

    Asmodean , could you please tell me where I could find that config.xml? I found a cordova folder on my C:/ but it contained a config.js, no config.xml. And the config.js didn't contain something similar to preference name.

    Do you confirm there are 8 "f" in the line ? (I thought it was 6 for hexadecimal, but I don't know much about programming so if you tell me it's 8, I'll put 8 of them :) )

    Thanks a lot, guys! Your help is much appreciated!

  • Thanks a lot, guys! :)

    I'll try all of this and hopefully end up with a working solution. I'll keep you updated in either cases. ;)

  • Actually I didn't try in Safari. It's a bit complicated because I do not own a Mac, so I'm doing everything via my publisher's Mac via AnyDesk which allows me to control their Mac from a remote location with horrible response time.

    I just clicked the index.html file in finder (on the Mac), and all I get is a white screen, but isn't it the expected behavior given the file has been exported with Cordova? I get the same type of behavior in Chrome from my PC.

    Or maybe did you mean something else by "trying in Safari"?

    Thanks!

  • Thanks for the suggestion, Asmodean !

    Sadly, the result in the Xcode Simulator is exactly the same... Actually, even the additional white margin at the top of the image is still there, while I removed the previous code. So I may definitely be doing something wrong. Or there is something I don't understand, such as cache from previous import of the same folder in Xcode, but it would be definitely weird.

    I'll rebuild the project completely and start from a fresh index.html file just to be sure.

  • Thanks for the reply. I took a look at the topic, but if I understood it correctly it implies using letterbox integer scale, and I definitely need letterbox scale.

    I just need those black bars to be white on iOS (on Android I managed to do it already, but on iOS for some reason it doesn't work so far).

  • Thanks for your help, newt

    I tried it (by replacing #000 by #fff) and the only difference I saw was that the whole game was displaced maybe 20 pixels lower and a white bar has appeared on top of the image.

    (image from Xcode's simulator, as you can see there's an undesired white bar on top of the image, but the borders are still black)

    But that's not at all what I wanted to do. (having white bars of letterbox scale instead of black ones).

    Maybe I put the code at the wrong place in the index.html file? I placed it below html, body {

    I know nothing about HTML, so maybe I just didn't do what you intended?

    Just as a side note, your first solution worked really well for Android,but sadly I only need it for iOS. :(

    Further help would be greatly appreciated.

  • Hi,

    I used the solution newt proposed to change the background color. I just changed "background" and "color" in the index.html file from 000 to ffffff.

    However, it doesn't seem to work on iOS. When playing the game on iPhone, the letterbox scale bars are still black instead of white and I can't manage to change them.

    Any idea of what I could be doing wrong? Is there an option in Xcode to change that background color?

    My export process is Export via C2 (Cordova), then C3 export manager, then build using Xcode.

    I really need to put these side bars white...

    Thanks in advance!