0plus1's Recent Forum Activity

  • This should be sticky, I wish I'd seen it before..

    Why are you setting this: "(LayoutHeight * scaleRatio - WindowHeight) / 2 / scaleRatio" technically the result would always be 0? Or am I missing something?

    EDIT: Also how is it that the element in your canvas stay magically centered?

    EDIT2: Disregard that I'm stupid, I didn't see the unbounded scrolling

  • Speaking of mobile, the first issue are the different resolutions, and more specifically in c2 the real issue is the aspect ratio.

    Now I understand that the support of different aspect ratio is not easy, but currently c2 is handling this issue very poorly.

    My journey started in this thread that made me also ask on stack overflow (sorry for my lack of mentioning of c2 but I didn't want the question to get dismissed as "game maker").

    Basically you can't resize the c2 canvas with certainty, the only way is to create an anchor behaviour and then get the size of the stretched sprite because the c2 canvas DO NOT match the windowsize (I think this is for the scaling) in any case doing it with this hack creates all sort of problems which are unpredictable (and that resulted in errors in iOS4.3 and android 2.2).

    Currently in c2 it is not possible to support different aspect ratios, we have to rely on scaling and subsequents horrible whitespaces (which on android are unprofessional, on iOS are immediate ground for rejection) or on building for different resolutions, which by the way is a real nightmare on an interface like c2 where you can't access the code.

    I would like to hear:

    1) Ashley what is your position on this issue and what could we do to mitigate this and what are the consequences of stretching a sprite with anchor and then position elements relative to its position (one of them is for sure the onload event not firing anymore on sprites and this error).

    2) The guys who published on android (@ranma) what did you do for the ratio issues? Did you scale and left the blank space or found other solutions?

    Thanks

    EDIT: A possible solution would be the one corona is implementing. Basically is the same as scale mode but binded to the center. C2 Instead binds the canvas to the top-left corner. If we could have it in the exact center we may create "bleed" graphics like bigger background that do not show normally but only on bigger devices (see the corona link).

  • Pode, don't worry about that because it's probably an issue with the simulator.

    Instead, your plugin on both android/iphone when the aspect ration changes from the original one it fires an error in this line of the engine:

    ctx.drawImage(cur_image, myx, myy, this.width, this.height);

    do you have any idea of why?

  • Ashley after testing it looks like a bug of the simulator but I'm not completely sure.

  • How can I make a plugin that simulates a touch event every thick at a determined coordinate?

  • Ashley

    Apparently that is not the problem, even a blinking object on top doesn't work, it's a problem here:

    this.imageObj.onload = (function (self) {

    this never fires, not until i keep on touching the screen (not one not two,but two/three in rapid sequence) do you have any idea on why this happens? Apparently only on iPad this happens.

    Thank you

  • Hello,

    for reasons that I do not understand, both the inject and the loadfromURL plugin do not work on the iPad until something makes sprite refresh.

    To clarify:

    1) Creating a non-transparent sprite bigger than the inject/load sprite on top of it then destroying it triggers the loading/injecting

    2) Touching the sprite several time after 2-3 seconds loads/injects the new image

    This leads me to think that the problem lies in the refreshing of the canvas but executing this command:

    this.runtime.redraw = true;

    doesn't change anything, do you guys can point me in the right direction?

    Thank you

  • Pode I found the culprit for reasons unknown this never fires:

    this.inst.cur_animation.frames[this.inst.cur_frame].texture_img.onload

    until the user touch the screen (and even then is unpredictable) do you know why? Is there any way to forse the loading?

  • Ashley sadly the tickcount doesn't reset each layout so after the first one, I need a solution that resets each layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Pode I have a strange issue.

    On iPad (and mind only on iPad) the plugin doesn't work. I load the image on an event and unless the user touch a part of the screen the image doesn't get injected. Do you have any idea about why this could happen? I think it's for the way I'm resizing the screen is this a possibility?

    Thanks

  • Ashley, It's not a problem of runtime, but of edittime, it would've been useful to be able to switch between animation to have a preview on the editor, just that.

  • I have a sprite with several different animations, how can I show a particular one in the editor instead of the first one?

    Thank you

0plus1's avatar

0plus1

Member since 29 Dec, 2010

None one is following 0plus1 yet!

Connect with 0plus1

Trophy Case

  • 13-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies