Begeegee's Recent Forum Activity

  • Hi there!

    I’m looking for a simple and smart way to auto-size my game on different devices. So, the game is primarily designed for iPhone 5 and up which means the game is built on a resolution of 640x1136, and is in portrait. When played on higher resolution devices of the same aspect ratio, such as the iPhone 6+, everything scales up fine.

    The problem is with iPads since they have a wider aspect ratio, and while the game still scales to fill the screen as much as possible, there’s black bars by the sides of it.

    Here’s my solution, but I don’t know if it’s possible since whatever I tried so far hasn’t worked. Without changing the resolution of the whole game (since that’s going to break everything and require time I don’t have), I’m wondering if these black bars on either side of the game can be removed, revealing a sprite behind them (placed outside of the layout) which looks like an extension of some buttons, and can be tapped on. So whatever width greater than 640, the game will automatically scale up to fill the screen and reveal part of this sprite.

    Here’s a basic diagram to help visualise what I’m trying to explain:

    https://www.dropbox.com/s/5pnqco54w12s4 ... m.jpg?dl=0

    So imagine it like a pinball table (which the game isn’t!). You see inside the all of the table when at aspect ratio of iPhone 5 and above. But when the aspect ratio is wider, you see outside of the table (the floor/walls etc.). Hope that makes sense <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    With this idea, I don’t see a need to detect the device width and manually resize the game and shift all the sprites across by X. I’m actually hoping I won’t even need to touch the code! I figure if it’s doable it must be something to do with the “window”, “layout”, “margins” settings etc. so that when the game scales up automatically, the back bars are not shown, instead it just sees outside of the layout (so I don’t have to change positions of any sprite in the game based on the device width, which is a massive undertaking…).

    Off to sleep now but will check the thread tomorrow!

  • I actually just posted this tutorial in another thread hehe. But we used it in our game to take a snapshot of the screen on death, and when you click a "share" button, it will bring up the official Android menu or iOS equivalent with all your sharing options, or even if you just want to save that screenshot you can do so to your photos.

    https://www.scirra.com/tutorials/1457/s ... os-android

  • Might want to check this tutorial! We used it in our game for screenshot sharing and it brings up the official Android or iOS menu with all the sharing options. Unfortunately, couldn't tell you how to do it though as I didn't work on that feature myself.

    https://www.scirra.com/tutorials/1457/s ... os-android

  • After version r206 Web storage became Local storage. But they work the same way.

    On that note, we're developing a game which is almost finished using Web Storage. But since the update came out we're hesitant to upgrade our Construct versions since we don't want to break all the saving. If we update will Local Storage literally REPLACE all existing Web Storage events with the Local Storage equivalent? Or must everything be recoded manually in Local Storage?

  • Was having trouble with Gamecenter too but I literally just got it working myself! Looks like you're going through the same process as I am, with exporting from Construct as Cordova and then using XDK after that. It wasn't working for me and I read that I should be seeing a Sandbox setting in the Gamecenter settings. But that wasn't there. I then read about the Testflight app and wasn't sure if it was the solution, but I installed it anyway and after that the Sandbox setting appeared, which I then switched on.

    So I then loaded up my game and Gamecenter asked for authentication! I logged in, which then made the leaderboard show up once I clicked my leaderboard button.

    So try what I did if you haven't already. And it may seem like a stupid question but you are actually testing on an iOS device right?

    Edit: I may also add that I'm using the Adhoc profile and installing the game with iTunes, don't know if that would make a difference though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks guys, sorry about the late reply from me! So I take it there isn't a way to "package" everything the webfont needs into the game files so it can be loaded offline?

    The font is invisible and is being loaded on startup, in our splash screen actually, but still it doesn't always download in time which is kind of annoying given the type of game that ours is. You're in the menu very quickly after the splash screen which does contain text that needs to change, so can't use sprites there

    Magistross I did take a look at that sprite font generator before but I did not think custom character widths were possible, but now that I read it again it seems that IT IS! Not quite understanding how it works as its outside of my ability but will give it a shot and let you know if it works!

  • Hi there,

    I'm part of a small team working on a simple app, where a release on iOS is priority. A big theme in the game is that it's minimal, meaning not having to wait for anything to load, and being able to jump straight into the game etc. We've found the absolute 100% PERFECT font for the game (Quicksand), but this isn't supported by Construct so we've had to use it as a webfont. But unfortunately this means there's anywhere from a 1-5 second wait for the font to load, causing the game to display the default font and then update to the webfont. As I said, our game has a minimal approach and is quite small in size anyway, so we want to avoid a loading screen altogether. Another thing I should mention is that if the player is not connected to the internet, the webfont will not load which is not acceptable. What I'm getting as is having to outsource a font in such a way is not reliable.

    This got us thinking. Is it at all possible to import the CSS file or anything else the font needs to work into the game assets? I see that I can import the CSS file into the game under "Files" in the Projects List, but I see no way to make the game reference this when setting the webfont. Is it even possible?

    Apologies if we're not understanding something fundamental about how webfonts work. We are not programmers, which in essence is why we chose Construct 2 (which has served us amazingly by the way)!

Begeegee's avatar

Begeegee

Member since 11 Feb, 2015

None one is following Begeegee yet!

Connect with Begeegee

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies