nutmix's Forum Posts

  • People don't seem to understand that letterbox scale is totally inappropriate for commercial mobile games.   The black bars are not acceptable to any customer, and when you rotate to landscape, most of the screen is black bars so you cant even use the gui as the buttons are too small.

    The GUI has to cover the entire screen keeping the aspect ratio.

    None has black bars in their casino/gambling games. Look at the html5 slots from companies like IGT, NetEnt, Probability etc. (e.g. on William Hills and paddypower mobile websites).

    We have developed about 100 Flash games, and a number of games based on the BigWorld and Unreal engines. For us, all desktop and mobile applications will be done in Flash and Air, as this is a superior platform if one has the flash expertise.

    However, where Construct 2 offers huge value is in its HTML5 mobile games development - there is no competition in this space.   When it gets a few more mobile focused features, I will be able to sell it many times over. :)

  • Ashley, the supporting multiple screen sizes is good, but only covers a very small percentage of what is needed for mobile. Mobile is a completely different beast to PC games, and you have to have both landscape and portrait layouts (I would love to put them on the same layout, but havent figured out how to do this, as you cant change anchor parameters at runtime). Also, you have to implement swipe, getting rid of the address bars, Handling wildly different screen sizes, aspect ratios and pixel densities.   Those 12 points I put in are essential to supporting mobile - the competition all do swipe, no address bars and landscape/portrait etc, so we have to.

    If I wrote a supporting mobile tutorial now, it would be 10 pages or more - its not easy (not because C2 is bad, but because its genuinely hard, and not many people are doing it - they use phonegap etc).

    I thought I had finally a perfect solution to cover all of our target platforms, now the iphone5 has come out with yet another resolution, and I expect it will be difficult to detect it server side (i.e the useragent string will be the same)

  • Im guessing that appmobi and phonegap solve a lot of the mobile issues. These are not an option for us as we do casino style games, which are not allowed in the appstore, and also we dont want to pay apple 30%.

    If you wrote the games in js and HTML5, you would have the same issues.

    I did a few prototypes in Impact, and this has similar issues (and you need to know javascript).

  • The supporting multiple screen sizes tutorial is a complete waste of time for mobile devices.

    As far as I can tell, very few people are using C2 for mobile HTML5

    After a month of groping in the dark and trying many different options, we took this approach:

    1) use crop full screen mode.

    2) make the backgroud 1024x1024 and center it.

    3) make the screen size iphone 4 resolution = 640x832 and 960x536

    3.5) use anchors to glue HUD bars, buttons etc to the corners/edges so they expand out to fill available space on longer thinner devices.

    4) every tick examine the screen width/height and see if its changed.

    5) if the size has changed, scale all layers except background to best fit keeping aspect ratio

    6) Hack the index.html to make the browsers address bar go away in iphone and android

    7) Export a version of the project with retina display switched off for the ipad 3. (have to detect in in js).   ipad 3 will scale up ipad one resolution, which is 1024x768 - tool bars etc. you wont be able to tell the difference.

    8) have separate layouts for portrait and landscape modes, and you have to store the state of your game as when you switch layouts, it destoys everthing.

    9) Export a version for the PC with fixed size or letter box scaling and landscape mode.

    10) had problems getting anything to work properly on iphone3 - decided not to support it (the only way to detect it is to run a speed test in js).

    11) C2 has no concept of modal dialogues, and no way to disable users clicking on sprites, even if they are invisible and hiden under layers/bottom of z-depth. you have to design your game with all the user input in a small a number of groups as possible, and then disable groups to switch of game input while diplaying psudo-dialogs.

    12) dont forget to select the option in the touch settings to make mouse input act as touch.

    I implemented swipe also, to swipe in left and right layouts with settings, info etc. There is no gesture support, so I wrote my own just tracking the touch coordinates.

    Good luck.

  • Crashed FF 15.0.1 the first time for me too.

    What is spriter? Is it the bash monkey tool?

  • No, I only access on a single laptop, but always have a couple of browser windows open on the forums.

  • It does not seem to be cookie/session related, as I can get the error after correctly posting a message, then quickly editing it and reposting within say 30 seconds.

    Perhaps the error is because the session has become invalidated due to a problem with whatever load balancing and session persistence the web system is using.

  • This seems a really supid question, but as I dont know the answer, pretty much all my code produces unpredictable and largely incorrect results I when I resize the browser window using crop full screen mode and layer scaling.

    I this mode, the actual browser window may be larger or smaller than the projects window size, which may be larger or smaller than the layout, and there may be scaling.

    There are a number of entities, presumably some of which have their own coordinate system:

    1) projects window size.

    2) viewport (no idea what this is - not in manual)

    3) canvas (no idea what this - not in manual)

    4) layer

    5) the browser window

    6) the layout scale

    7) the browsers pixel dencidty (retina display)

    8) other?

    object-> Compare X

    What is x relative to? Which of the above coordinate systems? If some of the above coordinate systems are different, how do you map between them?

    What is the difference between:

    Object.X

    Object.XAt

    Object.ImagePointX

    Touch.X

    Touch.AbsoluteX

    Touch.AbsoluteXAt

    for example?

    Thanks for any help or tips.

  • Thanks for that.

    Do you know what X is relative to? This is a really fundamental question, and we dont know the answer.

  • There is a main game screen, and a settings screen (where you can set the number of lines, switch sound on/off etc).

    We have spent 3 weeks so far trying to scroll the settings screen over the top of the games screen (or shift it over) with the unpredictable width of crop fullscreen mode (which is a requirement for mobile).

    We tried these and rejected these strategies:

    1) make setttings a different layout. Rejected this strategy as you cant scroll another layout in/out of the current layout, and you lose game state.

    2) put the settings form as a single sprite, move the sprite over the layouts, and try and use the cursors X&Y corrdinates to work out which button you are over. This failed as the relationship between the X coordinate of the touch event has no relationship to the object its over due to scaling, browser size, crop mode, viewport etc and these relationships seem to be undocumented. We dont know what a viewport or canvas is.

    Now we are considering putting the settings objects (buttons to increase/decrease volume etc) in its own layer with the contents to the far left outside the window area. however, how do you scroll just a single layer? We cant scroll the entire layout, as the variable screen size in crop scaling mode means we dont know how much gap to create beteween the main screen and the settings screen (if the window width was fixed, this would be easy).

    Any thoughts or strategies to try would be much appreciated.

    So far we have spent 3 times more money trying to swipe in a settings screen that it took to create the entire game.

  • Hi, I want to get a panel to slide in/out from left and right with info.

    E.g. I slide it out using a swipe gesture, then slide it back.

    I have tried lots of ways to do this (including scrolling the whole layout), but currently Im trying with a sprite.

    The question is, how do I say "tween the sprite from this X position to this X position" to show it sliding nicely across the screen and stop in the center?

    Do I need to hand write movement code which fires evey tick, and does the necessary maths and setting of X of sprite?

    Could the bullet behavior be used for this type of animation?

    Ive tried bullet, setting the right info panes angle to 270 and speed to 1000 when I detecte a left swipe, but I cant see any way of stopping it in the middle of the variable width screen. Ive tried stopping when X>=0, but X seems to have no conrespondence to the left coordinate of the window: depedning on how big I make the window X is either off screen or somewhere oncreen. Ive tried various other options, including checking to see if on screen etc and overlapping with an offset, but as I have to use crop mode with manual scaling for various different mobile screen sizes, all of these produce random results depending on the current size of teh browser window. I have no understanding of the relationship between window, layout, canvas and viewport - there does not seem to be any manual entry explaining these concepts unfortunately (e.g. canvas, window and viewport do not appear in the manual at all).

    I dont even know what X refers to when you do an object-Compare X. Is it relative to the window, the layer, the viewport, the screen, or something else?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, solved the not being able to open the file once imported issue - renamed it to .txt and now it opens in notepad.

  • My internet connection is 100% solid - I have VPN connections, ssh and database connections to other continents open all day without interuption.

    When i remember I copy the text before hitting post, but I always forget on the ones where it fails.

  • OK, forget the last post - the dictionary object cant read json files - I thought the load action would load from file, but it only can load from hand entered text at design time.

    It looks like the only route is write a some AJAX code.

    Done this, and by luck you can use a relative URL which is just the name of your json file in quotes.

    So it works - I can read in some dictionary settings via a file at runtime.

    What is the earliest time I can do this? I need to get the entire game to wait till this has done, which is a pain.

    Im using "On loading finished". Is there an eariler event I can use?

    The format of the json file is:

    {"c2dictionary":true,"data":{"test":3,"test2":2}}

    The only problem I have now is that you cant edit the file in the single file project, you have to delete it and re-add it from somehwere else if you want to change the files contents. There is an "open" option if you right click on the file in the project, but this does nothing (for me anyway).

  • Sorry, does anyone know the format of the json text objects required to load into a dictionary? I need to create the file using notepad or similar with a bunch of key value pairs in can then load into the dictionary object or similar.

    I know XML, but dont know json. is there a json eqiv. of the DTD of the format required to load in to a dictionary?