
@99golems
Members-
Posts
158 -
Joined
-
Last visited
-
Days Won
1
Everything posted by @99golems
-
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.
-
my mac came with an apache build which i'm more than fine using for local development.
-
if it's just for web can you use google AdSense?
-
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).
-
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)
-
Do you agree? How In-app Purchases Has Destroyed The Industry
@99golems replied to MichaelD's topic in General Talk
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.- 23 replies
-
- in-app
- general talk
-
(and 2 more)
Tagged with:
-
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.
-
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.
-
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.
-
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)
-
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.
-
**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.
-
wow this was ridiculously easy. Thanks XekeDeath!
-
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?
-
I used impactjs for the past year or so, but lately i'm moving to phaser due to better out-of-the-box touch/drag support. I really like impact but i also really like phaser so far. then i use sublimetext2 for editing. then i use git and bitbucket for version control and offsite backup. for graphics touchups (i contract art out to people with a better eye for it than me) i have a subscription to adobe creative cloud.
-
My Income Report for January - Over $45,743 this month alone
@99golems replied to stevefromio's topic in General Talk
I don't understand the point of this. -
What music do you listen to while in the 'programming zone'?
@99golems replied to tackle's topic in General Talk
Industrial, synthpop, IDM, EBM, whatever. -
the crazy background is my favorite part. nicely done!
-
Your stuff is mad good Andrew.
-
sprite.body.x and sprite.body.y can be changed if you want. This probably isn't the best idea, as you can have your sprite's body teleport inside other collision bodies, and this isn't cool. A somewhat better way to do it (and what I usually do) is to center your sprite's image in the exact middle of the frame, so that way when you flip back and forth the body doesn't need to move at all. Cheers!
-
sublimetext2 and vim
-
i'm going to guess it's because game.input.keyboard.isDown checks to see if the key is pressed and returns true each frame if the key is pressed down. The result is each time you "press" the up key it actually fires a bunch of times in the time it takes for your finger to press it and release. If you want the event to fire only once when a key is pressed, I suggest you do the following code: this.jumpCount = 0;this.jumpkey = game.input.keyboard.addKey(Phaser.Keyboard.UP);this.jumpkey.onDown.add(jumpCheck, this); //tells phaser to fire jumpCheck() ONCE per onDown event.jumpCheck = function(){ if (player.jumpCount < 2){ player.jump(); player.jumpCount ++; }}
-
This is a reskin of an old game I made last year. I initially tried to do the game with my own art, but that turned out to be a stupid idea. It's a very simple block-matching game that keeps on going and going. The lesson here is to know when to pay an artist.
-
I believe the tileset/tilemap loading from Tiled json is still being worked on in the dev branch and isn't complete yet.
- 1 reply
-
- typescript
- tiledmaps
-
(and 2 more)
Tagged with: