PicoFoundry

Members
  • Content count

    13
  • Joined

  • Last visited

About PicoFoundry

  • Rank
    Member

Contact Methods

  • Website URL
    http://twitter.com/picofoundry
  • Twitter
    PicoFoundry

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

709 profile views
  1. PicoFoundry

    Defining a clickable area

    Thanks for that information and confirmation, I will try to work on it this weekend, hopefully it will work out alright and I can get a good start on this little project.
  2. PicoFoundry

    Defining a clickable area

    I am making a little game that is similar in style to the Covert Front point and click adventure games (http://www.mateuszskutnik.com/covert_front/index.php?id=cf_1). Navigation is pretty easy, you click on doors, and sometimes parts of the bottom of the screen to move between them. Here are some screenshots from the Covert Front game to illustrate the type of thing I want to do: In the first one you can click to go back when the cursor is near the bottom of the screen, and in the second one, you can change rooms by clicking near the bottom, or either door. I made a simple prototype where I navigated using arrow sprites, as seen below, which worked well and were easy to use. However, I would prefer not to have buttons like this. I was wondering what the best option would be to define clickable areas for movement. Should I create transparent sprites to define the doors and use the OnInputDown event as I did in the prototype, or would it be better to use a Rectangle, and check each onDown event to see if it is contained in the rectangle? I am wondering if there is a preferred method for doing something like this, or whether there are methods I have not thought about.
  3. PicoFoundry

    [Phaser] Frog Needs Flies

    Hmm, weird, still works for me, and no one else I have asked to check it reported a problem. Maybe Gamejolt is having a bit of a hiccup?
  4. PicoFoundry

    Point and click adventure games

    I grew up playing point-and-click adventure games and really love the genre. I was curious if anyone knows of any examples, even small ones, made using Phaser, or others using JavaScript. I have been able to find very little on this, which surprised me quite a bit. There are a few engines available such as JSGAM, but I kind of want to use this as a learning experience about creating more complicated games myself, how to structure them, rather than making an awesome game.
  5. PicoFoundry

    [Phaser] Frog Needs Flies

    I am not really sure if this game is appropriate for this section as it is such a simple and rough game. I created over a few days in order to learn a bit about Phaser and try it out. This is a single screen jumping/platform type game, heavily influenced by the Atari 2600 game Frogs and Flies. Pretty simple, you jump, you catch flies, and you try not to fall out of the trees. Frog Needs Flies
  6. PicoFoundry

    Game list of phaser games

    I just created my first project using Phaser, Frog Needs Flies. It is nothing special at all, just a very simple action/platform game heavily inspired by Frogs and Flies for the Atari 2600. You play as a tree frog that needs to eat flies to stay alive, and has to jump around to eat them, without falling to its doom. Play Frog Needs Flies
  7. I was wondering if it was possible to check whether a sound has already been added to the SoundManager, so it is not added a second time. I did not see anything in the documentation that indicated whether this could be done. I have a number of menus as separate states, and want music to continuously play over all of them. Currently, I start the music in the main menu, but when I return from a submenu it starts another instance of the sound.
  8. I may be missing something very simple, but I am quite new to using Phaser. I am creating a game where I have two platforms on the screen. I created a single sprite for the left platform, and tried flipping it to create the right platform, however, after doing this I found the player no longer collided with it. I rendered the body, and after moving the platform from the far right, found the body no longer matched with the sprite position. This can be seen in this image: In my code I set this sprite up, like this: this.rightBranch = this.add.sprite(this.game.width - 256, this.game.height, 'branch');this.rightBranch.scale.setTo(-1, 1);this.rightBranch.anchor.setTo(0, 1);this.game.physics.arcade.enable(this.rightBranch);this.rightBranch.body.immovable = true;I could create a second sprite, flipped, and just use that, but I am curious whether I can scale the sprite and make sure the body is scaled with it.
  9. PicoFoundry

    Scaling behaviour when injecting game into div

    Thanks, that did work, and I don't feel too bad about it. I was comparing 2.0.7 and 2.3.0 and I see this is a change in Phaser since that time, which might explain the difference in behaviour.
  10. PicoFoundry

    Scaling behaviour when injecting game into div

    I might have to try that, but I would rather not make a hacky change if possible. I was looking at this tutorial: http://gamedevelopment.tutsplus.com/tutorials/getting-started-with-phaser-building-monster-wants-candy--cms-21723 which uses Phaser 2.0.7 and I thought I did pretty much the same thing, except if you look at the working version of it, it is responsive, and there are no scrollbars http://candy-demo.enclavegames.com/ I don't see what I am doing differently.
  11. PicoFoundry

    Scaling behaviour when injecting game into div

    Thank for the reply. I had seen the templates, but won't that one simply fill the entire screen and change the aspect ratio?
  12. I was having some scaling problems with my game, until just a few minutes ago, and I am wondering if someone might be able to help me understand why I saw this behaviour. I wanted the game to scale, keeping the same aspect ratio, such that it always fit within the borders of the browser window. Initially I had created a div in my HTML file called 'gameContainer' which is where I injected my game when creating my game object. So in index.html I had this line in the body to define the container div: <div id="gameContainer"></div>I created the game on Window.onload window.onload = function() { var game = new Phaser.Game(960, 640, Phaser.AUTO, 'gameContainer'); game.state.add('Boot', JumpFrog.Boot); game.state.add('Preloader', JumpFrog.Preloader); game.state.add('MainMenu', JumpFrog.MainMenu); game.state.add('Game', JumpFrog.Game); game.state.start('Boot');};and the scaling was set in Boot.js this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;this.scale.pageAlignHorizontally = true;this.scale.pageAlignVertically = true;However, when I tested the game, I saw this kind of behaviour, where the game is now scaled to fit the screen, and requires a scroll bar: After looking at a few tutorials I decided, on a whim, to remove the gameContainer div in the html file, and just tell it to create the container, and this worked much better. There is still a scrollbar but I can see the entire game, and in addition, when I change the size of the browser, both vertically or horizontally, the game changed size to be within the borders. I am wondering why this is happening. Also, is there any way to ensure that no scrollbars show up? It is much better now, but I would prefer it fit within the browser window and not do this.
  13. PicoFoundry

    Friction when using Arcade physics

    I am new to Phaser, so definitely a ton I do not know. I was experimenting with it by working on a little game where a player jumps from one platform to another, based on where the user clicks. I did this by setting the velocity of the player's body. However, once it lands on the other platform it just keeps sliding. I looked into the documentation and found a Friction property in Arcade.Body but I am not sure how to use it. I looks like it should be applied to the platform the player lands on, but it seems to require a point, and I have not been able to find an example using it. I did implement a custom friction method using the collisionCallback used by the collide method, that reduces the x velocity incrementally to 0 and results in this behaviour: http://gfycat.com/ZigzagBrownHoopoe Which seems to work fine, but if there is a built in way to set it, I would prefer to use that.