Videlais

Members
  • Content Count

    170
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Videlais

  1. I reproduced this error; whatever was the first rendered disappeared completely. And you aren't missing anything, either. This is just another in a long line of weird errors between CocoonJS and Phaser. I also tested with a dev build from last week and both showed up regardless of order but created the mirroring effect @Oliganti mentioned seeing. Have you had any more luck, Oliganti? I've seen the mirroring too, but haven't built a new version from source in a few days. Also, on the topic of disabling WebGL in the options, it's not as helpful as you might think. Even with disabling 'screencanvas' (as the newer 2.1. patch does), WebGL will still creep into anything built using the Ludei web interface. As far as I know, there isn't a way to disable that in compiled builds.
  2. That might be a scaling issue. If it is looking as I think it might be, the canvas is being mirrored to fill out the screen. Is that what is happening? Is the screen being mirrored on the edges?
  3. To answer why using render is so much slower, it's because it is making extra drawing calls per frame. Instead of caching the visual data and updating sections, game.debug makes new calls every single render call. That's a huge number of wasted drawing calls that would drop the frame rate tremendously on any platform and especially on mobile devices. As well, to backup @Ezelia's comments, upgrading to Phaser 2.0.7 is recommended. There have been a number of CocoonJS-related patches between 2.0.2 and 2.0.7 -- and more to come in 2.1 too.
  4. I agree with some the WebAudio talk too. However, I'm also of the opinion some of the more advanced features would probably work best as plugins. Or, best case, finding a similarly licensed library to optionally include that would hook into Phaser's API. I'm also up-voting, as it were, better packaging support. Being able to detect if Phaser is running under node-webkit, Apache Cordova, PhoneGap, CocoonJS, or something else and changing its settings to match could be improved. Admittedly, it's gotten much better this year, but it's still got a long way to go for some platforms. And, finally, if we are asking for things to be put on a wishlist, I'd like to ask for a re-working of Debug. For every primary game object, there should be a corresponding game.debug call that lists its information.A decision to either follow the naming convention of game.debug.object or, as are some things now, game.debug.objectInfo for displaying information.
  5. I replied to your thread on this topic just now, @Binary Moon, but for others, it looks as if anchor.set isn't working correctly for text. I did some testing with various standard anchor values today (-1, 0, 0.5, 1) and the only useful value was zero (0). For 0.5, it positioned it much higher than normal, on the uppermost edge of the screen vertically. For -1 and 1, it was gone completely; either it didn't draw it, or its positioning was far outside the screen. (Note: this only affects Canvas+. It, of course, works fine in WebView.)
  6. I saw your post in the Phaser + CocoonJS issues thread yesterday, and was going to reply today, but then saw this and thought it might be better to write comments here, instead. While using a custom launcher can be pretty useful, I actually recommend getting the official launcher per platform too. That way, you have whatever the "official" release is (along with its updates) and can compare between versions. (For iOS, this isn't too much of a problem. However, on Android, with its different OS API versions, it can be useful to support older versions that the official release does not.) It's, of course, up to you, but I personally recommend ZIP files, yeah. It can be a little bit of a pain to move files on and off a device (iOS is easier than Android for that), but using ZIP files makes it easier to test multiple configurations quickly. You can load several ZIP files at once and run through them without having to re-type a URL. Yeah, I've seen this recently too. I'm not exactly sure what the cause is yet, but my guess is that you are setting anchor values on the text somewhere. For some reason, that's not working right now and using anchor.set at all on text messes up its position by a great deal vertically.
  7. It works! Just tested my particles and button test cases with that patch using a new build.
  8. So, bad news and a mea culpa here. After finally figuring out why @ghostrifle and I were getting different results, I went back and re-tested everything. It turns out I had turned off "WebGL Enabled" on both my iPhone and Android tablet awhile back during my testing of image issues weeks ago, which meant everything was working fine with my recent testing. Turning that option back on (the default) breaks things again. Single image loading works now, but anything using more than one image for anything (@ghostrifle's test case, particles, and tilesprites) doesn't work anymore. Despite this change, though, I did go ahead and update the top post today. Since CocoonJS 1.4.7 will be depreciated starting 1 August 2014 (tomorrow for me as I write this), I dropped mentions from the post and tried to organize toward the latest versions of Phaser too. I didn't see much use in keeping information on Phaser 1.1.* given the newer patches and fixes in 2.0.*. Edit: New builds of Phaser using this patch should work fine with multiple images.
  9. This is strange. I recorded what was shown on my iPhone too just now. And I can see the pink square on mine. I'm putting Buttons back on the list, but I'm definitely going to have to do more testing on this.
  10. Huh. Me too. Other than using 2.0.1, we've got the same setup on iOS. When you tested the case, it loaded the 'background.png' image as a sprite at 0,0 and the button in the middle of the world space, right? Tapping or clicking on the button (the pink square) should have produced the message "Button touched/clicked!" in the console.
  11. @Binary Moon: It's as @Starnut wrote, compiling a launcher for the platform and then loading it. In my case, I've been using an Android 2.0.2 launcher and, like you, with a iOS 2.0.1 as a backup test environment. @ghostrifle: Hmm. I just tested your case and it worked for me in CocoonJS (iOS, 2.0.1). What is your testing environment? Let's rule that out first. @korgoth: I'm not surprised shadows don't work. Text working at all without a work-around hack is still new. Still, yeah, I'll start making separate test cases per text issue (multi-line, shadows) today.
  12. @korgoth: Okay, yeah, I'm seeing that too now. I didn't test for multi-line yesterday. That's something to definitely put on the list, then. (I've updated my case to test for multi-line now too.) @Starnut: I put together an audio test today, but haven't tested file formats themselves lately either. WAV is probably still the safest bet, though. (My test has WAV, OGG, MP4, and MP3 files. As far as I know, that covers all the usual bases for file formats.) I've been thinking about making a new thread for Phaser + CocoonJS on Ouya stuff at some point in the future. I explored it months ago, but when images stopped working I was also at the point of maximum frustration with CocoonJS and stopped completely. Now that they are working normally again, and gamepads should now be fixed I've been told, I'm interested to get into it again. @ghostrifle: Buttons should now be working in Canvas mode. Can you let me know if this test works for you?
  13. Finally had a chance to organize my random test cases into something worth posting today. They can now be found on GitHub here. Summary: nearly everything works now with Phaser 2.0.7 and CocoonJS 2.0.2. Details: I worked through my older tests for various things and updated them all to Phaser 2.0.7. That's what is in that GitHub repo: simple test cases showing if certain functionality works now or not. Everything I tested (including Text, TileSprites, Images, Buttons, RetroFonts, Tweens, and Emitter/Particles) all work great. I didn't have to use any hacks or even really change the code I pulled from the official Phaser examples too much either. The only two new things I noticed were that the 'DOMMouseScroll' and 'mousewheel' events throw warnings. (Should just be a quick change in Mouse.js around here to fix that, though.) So, as far as I know, then, the outstanding issues include XML (for which I'm still -- yes, still -- working on finishing a solution for), Gamepad (which should now be fixed on all devices without needing my plugin, but will confirm soon), and organizing 'best practices' for scaling on different devices -- and as for the last, I'm liking @Starnut's code for that. I'm going to wait a few days before I update the top post again, so if anyone else has something they think should be tested or included in that post, let me know. Otherwise, I'm probably going to go back to playing around with Phaser + CocoonJS on Ouya some and just declare everything working for mobile devices.
  14. Okay, cool. Thanks for letting me know, Rich. I'm probably still going to run through some things this weekend with Phaser 2.0.6 and the new CocoonJS 2.0.2 just to check out what I was told is now fixed. But I'll hold off till the new 2.0.7 is out mid next week before really getting into it. I am really happy so many new fixes are in Phaser now, though. Love how far we've come since February.
  15. Hi, everyone. I'm back from my slightly-over-a-month vacation away from CocoonJS + Phaser problem solving and I'd like to update the top post of this thread over the next two weeks. Since both Phaser 2.0.6 and CocoonJS 2.0.2 are out and many of the annoying problems -- image rendering, WebGL/Canvas stuff, etc -- are mostly covered now, I'd like to collect all the latest known issues and solutions again. And while I did read all the new posts, I haven't been playing with the code itself too much lately. That's where anyone who is willing to help comes into this. Specifically, I'm currently interested in all the highlights from months ago: Images, Audio, Text, Buttons, TileSprites -- and anything else that I'm not aware of yet. My plan is to work through the old list again and then move on to the newer problems. I'm currently working on finishing a solution to the XML problem, but will be checking out the classics too. If anyone else already has (or is willing to create) simple test cases proving that something now works (or doesn't), that would be extremely helpful. Nothing too fancy, just enough lines to show the issue or that everything's fine now. Thank you for your help with this.
  16. With Android devices, it is always recommended to have a backup OGG or even WAV file per audio load. MP3 files on Android devices don't always work correctly because of licensing issues and service-carrier versions of browsers.
  17. Hi, zuzzuz. I know it has been many days since you posted this, but I just want to point you at a new post within the "Common Phaser + CocoonJS Issues" thread that should help with the sound problem. It should also already be fixed in the dev branch of Phaser too. The next version, once it comes out in a few weeks, shouldn't have this problem anymore.
  18. Sorry for the long delay. I wasn't able to get back to the forum until today. The getElementById is part of the Phaser.Game call. It is the fourth parameter in your call here. When you are using Canvas+ mode, it limits how getElementById works. It can't find the element by its ID of 'Primer Juego'. That's all I meant by that. It throws a warning when using Canvas+ mode. There was a new post today in the "Common Phaser + CocoonJS Issues" thread that was a solution to the sound issue that might help you here. There seems to be a race condition between enabling touch support and the loading of sounds. It should be fixed in the next version of Phaser, but many people, like you, are having problems at the moment.
  19. Chances are you might have seen this thread before now. That's where a bunch of us have been sharing problems and solutions for doing things in Phaser and CocoonJS. To start to answer your question, though, you would do it the same things as loading anything else, really. The problem is not so much detecting if a certain device has retina support, but knowing from its screen resolution if you should load those higher resolution images or not. So, for example, in CocoonJS' Canvas+ mode, the reported screen resolution is in the window.innerWidth and window.innerHeight values. What I usually tell people is to use that full, extended size during the creation of the in-memory canvas (as part of the call to Phaser.Game) and then, before loading images, make a decision about either loading higher or lower resolution images to fit the screen of that user. Another solution favored by many is to start with higher resolution and then scale down by calculating the difference between the reported screen size and the known size of the images. Phaser's ScaleManager can do most of that basic work for you, but you can also do it yourself too if certain sizes are needed.
  20. Hi, morriq. Be sure to look at that thread j0hnskot linked to for lots of known solutions to problems. We do try to keep track of issues and how to solve them between Phaser and CocoonJS. Something to keep in mind, though, without knowing anything about your code at all, is that the Canvas+ mode doesn't act like a browser. It runs as if it is graphical context all to itself. If you are using things like getElementById (even through the call to Phaser.Game), it can often produce problems. The same is true if you are using any DOM activities too. Those really don't work as well under Canvas+. It is pretty basic, I know, but the CocoonJS Launcher is really your friend in trying to debug this stuff. It will usually (although not always) list warnings or errors for things in console. My guess, since you list that it runs good under WebView+, is that you are using some type of DOM operations somewhere and Canvas+ just doesn't know how to handle that.
  21. I'm not sure what you mean when you write that CocoonJS doesn't allow you to share the APK. You probably could have uploaded it to GitHub and posted it along with the other files, right? But, then again, maybe you meant they don't produce a sharable URL? Not sure. Anyway, I tested what you posted to see if I would see the same result. For me, the game ran good (although with some problems) in Canvas+ and well in WebView. However, I didn't hear any sound with either. And I didn't investigate too much to see what the problem might be. (The sound issue might be related to another only recently fixed problem in Phaser with CocoonJS.) What I did find, though, and is probably part of the problem with your code with Canvas+ in CocoonJS, is that you are using things like getElementById (in reference here) that won't work well in Canvas+. So, in reference to CocoonJS breaking your game, what did you mean? I'm one of the people who tracks issues between Phaser and CocoonJS, so I'm curious if this might be something undocumented.
  22. As the start to helping with this, are you using other file formats? Depending on the operating system and device, MP3 is not necessarily the best. Often, and this is especially true of Android devices, OGG works well as either a primary choice or a fallback for when MP3 is not working. To clarify, though, are you writing that it doesn't work as you think it should in Internet Explorer on a PC? Is that right? And for the tablet and phone, what operating system do they run? Is it iOS or Android -- or something Windows based? I ask because my first guess is that the underlining code in Internet Explorer doesn't support the pause and resume functionality. That is, it reads as if the code only works in Firefox and Chrome on the PC. In which case, it might mean trying something different.
  23. Are you using a Bitmap Font? If so, you are probably using XML. It's the same issue in this recent thread too, which might also help with some solutions for you.
  24. There are a few different ways. Convert the XML to JSON (using one of a number of programs and services for that) and then use something like this example code.Use my own external library for replacing DOMParser in CocoonJS (See my earlier post for the links.)Convert the TypeType font (assuming that's the original source) into a a bitmap font (using BMFont or a similar program) and then use Phaser.RetroFont instead.(Worst case and most work) Convert all the text areas into separate images and load them as needed.
  25. That's pretty strange. I know that error very well (having worked on XML support for CocoonJS) and it only occurs inside the Phaser functionality to load XML. (Plus, the xmlLoadComplete function name gives that away.) Somewhere in there, Phaser thinks you are loading XML and CocoonJS doesn't like it.