RetardVeverca

Members
  • Content Count

    23
  • Joined

  • Last visited

About RetardVeverca

  • Rank
    Member

Recent Profile Visitors

677 profile views
  1. Oh my .... what a stupid mistake ... I had the old index.html so I had referenced wrong script: src/engine/config.js instead of src/game/config.js where my true config lies Thanks for the help though!
  2. Originally I had the syntax from code snippet you linked, but then I changed to FlyingDog demo syntax, which is: pandaConfig = { sourceFolder: 'src', outputFile: 'game.min.js', sitelock: '', analyticsId: 'UA-42024756-5', storageId: 'net.pandajs.flyingdog'};I just changed back to your suggestion to verify it again and I still get same error (in browser and on CocoonJS launcher) ...
  3. Ful stack trace of error: Uncaught TypeError: Object function Class() { if(!initializing) { if(this.staticInit) { /** If Class has `staticInit` function, it is called before `init` function. @proper...<omitted>...t' main.js:54game.Scene.extend.init main.js:54Class core.js:675game.System.game.Class.extend.setSceneNow system.js:179game.System.game.Class.extend.setScene system.js:174game.Loader.game.Class.extend.setScene loader.js:212game.Loader.game.Class.extend.ready loader.js:192game.Loader.game.Class.extend.update loader.js:226game.Loader.game.Class.extend.run loader.js:217(anonymous function) core.js:570animate
  4. Hi! I can not get local storage to work. I set up config, where I declared Id: pandaConfig = { sourceFolder: 'src', mediaFolder: 'media', sitelock: '', outputFile: 'game.min.js', storageId: 'com.netprojekt.chicktest'};And then I try to use it in scene Init function like so: this.score = game.Storage.get('highscore') || 0;And I get an error: Uncaught TypeError: Object function Class() { if(!initializing) { if(this.staticInit) { /** If Class has `staticInit` function, it is called before `init` function. @proper...<omitted>...t' I changed from game.storage.get (http://www.pandajs.net/snippets/9705601.html) to game.Storage.get otherwise I get: Uncaught TypeError: Cannot call method 'get' of null
  5. Thank you, your fix works I think if there is no difference regarding mobile use (like with DOM, which waits for doubleclick and touch is not the same as click in some engines), I think it should autobind. If there are differences, then not Also I just figured it out, it works (without updating your fix from master branch) if I set my sprite with shorthand version like so: this.ozadje = new game.Sprite('start', 0,0, { anchor: {x:0, y:0}, interactive: true, mousedown: function() { game.system.setScene(SceneMenu); } }); this.stage.addChild(this.ozadje); Why is that?
  6. And if I remove the mousedown event from sprite in first scene and instead make whole scene interactive: SceneStart = game.Scene.extend({ backgroundColor: 0x000000, init: function() { this.ozadje = new game.Sprite('start'); this.ozadje.anchor.set(0, 0); this.ozadje.position.set(0,0); this.ozadje.interactive = true; this.stage.addChild(this.ozadje); }, mousedown: function() { game.system.setScene(SceneMenu); }});everything works. So there is really a problem in my mousedown event only for sprite!
  7. Hi! I have developed many demos with Panda.js, but today I tried one of them and mousedown event (on sprite) suddenly stopped working. It works in browser but not in CocoonJS launcher or cocoonJS packaged APK. I did not changed CocoonJS launcher, I also built the APK with same (1.4.7) version nor did I changed Panda.js. There are no errors shown in Chrome debug window nor in CocoonJS debug mode. Because I couldnt find any errors and I stripped the code entirely I updated Panda.js to new version and now I get an error in CocoonJS launcher debug mode: Javascript Exception (Tag: 'touchend'): TypeError: Cannot read property '70' of undefined at PIXI.InteractionManager.onTouchEnd(src/engine/renderer.js:3757:33) at HTMLCanvasElement. <anonymous> (src/engine/core.js:572:18) My source code: game.module( 'game.main' ) .require( 'engine.core') .body(function() { game.addAsset('media/backi.png', 'start'); game.addAsset('media/countdown.png', 'menu'); SceneStart = game.Scene.extend({ backgroundColor: 0x000000, init: function() { this.ozadje = new game.Sprite('start'); this.ozadje.anchor.set(0, 0); this.ozadje.position.set(0,0); this.ozadje.interactive = true; this.ozadje.mousedown = function(){ game.system.setScene(SceneMenu); }; this.stage.addChild(this.ozadje); }});SceneMenu = game.Scene.extend({ backgroundColor: 0x000000, init: function() { this.ozadje2 = new game.Sprite('menu'); this.ozadje2.position.set(0,0); this.ozadje2.anchor.set(0, 0); this.stage.addChild(this.ozadje2); } }); game.System.idtkScale = 'ScaleAspectFill'; game.start(SceneStart, 480, 800); }); And you can download .zip for uploading to CocoonJS here: http://89.212.238.92/Journey/chick_debug.zip
  8. Nice update I like the new look of website ... more clean and transparent
  9. Wow, fast answer, thank you so much! Panda.JS is great, it really allows rapid development and it works so fast even on older androids
  10. Hi! I have a problem of centering BitmapText after it has been updated with setText method and it's dimension changed. Does someone know how to do it? I have my text defined as:this.score = new game.BitmapText('0', {font: 'soupjustice64w'});this.score.position.x = game.system.width/2;this.score.position.y = game.system.height/2;game.scene.stage.addChild(this.score);And then I update it and want to set new position: this.score.setText('300');this.score.position.x = (game.system.width/2)-(this.score.textWidth/2);this.score.position.y = game.system.height/2;But this doesnt work :/
  11. Thanks enpu So if I set canvas and position elements like you suggested, is it best to set few different sprite dimensions for every object and select them with respect to game.device.pixelRatio or use max. dimension sprite and scale it down with resepect to game.device.pixelRatio?
  12. Yes, only when used with ScaleAspectFit. ScaleAspectFill of course fills the screen with respect to scale and ScaleToFill stretches to fill the screen. So the problem exist with ScaleAspectFit where areas outside letterbox should be 'dead' (I would assume with background color set in scene) but are instead showing parts of canvas itself. I tested it on two devices: Sony Xperia Arc running 4.0.4 and Sony Xperia J running 4.1.2 I will test on some other devices tomorow ...
  13. Ok, so this is done automatically by CocoonJS, thats great So basically I set it up with lets say 768 x 1024 for portrait mode and set game.System.idtkScale = 'ScaleAspectFill'; like the way it is done in flying dog demo, but this still leads to some part of the game not being visible on certain screens? If I set to 'ScaleAspectFit' some parts are out of canvas (letterboxing) and 'ScaleToFill' stretches content of course. And if the fixed higher resolution is actually the solution, what is the most appropriate resolution for portrait and landscape mode respectively? And thanks for answer