• Content Count

  • Joined

  • Last visited

Everything posted by HappinessSam

  1. It's still there, though nowhere near as bad - depending on the number of spine it's maybe half a second at most and usually just a quick stop stutter.
  2. I hope it's ok me piggybacking this thread for another, probably unrelated spine performance issue rather than starting another thread. The project I'm working on has a lot of spine animation and also can have a very large canvas. I'm finding that if I have the game running then switch to another tab and wait more than 4-5 seconds, when I switch back to the project it freezes for a few seconds with the permorance analyser showing it being s. I have every spine with autoUpdate set to false and I have found that if I cap the delta time that can be passed into update it helps, but if with that there is still a noticable stutter. To clarify, my update function looks something like this: this.lastTime = this.lastTime || Date.now(); var timeDelta = (Date.now() - this.lastTime) * 0.001; this.lastTime = Date.now(); if(timeDelta>0.1){ timeDelta = 0.01; } spine.update(timeDelta); Is this something anyone else has seen and is there anything that can be done to help?
  3. This has worked fine and touch wood is working perfectly now. I was also getting an occasional flickering issue which has cleared up after setting the spine's autoupdate to false and updating manually - maybe this apporach would fix https://github.com/pixijs/pixi.js/issues/4117 too.
  4. Thanks! That's great info. I think I will look into manually call update, as that looks safer.
  5. I'm trying to use some spine animations in a large Pixi application at work. It's mostly working but I'm getting intermittent runtime errors coming from the Spine objects. This error is:Uncaught TypeError: Cannot read property 'transform' of null at Spine.e.updateTransform (pixi.min.js:formatted:4401) at Spine.autoUpdateTransform (Spine.ts:479) at e.updateTransform (pixi.min.js:formatted:4405) at e.updateTransform (pixi.min.js:formatted:4405) at GameScene.e.updateTransform (pixi.min.js:formatted:4405) at e.render (pixi.min.js:formatted:8605) at Function.ScenesManager.loop (ScenesManager.ts:273) at t.emit (pixi.min.js:formatted:13126) at t.update (pixi.min.js:formatted:13068) at _tick (pixi.min.js:formatted:12988) The error is coming from PIXI.Container, line 323 because this.parent is null. This is a bit bonkers because this is only being called because the spine object is in the children list of the scene being rendered. this.transform.updateTransform(this.parent.transform); I dug in a tried to isolate the problem and found that somewhere in the Spine update function the parent was being set to null. In Chrome debugger I put in some conditional breakpoints for dt>0 && this.parent==null and found that the culprit was line 184 this.state.apply(this.skeleton); Before this line the breakpoint doesn't trigger, after it it does, with this.parent being null. I had a read through AnimationState.apply and I can't for the life of me see anything that would be setting the Spine parent state. So my question is can anybody else see anything in there that might be creating this effect? I should say that the application does a bunch of complicated pooling of symbols, so the Spine object might be getting removed and sent back to the pool then re-added frequently. But my understanding was that since JS is mostly single threaded if this.parent exists on line183 but not 185 something between there must be setting it to null. I'm not extending or doing anything else to the Spine object. Unfortunately I can't give out any coded to show the context. I'd be really grateful if anybody has any suggestions or input.
  6. Quick update that there is now a playable web version on Armor games http://armorgames.com/dungeon-slog-game/18110
  7. Really nice game and I'm impressed that you managed to make it in 1.5 months. All my 5s are yours. I agree that the tutorial is a bit rough around the edges but it's simple enough to work it out that I think you can get away with it.
  8. I love the visuals. I have to confess that I only payed one game but I like the core gameplay. Are there waves or do you just play until you die? If there are waves and I just didn't reach the end of one then I'd say it could use some indication of how much you have to go. If you don't have waves I would think about putting them in. By waves, I mean that there are a certain amount of enemies you have to kill or survive, then you get some kind of reward and a breather, then it starts again at a higher difficulty. I think it's something it would really benefit from.
  9. I've just release my new game one the play store! The game is Dungeon Slog. It's an action/arcade rpg with roguelike elements. In it you need to fight your way through a randomly generated dungeon of monsters, levelling up, buying items and choosing which member of your party is best suited to the current challenge. It was programmed in vanilla javascript using Phaser as the game engine. I used l10n for the localisation (even though I have yet to actually localise it into another language) and Apache Cordova to package it as an app. I used the Oryx tileset with additional icons bought from Gamedev market. The music is by Eric Taylors, sound effects by Kenney Feedback, questions, bugs or suggestions more than welcome. Gameplay trailer: Screenshots:
  10. I have a Phaser game that I'm packaging with Cordova. I've been using this admob plugin for insterstials but I decided I wanted to add some reward videos since I've heard they#re really good. In theory that plugin should be able to serve them but I can't get them to work. I thought the problem might be with my mediation so I tried a couple of other plugins that serve the videos directly (admob doesn't serve reward videos itself), like this vungle one and this UntyAds one. I can't get any of them to work, even if I build them in a clean, empty project. I suspect that I have something wrong with my ads setup but I just wanted to ask if there is anyone here who has managed to get them to work and if there are any gotchas I need to look out for.
  11. It looks beautiful. I found that on desktop the controls are a bit wonky for me - they just don't feel responsive enough for my taste. You accelerate slowly then suddenly shoot off. In terms of performance it was mostly OK but I noticed some slowdown when the lightning flashed. On mobile I think I actually preferred the gameplay. I think it's because I'm more used to and tolerant of controls being difficult in mobile games. I noticed it was missing the bottom part of the screen - try adding this.scale.windowConstraints.bottom = 'visual'; before you set the scaleMode when it's mobile and see if it fixes it.
  12. Try changing it to bmd.setPixel(location.x, location.y, 255, 0, 0, false); in the main loop then at the end call the correct value for the last pixel. The false is the flag for whether to update the image context immediately and it defaults to true. This mean it's calling this.context.putImageData thousands of times, hence very slow. If you only call it at the end it should be much faster. I checked the Bitmapdata source and I couldn't see a proper function to call this.context.putImageData, hence calling setPixel with immediate true so it updates the image. There is probably a better, correct way to do this, but it's a bit late and I need to head to bed.
  13. Just to check, when you were trying to use bitmapData did you try just using setPixel? That would seem the most straightforward method if each square is represented by a single pixel. How big would the image need to be, because even a massive image, say 2048x2048 setting every pixel individually with rect shouldn't be taking 20 minutes.
  14. I've been trying to get my Phaser game to work on my old Galaxy tab 2 but it's been throwing errors from the pixi renderer in Phaser. At first I thought it might be that the phaser version of pixi is outdated (I found this issue on the pixi github) but I'm getting the same errors when testing bunnymarks on the pixi site. Does anyone else have any experience of this and/or advice on workarounds? It works if I force it to canvas rendering but this really impacts the performance - I don't want to have to cripple it for everyone because of an issue on a few tablets. The error says 'WebGL: INVALID_VALUE: disableVertexAttribArray: index out of range' and '[.CommandBufferContext]RENDER WARNING: there is no texture bound to the unit 0'. My tablet is on android 4.2.2 with chrome 50.0.2661.89
  15. To make a Phaser.Graphics clickable, set inputEnabled to true then ass a listener + context to it's events.onInputUp handler. If you want the cursor hand set it's input.useHandCursor to true. There is no hitArea as far as I know, it just uses the dimensions of the image. That post may have been thinking about the body hit area that is used for physics - this you can change. So something like this should create a red square which is clickable and show the hand when you roll over it. (not actually tested in a game but I think it should work) var graphics = game.add.graphics(0, 0); graphics.beginFill(0xFF0000); graphics.drawRect(0, 0, 100, 100); graphics.inputEnabled = true; graphics.input.useHandCursor = true; graphics.events.onInputUp.add(onClick, this); function onClick(target, pointer){ console.log("hooray"); }
  16. I have been building a game, using the Phaser full screen mobile template as my starting block. My intention was to create a game that could have a web version but that could also be packaged as an app by using Cordova. So far it's been going well and I'm reasonably close to an alpha release and it works fine on desktop but I've been having trouble getting the scaling right on mobile. I've package the game in Cordova as a full screen app but the game seems to initally be getting fed incorrect information about the dimension of the screen, leading to the bottom the height being too large cutting off the bottom. I have tried forcing the player to enter full screen and this works (I should stress that the app is already a full screen app, I am just using game.scale.startFullScreen to make it use the fullscreen API), but if the user clicks hits the hardware back button they exits fullscreen and the game is again cut off. Yes, I have prevented the default backbutton action but it still seems to exit fullscreen. At the moment my workaround is to have the game catch the fullscreen exit and pause the game to the user can click to reenter full screen but I don't think this is a good experience and I feel I must be missing something or doing something wrong. Is there a way to change the settings so that the sizes are consistent and correct and it shows the whole phaser game canvas all the time, whether in fullscreen or not? To show what I mean I have created this project: http://utterlysuperb.com/dev/js/fsm/. All it is is the full screen mobile template with a background image that takes up the whole game and a button to toggle between fullscreen and a console.log of the width+height when resize is triggered. On desktop it's fine, but if I view it on mobile, whether through inspecting chrome or using the mobile dev tools to spoof a mobile it cuts off the bottom and requires scrolling when not in fullscreen. This is also the case if it is wrapped up in Cordova.
  17. I've been trying to use this tool to create some audiosprite files but I'm having some issues. I think I have everything installed correctly and the bat file I created, based on the one above works: audiosprite --output sfx --export mp3,ogg,m4a,wav --format createjs --bitrate 64 --samplerate 44100 --channels 1 creature1.ogg creature2.ogg creature3.ogg I have quite a lot of sounds that I want to use and it's getting a bit unwieldy so I've been trying to use the javascript method based on the API usage example on the github, so var audiosprite = require('audiosprite') var files = ['creature1.ogg', 'creature2.ogg', 'creature3.ogg'] var opts = {output: 'result', export:'mp3,ogg,m4a,wav'} audiosprite(files, opts, function(err, obj) { if (err) return console.error(err) console.log(JSON.stringify(obj, null, 2)) }) but I'm getting errors: error: Error: Error adding file at C:\Users\Sam\AppData\Roaming\npm\node_modules\audiosprite\audiosprite.js:267:25 The source files, js file with the above code and the bat file are all in the same folder. I have also tried specifying the full path in the files array, but no dice. I could just keep using the bat file but I'd really prefer to work out what I am doing wrong. I feel a bit silly asking a question in a year old thread but this seems to be one of the few places discussing how to use it.
  18. It turns out it's just that I'm an idiot (or just too sleep deprived and rushed to do good work) and I had a typo in the mobile side of the init function. It's working now, though I still need to fiddle to get the scaling right. Sorry and thanks for trying to help.
  19. Thanks, but I need me Game to be 600x400. It's the display that needs to scale. I haven't had time to look under the hood to see how Phaser deals with scaling the game display.
  20. I've been trying to build a simple test game built on the full screen mobile template. I've got it to the point where it's buggy and incomplete but playable and I've only just uploaded it and tested it on my phone. It works fine on desktop but on my phone (a onePlus 2) using chrome it doesn't display. If I select request desktop site it does show up, but then of course it has the desktop setting and so it doesn't scale properly. Is this something anyone has come across? My game is here.
  21. HappinessSam


    Looks and plays beautifully in chrome on my LG p880. My only gameplay quibble is that it was a bit frustrating to have to get 8 and only have a 4 and a 1, then the next block are two -1s, then I have to wait another turn to get the blocks to get 8.
  22. I have another game finished, Alley Kittens It's a reverse mine sweeper game featuring kittens built with PIXI They should hopefully work on the usual range of mobile devices so I would be much obliged if people could give them a play and tell me how they run and what they think. Ta
  23. Awesome game. Looks beautiful and plays flawlessly on my LG 880. Really, really impressive!
  24. Yes, completely back to normal. I did talk about the issue on another forum and I wasn't the only person to see it - someone else also had firefox disable direct2d when they updated to version 22, though they only noticed when I asked them to look. Also running on a laptop, but his was an integrated graphics chip.