z4srh

Members
  • Content Count

    8
  • Joined

  • Last visited

About z4srh

  • Rank
    Newbie

Profile Information

  • Gender
    Male
  1. z4srh

    Game list of phaser games

    A bunch of the game links are prefixed with "http://pgl.ilinov.eu/" making the them not work.
  2. z4srh

    Weekly Phaser Coding Tips email

    Another great tutorial. The power of the framework is really showing. Did you know that in Mario, the clouds and the bushes are the same sprite? A request: add mobile controls to these, so that we can check them out on a tablet or phone.
  3. z4srh

    Open sourced 2D infinite runner

    Really cool, thanks for sharing this. A few bits of feedback (playing with a mouse): the robot doesn't seem to center on the mouse, which is a bit annoying. And the robot doesn't seem to pick up powerups when it moves through them (ie. you're on one side, and you go to the other, and pass through a powerup). Overall great though - simple, smooth and I like the screen shake effect.
  4. z4srh

    Press down to fall through platforms

    So I thought about that and doing other similar things, however it's not quite what I want - because if there's an enemy or other entity on the platform, I don't want them to fall through as well. That gave me an idea though - I'll make two groups of platforms - one which I can fall through, and one which I cannot - and only check collisions against first group if the player isn't pressing down. Thanks!
  5. The latest Phaser tips email (http://www.photonstorm.com/phaser/phaser-coding-tips-3) made me start to think about platformer mechanics. I figured out that you can make the character jump through the bottom of some platforms by setting sprite.body.checkCollision.{up,down,left,right} appropriately. I've forked the example with this change here: http://jsbin.com/yahukuqufi/1/edit?js,output My question is, how can I make it so that when the player presses down, it falls through some platform if the platform allows it. For example, when pressing down, suppose you're allowed to fall through ice platforms, but not grass platforms. I don't know that checkCollision is the right approach here, but it's unclear to me what to do. I suspect there's something I can do with the callbacks physics.arcade.collide.
  6. z4srh

    Weekly Phaser Coding Tips email

    I really am enjoying these - very useful. The edgeTime trick in #3 is really nice - had thought about it, but never implemented it before. A couple things that would be nice to know about platforms: How do you make 1 way platforms (ie. jump through the bottom)? For this I know you can set which sides to check collision from. And how can you fall through special kinds of platforms, for example by pressing down when standing on one?
  7. I made this over the past couple of days to learn how to use Phaser. Since most of the Phaser tutorials are "How to make a Flappy Bird clone", that's what I did. Tap your screen or click the mouse to make the plane jump. GAME: https://googledrive.com/host/0B1IUw9_zL0qwMmliaVJzNXJ6bU0/index.html Expect a black screen when starting - couldn't figure out the loading bar. Source code is here: https://drive.google.com/folderview?id=0B1IUw9_zL0qwZ20xZk1oaGdodDg (Main game is in assets/js/states/game.coffee) Would love critical feedback, especially on the source and my use of Phaser - wasn't trying to make the game original, just trying to make something complete to get a feel for the framework. In particular: - I wasn't sure about the proper way to spawn enemies off screen and then having them disappear when they went off screen. So my solution was to use events.onEnterBounds to set the this.outOfBoundsKill on sprites. - I wasn't sure the proper way to use groups with multiple similar element types so in hindsight, my use of groups was probably also suboptimal - I had one group shared by each of the stars types, and another shared by each of the spike types (so two groups total). - The way I render scores means that I create new sprites each time, kinda hacky. - The depth that entities are placed at leads to some awkward clipping sometimes. - Didn't realize that there was game.rng available, instead of using Math.random() until later. But hey, first effort! Overall, really enjoying Phaser. Next game will be more original hopefully If you want to clear your highscore open up a Javascript console and say "localStorage.setItem('highscore', 0)" Credits: Used Kenny.nl from OpenGameArt's awesome art/concept: http://opengameart.org/content/tappy-plane You should check out his other stuff, I'm really excited about the isometric tiles he's doing. Got hooked on Phaser with this tutorial: http://blog.lessmilk.com/how-to-make-flappy-bird-in-html5-1/ but looked at many others. Used this skeleton for Phaser with Coffeescript: https://github.com/kevinthompson/phaser-template
  8. I'm pretty new to Phaser, but what I've done is add multiple groups in a dictionary, and then choose a random one. Something like: var enemies = { 'A' : game.add.group(), 'B' : game.add.group(), 'C': ... }// Add enemies to the groupsfunction getRandomEnemyGroup() { var keys = Object.keys(enemies); var index = game.rng.integerInRange(0, keys.length - 1); return enemies[keys[index]];}function spawnRandomEnemy() { var group = getRandomEnemyGroup(); var enemy = group.getFirstDead(); // ... etc.}