• Content Count

  • Joined

  • Last visited

  • Days Won


@99golems last won the day on July 26 2013

@99golems had the most liked content!

About @99golems

  • Rank
    Advanced Member

Contact Methods

  • Twitter
  1. Aw shucks I was hoping someone would have some insight. I think window.onblur is supposed to work when the home button is pressed, but for some reason it's not. Think I should file a bug with chrome?
  2. I have a game that pauses and mutes music when tab or browser loses focus or changes visibility to hidden, and unpauses and unmutes the music when the tab gains focus again or visibility changes to visible. It works great on all browsers (chrome desktop, firefox, safari, ie10+..) except it doesn't work on mobile chrome when the home button is pressed. So far none of my events are firing on this browser/os. here are the events i have tested: window.addEventListener('blur', onBlur);window.addEventListener('focus', onFocus);window.addEventListener('pagehide', onBlur);window.addEventListener('pageshow', onFocus);document.addEventListener('webkitvisibilitychange', _onChange);document.addEventListener('visibilitychange', _onChange);Anyone have any ideas? Like I said it works fantastic in every single browser/OS except for Mobile Chrome on ios and android. ps: this is not mobile audio related. I'm using these events to mute/unmute audio, but the problem is that the events aren't even firing in the first place.
  3. my mac came with an apache build which i'm more than fine using for local development.
  4. if it's just for web can you use google AdSense?
  5. Thanks for playing guys. I must admit that I'm not as good at reflex games as I used to be (i'm 36 now).
  6. Here's my game inspired by the events of Flappy Bird, and my initial reactions to the developer's decision to pull the game from the app store. It's not a direct flappy clone, but it still has the frustration and it still has pipes. It was done in ImpactJS and I used cocoonJS to port it to android and iOS (iOS store approval pending). play it here for free on itch.io play it on your android device (coming soon to ios too)
  7. Destroying the industry? I think that's a bit hyperbolic. The industry will be fine with or without in-app purchases. A better question would be "Are in-app purchase models designed around milking whales ethical?". For those that don't know, the term "Whale" comes from casino culture and it means someone who comes in to the casino and spends tons of money for at least one of many reasons (including gambling addiction). The term translates to IAP design fairly well, in my opinion.
  8. There are enough tools out there that you need to know very little javascript before making games. I suggest you try one of those (Game Maker, Construct 2, etc...) first. If after making a couple games you find that you need more javascript then dive in and start learning javascript. If you're happy with the games you make then don't worry about javascript and just make fun games. It's really up to you and how you want to develop games.
  9. pretty sure you'll have to write your own collision logic for colliding a line with a sprite. The easiest (and it's not really that easy) way that I can think of is use geometry to see if a segment intersects another segment. Run this check four times, once for each "side" of the sprite. This also requires you to figure out the line equations for your line, and also for your sides of your sprite. The math gets pretty hairy but it's doable. It's not that efficient though, so i would collide with lines sparingly.
  10. i'm using Phaser.State and Phaser.StateManager to handle switching scenes. They work almost exactly how I want them to work, except I had to shoehorn in onEntry() and onExit() methods because they don't have them by default and that's how I roll game states.
  11. it depends on how how like to create your enemies I think. Phaser.Tilemap has a function createFromObjects() that it can make sprites from an object layer defined by name. There are some limitations. Currently, the tilemap loader will only load objects in your object layer that have a "gid" property from Tiled, which it will only get if it is an object with an associated tileset frame (ie the generic object polygons in tiled won't load without some hackery). Then after it makes the generic Sprites it's up to you to make the sprites do things, interact, and do physics. definitely look at the tilemap's createFromObjects() (yourmap.createFromObjects()) function and also the tilemap's object (yourmap.objects) property, which is where createFromObjects() gets its objects from. I like modularizing my Sprites ahead of time, so i had to do a little hackery of the Phaser.Tilemap.prototype to get it to load objects by their names rather than creating generic sprites, but this is my own preference and doesn't mean it's the best way to do it (whatever that means)
  12. Here's another one about timers and events. If i set an event to repeat via game.time.events.repeat(), and in the same update cycle i also set an event to fire only once via game.time.events.add() and the callback function for the game.time.events.add() contains another game.time.events.add() then it stops the repeat from repeating and only happens once. for example inside a chrome dev console you can verify via the following: doNothing = function(){};doSomething = function(){ game.time.events.add(300, function(){console.log("do something once");},this); }//THIS ONE HERE WORKS (executed on the same line in the chrome dev console):game.time.events.repeat(300,10,function(){console.log("repeating 10 times")}, this); game.time.events.add(300,doNothing, this);//THIS ONE HERE DOES NOT REPEAT MORE THAN ONCE:game.time.events.repeat(300,10,function(){console.log("repeating 10 times")}, this); game.time.events.add(300, doSomething, this); I did not play with the durations, and just kept it at 300 for arbitrariness.
  13. **this has been solved, and was a product of my not using setCollisionBetween() correctly. Thanks jcs!** here's a weird one regarding tilemap collisions. I only get collisions between sprites and a tilemap layer to work if i set the collision layer as the very last layer in Tiled. If i set my collision layer as anything but the last layer in the Tiled editior then collision in Phaser won't work. pic of what i'm talking about ("foreground" is the layer i'm doing collision with): Here's what my create() and update() bits look like, and how i'm doing collision: create: function(){ this.map = game.add.tilemap(this.mapName); this.map.addTilesetImage('grass70x70'); this.layerSky = this.map.createLayer('sky'); this.layerFar01 = this.map.createLayer('far01'); this.layerForeground = this.map.createLayer('foreground'); this.map.setCollisionBetween(0, 36);}update: function(){ game.physics.collide(this.player,this.layerForeground);}I haven't looked into it because i can fix it by messing with the order in Tiled, but it's just a little annoying having my background layers in front of my foreground layers in Tiled.
  14. Long story short, i'm making particles that all are identical size/shape, but different colors. I have a .png image with every 32x32 frame is a different color particle. If I load this as a spritesheet with game.load.spritesheet('myparticles', 'media/myparticles.png',32,32);is there a way to easily create the different color particles using the spritesheet here without going through the trouble of making a texture atlas data file? Like is there some way to turn all four of these frames into different display objects that i can feed into myEmitter.makeParticles(__needSomethingToGoHere);to make it work elegantly and easily? alternatively I'm willing to entertain different ways how you folks would do particles that share shape/size/function?