-
Posts
606 -
Joined
-
Last visited
-
Days Won
2
Heppell08 last won the day on September 5 2014
Heppell08 had the most liked content!
Contact Methods
-
Twitter
@Heppell08
Recent Profile Visitors
3,095 profile views
Heppell08's Achievements
-
kawasa_ki29 reacted to a post in a topic: Phaser Offline. How to do it?
-
Fenopiù reacted to a post in a topic: What Spritesheet toolkit does everyone use?
-
Tilde reacted to a post in a topic: Remove a tilemap and replace it with a new one.
-
Tilde reacted to a post in a topic: Remove a tilemap and replace it with a new one.
-
ecv reacted to a post in a topic: Netbeans autocomplete
-
drhayes reacted to a post in a topic: Back after 2 year break. What's new?
-
So i used to frequent these boards a while back but had to take a break from writing games and coding because of family life and children etc. I've decided to now come back to the coding scene and was just wondering what's new here? Spent alot of hours browsing these boards in the past and loved seeing this community flourish and help one another. Thanks for taking your time to read this and I look forward to speaking again sometime very soon! Also thanks Photon Storm you are one dedicated dude to this framework and i think alot of people would be very stuck or even lost without the work you put into this site and code! Thanks
-
Heppell08 reacted to a post in a topic: Catch coin and increment variable
-
moedaspegas+=1;
-
RT @gustojunk: There is bad design, and then there’s shared touchscreen inside a public bathroom design. https://t.co/BqnhxtROHr
-
hoskope reacted to a post in a topic: Tilemap sprite collision with layer
-
jdnichollsc reacted to a post in a topic: What Spritesheet toolkit does everyone use?
-
kriket reacted to a post in a topic: Touch Screen Controls
-
frenetikm reacted to a post in a topic: onFloor() help?
-
This is something that requires you to destroy all the game elements and upon restarting that state again you create the game again. There are a few ways to achieve this with proper destruction and creation. Some elements may not need destroyed at all depending on what your game is and does etc but you do need to destroy then recreate on loading the state again.
-
I would have used a for iteration loop with that group and moved them like that with some parameters in place for distance/alive etc. Even a forEach may have done the trick here too.
-
You wouldn't need to ask the user if they are desktop or mobile to show the onscreen touch keys you would be adding because phaser has device code in there. If you're using states like boot and menu etc then you can decide if touchscreen is on or not via the boot with a simple if(). if(this.game.device.desktop === true) { return; } else { // load touch buttons here } I'm on mobile at the minute so that is psuedo code but look up device code in phaser. It is like the code above that can sit in the boot and either load or not load them buttons for you. The main change would really be to add a button on your menu rather than a key input because then the user is non the wiser to being a desktop or mobile user. Also look at using gamecontroller js as thats got so very nice stuff for platformers and stuff. I used that too with some custom swipe controls and the onscreen game controller buttons. Check phaser examples for the run down on it.
-
This.scoreboard has a type error for width too.
-
Have you got a for iteration loop doing the checks and lifespan on the group of sprites to be killed at the alotted period you set? Have you any code examples or snippets on what you are doing? I don't personally use lifespan but to achieve the same result you require would be simple in the terms of creating a custom sprite timer but that is just overlooking what lifespan does for you in phaser.
-
Heppell08 reacted to a post in a topic: New Phaser Yeoman Generator
-
Yeah I use codevinsky's yeoman generator. Has watchify, server, minify and all the other cool stuff required. Don't see the use for more generators when Codevinsky's already does the job required. Suppose each to their own though.
-
Heppell08 reacted to a post in a topic: New Phaser Yeoman Generator
-
Heppell08 reacted to a post in a topic: Slice Engine.
-
Heppell08 reacted to a post in a topic: Myths and realities of canvas / JavaScript performance
-
Destroy the layer the recreate the map as normal.
-
Heppell08 reacted to a post in a topic: Xbox thumbstick using touch in phaser js
-
i personally used this for my game to have the onscreen touch joypad. You can choose different looks and styles etc with it and its pretty responsive too. My code for it is: if (this.game.device.desktop) { return; } else GameController.init({ left: { type: 'joystick', joystick: { touchMove: function (details) { if (details.dx < -5) { left = true; } else if (details.dx > 5) { right = true; } else { left = false; right = false; } }, touchEnd: function () { left = false; right = false; }, } }, right: { position: { right: '5%' }, type: 'buttons', buttons: [{ label: 'jump', fontSize: 13, touchStart: function () { function jumpTouch() { console.log('Jump Pressed'); if (player.body.onFloor()) { player.body.gravity.y = 120; player.body.velocity.y = -120; } if (player.body.gravity.y < 0 && player.body.blocked.up === true) { player.body.gravity.y = -120; player.body.velocity.y = 120; } } jumpTouch(); }, }, false, false, false ] } }); },and the link to the gamecontroller js file is here: https://github.com/austinhallock/html5-virtual-game-controller
-
Maybe set them to out of bounds kill so when they go off screen they are killed that way?
-
Hmm, well if even making it global doesn't help them maybe trying to user a getAt() in a loop and cycling them. I would have thought a forEach would do the job or a getFirstDead() cycling the group would do the work for you.
-
Place coin as global and not anon in your create function.
-
function coinKill(coin) { if(coin.x < 0) {coin.destroy();} } Its how I kill coins but its similar to collide coding the coins. You shouldn't need to reference the actual group itself because you can reference the children (coin) instead.