botoman

Members
  • Content Count

    15
  • Joined

  • Last visited

  1. Hi @enpu Here's the second example that leak canvas memory: game.module( 'game.main' ) .body(function() { game.addAsset('minecraft.fnt'); game.createScene('Main', { init: function() { var text=Math.random()*1000; text=~~(text) var etext = new game.Text(text); etext.addTo(this.stage) etext.cache = true; etext._cachedSprite.tint = "#668899"; etext._cachedSprite.tintAlpha = 1; }, update: function() { }, keydown: function(key) { if (key === 'SPACE') { game.system.setScene("Main"); } } }); }); As you can see, the canvas related to the cached text remains in memory even after the scene is different. Down here there is the file minecraft_0.png which is transparent. minecraft.fnt
  2. Here you can also find the sprite we used to reprocude this basic sample.
  3. Hi @enpu This is the first snippet that is creating the problem: game.module( 'game.main' ) .body(function() { game.addAsset('sprite.png'); game.createScene('Main', { init: function() { this.sprite = new game.TilingSprite('sprite.png', game.width, game.height); this.sprite.addTo(this.stage); this.sprite2 = new game.Sprite('sprite.png'); this.sprite2.anchorCenter(); this.sprite2.x = game.width/2 this.sprite2.y = game.height/2 this.sprite2.addTo(this.stage); }, update: function() { this.sprite.tilePosition.x -= 300 * game.delta; this.sprite.tilePosition.y -= 100 * game.delta; }, keydown: function(key) { if (key === 'SPACE') { game.system.setScene("Main"); } } }); }); As you can see, with the space key you navigate from one scene to the next (in this simple example is the same) As you can see from the following screenshots, the canvas of the tilingSprite is not removed and is leaking memory Instead the removal of the normal sprite is dealt properly. We will follow with another example of a leaking canvas in the following hours.
  4. Hi @enpu, Thank you for your quick answer. We've digged up into the problem and we're working to provide you a simplified version of the code, as soon as possibile Alessio
  5. Hello, We're experimenting some issues with Safari Mobile on iOS (iPhone X, iOS 12.1). Connecting the iPhone to Mac OS and using the Web Inspector, we see these errors (screenshot in attachment). It seems that the canvas memory is leaking and, as result of that, the engine is unable to create new objects. Is there anybody that can shed some light on this? Thanks, Alessio
  6. Thanks you so much @enpu That was just what I was looking for! Alex
  7. Hi, Do you know if it's possibile to convert a Sprite or a Texture into Base-64 format in Panda? E.g. //var image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gcKEAkwofgEyAAAApJJREFUSMe1Vj1rKkEUnRk1loYVFtIFxEIWRANB7IKNCBYWsYliYam/wEDyCwIRIVjaKEEt0iSghdgsUcg2Spr41UkiuySYkMKNmU0xvH378vJ2d9R3qnXWuefunXPPHagoCvifQOb/+vLysrOzw3Hcx8cHBYNiDrIsb29vI4QQQi6XSzENswTBYBD9AoTw6OhokwTFYhEAgDQAADSbTTN7oeEhL5dLm81GgmrhcDien583cMi5XA5C+OOZX1xcGG43/gIIIUkfY/w7L4QAAAzDiKK41heUy2XygDGuVqukrPl8npBJknR7e7uWTCORCJHN6empoijpdPr4+FhRlEQiQU47k8mspSJVM+12u1KpkJzu7+9LpRIplGFP6JVIFEW17v1+PxqN7u7uBgIBjuN6vR4hHo/Hq5eo2+2q8t/a2hoOh2Sd53l1HQAwm810glh1uF9fX7Xd4Ha7PR7PYrGYTCbatpjP5yzL/iuIHoHV+sdbhNDDw4Oq0W+SpS6RIAh2ux0ZwWKxOByO0WhEp6Krq6tv5qMPAADP82a9SJZlkjvVYIEQLpdLU51cq9VWmFyfn5+NRsMUwfv7+2rTUas6PYL9/f3VCHw+n1k3VR3UPDDGP4ZChrlgjP1+v9aryeLe3p520ev1Utj1wcGBGiibzQqCMBgMYrEYwzAsyyYSicfHx7u7u1QqpXIEg0GKRru5uSFvC4WCvlmenZ2pk4POri8vLzudDnk+Pz+Px+OtVksUxaenp+vr63A4XK/XVe8rFotr3SqSyeTf/nNycmJmr5WqV8n0p7ptIpMSdDqdfr+f/AyFQgihb7pa6+o4n8/f3t7U+T6dTiVJWiwWm7w6Evh8vsPDQ6otkKqgGGPaDv8CndB2NBjOv0gAAAAASUVORK5CYII='; We need it for Facebook Instant Games Update Async. Thanks Alessio
  8. Hello, I'm facing an issue with my FB Instant Game. The game should stay in portrait mode only. I've set the "rotateScreen: false" in game.config. The game remain in portrait mode in every device I tested it, except in iPad Pro, in which it always rotate. What I can do? Thanks, Alex
  9. Hi @enpu Further analisys shows that in the broken version the response generated by the server is lacking the "Content-Encoding: gzip" header even if the payload is indeed compressed. This particular behavior seems totally randomical, facing it or not in different versions of the same identical zip uploaded multiple times ot the Facebook Dashboard. We also tried to upload our game directly from Panda 2 thanks to the uploader. We opened a bug report on the Facebook for Developer support page: https://developers.facebook.com/support/bugs/1561704383940753/?disable_redirect=0 Hoping to clarify this weird behavior soon. Cheers, Alex
  10. Hi all, I'm facing an issue with a "facebook instant games" game. The game can only be tested by me using the PC from which I uploaded the game zip. Trying to open it from another PC/device stuck the game in 0% loading progress. Anyone has experimented the same issue? Thank you so much Alex
  11. Wow! Thank you so much @enpu! :)
  12. Hello, I found the method "lineTo" into the graphics class, but it's body is empty. What's the purpose of this method? Was it created for future development? My need is to drawing a simple line between two points; what's the best way to do this? Thank you, Alex
  13. Thank you! Now is all clear
  14. Thank you very much @enpu, it works like a charm Where can I find the navigator class documentation? Cheers, Alex
  15. Hello, I'm new to Panda 2 and mobile web development in general. It's possibile to make the device vibrate in Panda 2? How can I do this? Thank you, Alex