tap's Forum Posts

  • Joannesalfa - I tested the d&d example you sent. I found that in the XDK, the movement of the dragged object is very choppy however when I did a build and tested it on a device it was much smoother. So that's good.

    I'll let our xdk devs know that it seems to be choppier in the xdk then on device.

  • Tobye - if you want, send me a PM with a link to your capx as well as any special plugins you are using and I'll have a look at whats going on.

  • Hey Joannesalfa, So after some debugging I got to the bottom of what is going on with:

    Also i want to comment about Prevent auto-rotate, it doesn't even work because i used a trigger event, it doesn't work and still auto rotates when i do inverted portrait orientation and if i use every tick event to prevent auto-rotate, touch buttons take loooooooooooooong time to response and still auto-rotate

    I wanted to make it static orientation

    As it turns out if you use both the "Set orientation" (S0) and "Set auto-rotate" (SAR) together SO overrides SAR and basically turns it off. So the game will stay portrait but will rotate when the device gets to 0 or 180 degrees. The quick fix and what you should do in the mean time is just remove the SO line from your event sheet. There is a way to achieve what you want but it will require me to add a new trigger to the plugin to alert the event sheet when the orientation changes. Basically it will work like this:

    1.) If the game initial orientation is portrait then fire SAR. Done.

    2.) If initial orientation is landscape either wait until the user turns it portrait or prompt them to. Then fire SAR.

    I will add the trigger that will fire when orientation changes to the plugin first thing Monday and then I'll create a quick example capx for you to help illustrate what I explained above. But again for right now and developing it, just remove the SO line from you event sheet and you will be fine to test until the new trigger is in the plugin.

    [RE: Your drag and drop issue]

    I see the capx in my inbox and I'll check it out right after I add the trigger.

    ** UPDATE **

    The trigger is now in the plugin and you can download a sample capx to see one way or locking the device into portrait via https://dl.dropbox.com/u/2129074/orientationlock.capx

  • Hmm, how many other media assets does the game have going? Sprites, sounds, etc...   It could be a memory issue in that there are a lot of media assets and then a large photo gets dumped in? I don't know, I'm just guessing at this point. Try reducing the quality of the image and see if that helps. Maybe for testing purposes knock it down to like 20 and see if it crashes on you. If that does not help, just send the capx or appmobi app name my way.

  • Yep Joannesalfa, I plan on taking a look at it tomorrow morning to see whats going on. Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Tobye - Glad that worked for you. If you are looking to fill the complete screen and not have the letterbox bars there are a couple things you might want to try:

    1.) Design your game with a width/height ratio that matches so that it can scale to fill.

    2.) Design your game to fit the largest screen and then use crop for smaller screens. This can be done by putting "filler" static content that wont matter if it is cropped out.

    3.) Edit your index.html to include a background image that is designed to fit the style of the game. This way you dont get black bars you get whatever design elements you add.

    4.) While not preferable, you can always create different sized copies of the game for the different platforms.

    Just some thoughts.

    Best of luck.

  • xyboox - Files are now updated on github. You should be all set.

    Joannesalfa - I have not seen a PM but created a test capx and the orientation stays to what I set it to. Here is what I do:

    On Start of Layout

    • Action: appmobiDev Device > Prevent Auto-Rotate
    • Action: appmobiDev Device > Set orientation to Landscape

    I built it and tested it on device and the game starts and is locked in landscape mode and does not change when I rotate the device. I would only call these at the start and not in a loop as the case with every tick. That *could* be why you are seeing performance issues.

    Tobye - If you exported via appMobi using the device browser, just open up index.html in your favorite text editor. Scroll down and you will find a canvas tag. Just wrap that in center tags. In you index.html file you may see the start of the canvas tag around line 34. It would look like this <canvas ... >. Simply put the opening center tag before the canvas tag. Like so: <center><canvas ...> Then scroll down to around line 44ish and you will see the close canvas tag. It will look like this </canvas>. Just add a close center tag after it like so: </center>

    As for the image font, I will check out the link you sent.

    Thanks.

  • xyboox - Actually there is a way, but not an action. It's an expression called appmobiDev.Cookie. However, I just looked and saw that it only works when not under DC. I will add that DC support for it and update github shortly.

    Thanks

  • Hey Tobye,

    If I understand correctly, the issue only presents when you export using the device browser. The project is probably being set to full screen scale letterbox and ends up on the left hand side of the screen, correct?

    One thing that I saw that resolved this was to either wrap the canvas tag in center tags or set the style so its centered.

    As for fonts under DC, I'll find out from our DC devs when that will be supported. In the mean time, you best best is to use image fonts. (not static images, but where you use images of the letters in place of text). This way you can still generate dynamic sentences but using images instead. I have not checked if there is a C2 plugin for them or not, but Let me know what you find. Again I will get back to you once I find out more.

  • Hey Joannesalfa

    I added "Hide Status Bar"the plugin and it's live on github.

    Also how much of a delay are you seeing with touch events? Can you send me the capx to have a look?

  • Tobye - Have you read over the Scirra post on supporting multiple resolutions? I was going to type up a similar response but I stumbled upon this post. It goes into pretty good detail and provides great explanations.

    http://www.scirra.com/tutorials/73/supporting-multiple-screen-sizes

    Let me know if this helps you. If not I'll work with you and see if we can come up with a solution for you.

  • Ashley - Hmm, ok so you already implemented the bridge code into the C2 engine. That's pretty much all I had in my "bag-o-tricks". :) However, I just talked with our DC guys and they will be looking into it soon. So we will probably have a DC native fix for it. I will update the thread once I know more.

  • Ashley, you beat me to the post edit. Man, sometimes I think you aren't a real person and instead a bot :)

    [EDIT]

    In my attempt to reply quickly and start on the fix, I was too brief and left out a part. So I wanted to edit my previous post stating that in addition to the jsonp code, you need to add bridge code that will pass information from the webview layer down to directCanvas layer. XHR does not exist in DC. Sorry about leaving that out. In my head I wrote it, but it never made it to the screen. :(

    I will be adding support into the appMobiDev plugin to handle this and will reply when the changes are up on github.

  • Tobye - Looking into it. I'll post back with what I find.

  • Hey guys,

    This sound like a cross domain issue. That is why ajax is not working. A solution would be to find a plugin that allows for JSONP calls. If you can not find one that fits what you need, let me know I can fairly easily add it to the appMobiDev plugin.

    If I can ask, what are you looking to use Ajax for in your games? Is it for saving scores, game data, etc..? If so, checkout our playMobi plugin. That is our cloud service for things like leaderboards, badges, game data, etc...

    Again, just let me know if you can't find a plugin to fit your needs. I'll be more then happy to help out and add jsonp actions to he appmobiDev plugin.