Ashley's Recent Forum Activity

  • Yeah, it will slice each frame in to a separate PNG-32 file. Save as a folder project and browse the files to see what it's doing.

  • Remember the estimate is only a guess: the only way to know for real is to actually export your project, which will run various CPU intensive compression algorithms and compact the project size down. More info in this blog post. The estimate is pretty crude since it doesn't do all that work.

    When you import images, regardless of the format of the image, C2 stores it in the project as PNG-32. This is what the estimated size measures, so there should be no difference between importing a PNG-32, a PNG-8 or a JPEG on the estimated size.

    You can set a different export format in the image editor. It's still PNG-32, but will be recompresed to either PNG-8 or JPEG upon exporting if you use this option. It's not automatically set, so if you import a JPEG it will still export a PNG-32 unless you click the image format button and change it to JPEG.

    The export format is not currently taken in to account in the estimated size, but for the next build I've changed it: PNG-8 will be estimated to be half the size, and JPEG will be estimated to be a quarter the size. Again those are pretty arbitrary guesses, so you'd have to export to know for sure.

    Hope that helps!

  • Yeah, either that or the browser notices the file contents is really a GIF. Open it in a hex editor and the first 3 characters are "GIF" to mark a GIF file, so the browser can probably figure out it's not really a jpeg anyway.

  • ranma is right and because computers are not perfectly precise the result is actually -1.8369701987210297e-16. The confusing thing here is that when adding floats to strings, Construct 2 rounds numbers to about the nearest billionth before adding to the string. The motivation for this is again floating point inaccuracy: if you say "Every tick, add 0.3 to a variable" and set a text object to the result, due to rounding errors eventually you'll get something like 2.999999999999997. Often due to small sized text objects which cannot fit a lot of digits this means the number disappears completely, and we get users reporting it as a "bug". So with a very very small amount of rounding, it continues to appear as expected and you get "3". In this case the result is such a small number you just get "0".

    The exception is the str() expression which does not do any rounding. If you display str(cos(270)), you'll see the real answer.

    The Array object does floor() on floats passed as indices, so presumably -0.000000000000000183... is floored to -1, which returns 0.

    Solution: round the indices yourself. This is standard practice in programming - whenever you want to use a floating point number as an integer, it's best to round it or floor it explicitly so you get better behavior.

  • Could you make a simpler demo in a new .capx? It might make it easier to understand, without the specifics of your project.

  • Yeah, directCanvas is not actually available for Android yet, but they're working on it. For the time being try the CocoonJS launcher for Android.

  • The next build has ViewportLeft, ViewportRight, ViewportTop and ViewportBottom expressions. You'll be able to use these, e.g.:

    Set X to (ViewportLeft("Layer") + ViewportRight("Layer")) / 2

    Set Y to (ViewportTop("Layer") + ViewportBottom("Layer")) / 2

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • delgado did you check for browser errors in the XDK? Where there any?

  • Works just fine for me. Please see how to report bugs, check for any browser errors when in the XDK, and share your .capx.

  • Joannesalfa - you can probably get by OK testing your game on Safari using Preview-on-LAN. Once it works there it should be straightforward to wrap for the app store.

  • I'm sure WindowWidth and WindowHeight are correct. Are you sure it's not to do with the parallax change in r91?

  • The installer should already do that, so I'm not sure how this got through...

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,775,217 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x5
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x42
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs