Search the Community

Showing results for tags 'plugin'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 73 results

  1. I've been working on this in free time on the side. Figured I would share so anyone else working on something similar might benefit from it. It at least works to do some stuff, but it doesn't do mesh or switch skins yet.
  2. plugin

    Hello everyone! I thought I'd share something I've been working on for the past few weeks. A plugin for Phaser that provides collision handling for sloped tiles and half tiles, similar to Ninja Physics but somewhat more concisely. Check it out on GitHub, give it a whirl, let me know what you think! Github: Demo: It's still early days for this project, as I've only just released v0.1.0-alpha today, but I look forward to continuing fleshing it out. Why did I make this? I've been intending to make a 2D platformer with Phaser for ages, and I knew I wanted it to have sloped tiles to allow for a liberating way to traverse the Y axis, but I couldn't find anything that worked the way I want it to. I experimented with Ninja Physics, but it's deprecated and its limitations left me wanting. I tried P2, but it was too much in terms of physics for me, and I didn't want to tame a beast like that. I started searching these forums to see if anyone had managed to get sloped tiles working in Phaser, with some success, but not completely. The solutions wouldn't allow for completely free tile placement, and they just stuck physics bodies to the slopes and left it at that. So, with a somewhat limited understanding of the maths I'd need to learn to achieve what I wanted, I started reading tutorials about the Separating Axis Theorem (SAT), particularly the ones from Metanet and one I found magically through a Google search. After experimenting with SAT.js in Phaser, I decided that I could totally pull off my own plugin to solve this the way I wanted it to be. With lots of learning, but with a clear vision of how I wanted the plugin to work, this is what I've managed! I have lots more features planned, as you can see in the roadmap, but for now I'm just glad I've built something that can be plugged straight into any Arcade Physics project that just works. Screenshots
  3. plugin

    Hi all, I've been thinking of doing an old-school RPG for a while (haven't we all?), and decided to start with a plugin for grid-based "physics" for me to use. I reached a point where I got most of what I will need, and thought I could share a small demo. If there is interest I might improve the plugin and remove parts that are tied to my game so that others may use it (it would be really easy to make something like Sokoban with this). The demo is here: The hero is controlled with the arrow keys. Use the controls in dat-gui in the upper right corner of the browser to change properties. Things to do: Push objects (even multiple objects in chains). Walk or push things into one-way directional tiles. Explore the Hero properties. Code examples //Init 8x8 grid physics game.plugins.add(new GridPhysics(; game.physics.gridPhysics.gridSize = { x: 8, y: 8 }; //Enable grid collision on a tile map layer game.physics.gridPhysics.enable(layer); // Enable grid body on sprite: game.physics.gridPhysics.enable(sprite);
  4. I just finished my first game, and I had to write a simple plugin for one of the functionalities (just a bar-graph generator that takes in an array of numbers and graphs/updates accordingly). There's a shop of a simple graph below. However, I don't know how I can make this plugin available for the Phaser community. I'm supposing it would go on Github, but I'm not sure - the only tutorial on new plugins hides its code and is rather complex. Are there any guides on how to do this? Thanks.
  5. Hey everyone, I am currently following the format of this tutorial to try to create a structured Phaser project, where the code is split up. Everything seems to go well, except from the fact that I can't seem to add the Isometric plugin I am using. This is the code I'm using: Main.js window.onload = function(){ var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-canvas', null, true, false); game.state.add('Boot', Boot); game.state.add('Preload', Preload); game.state.add('Menu', Menu); game.state.add('Start', Start); game.state.start('Boot'); } Preload.js var Preload = function(game){ }; Preload.prototype = { preload: function(){ this.time.advancedTiming = true; this.plugins.add(new Phaser.Plugin.Isometric(this)); this.iso.anchor.setTo(0.5, 0.2); this.load.spritesheet('basic_ground', 'img/spritesheet/basic_ground_tiles.png', 128, 128); }, create: function(){ this.state.start('Start'); } } This is the error I am getting when running: Uncaught TypeError: Cannot read property 'add' of undefined at Preload.preload (Preload.js:8) at c.StateManager.preUpdate (phaser.min.js:10) at c.Game.updateLogic (phaser.min.js:12) at c.Game.update (phaser.min.js:12) at c.RequestAnimationFrame.updateRAF (phaser.min.js:18) at window.requestAnimationFrame.forceSetTimeOut._onLoop (phaser.min.js:18) Any help?
  6. Hello! At the beginning of the year, I have a plugin to manage behaviors (based on construct 2) in Phaser games. Now I'm creating some behaviors. Please feel free to help me with testing or feedback. The plugin: (How to install and use on README) Some behaviors: (see the Pull Requests too) Check out demo game using "bevahiors": (see the file game.js)
  7. plugin

    (Made with love from Africa. Now, whether you buy or not, have a good day!) You can get this amazing little plugin on Gumroad for $10. Out of Kontrol - the Phaser Plugin that's actually in control of your controls. What is this? Out of Kontrol (OoK) is a key/input mapper. In other words, it allows you to have different input methods do the same thing. It cuts down on code verbosity and makes your code look neater. So yea,... that's nice too. Why do I need this? Want the WASD keys, arrow keys, and your custom placed buttons to control movement, then OoK is for you. Want to easily allow users to change the controls that you spent hours setting and testing, then OoK is for you!! Included: Minified version of Out of Kontrol. Phaser 2.6.2 + Out of Kontrol (minified) No source code :'( Manual A Basic example of all the functions found in OoK in action Developer love lol. No seriously, under all that minified and unobfuscated code is a lot of love from a dev to a dev. Alert!! We Need You!! OK, more like we need your feedback! Here's how you can help: Tell us about any issues/bugs on our issues page on GitHub. (Did you the favour of removing the source code, you can thank me later) Vote for new features on the same issues page! Also add your email to my newsletter. My emails don't bite (Disclaimer: if the email does end up biting you, I cannot be blamed). Bye!!
  8. Prints Phaser’s display tree. Demo / Code
  9. Hi, guys, I want to write my own plugin to add support of (NP) to the PIXI. NP has support of Canvas as well as WebGL. Is it possible to easy write such plugin to support 3rd party code and what is short plan to write it (like main steps)? NP code just needs to pass position of the effect in the update() and context to the render(), so, it is pretty straightforward, to use it. But I'm not familiar with all details of PIXI architecture and JS is not my main profile, so I need short directions to start dig. Thanks.
  10. Hi, I'm very glad to greet all of you. I'm new. I'm not a programmer. I dedicate myself to the artistic part. I'm a 3d designer. But a few months ago, I'm in a project. In which we have a problem I hope you can give me some of your time and have answers that help to dispel my doubts. The direct question is possible to export an object either obj, threejs or some other format that is loaded in the code and to be able to apply the cloth function that is found in the physical motors either babylon.js cannon.js oimo.js etc I hope you can understand my question Thank you
  11. Source & Docs / Demo Free bunny screensaver included.
  12. I'm using Construct2(C2) for my games. A developer is doing a plugin to use Babylon.js that allow us do 3D games. This was my first test, it's not a big thing but for something we have to start: Here to play: Preview: - The actual plugin is a "Scene Loader". You do the level on a 3D editor and export the .Babylon file to C2. There you set camera controls and actions using events to do the game. One of the problems is how to solve the action for a group of duplicate mesh objects that have different name. Now, for every mesh we have to create an object on C2 layout, set the 3D name on editor and add all the properties or behaviours we want. The problem is, if the level have 100 coins, each coin have a different mesh name, so we will have to add 100 objects on the layout to set the behaviours or actions, which will be pain. The unique thing we made is more a patch than a solution, some kind of array on we set: Name: Coin Start of index: 0 Ending Index: 100 Padding: (true) So for a Coin and Coin001, Coin002, etc... until Coin100 will set the properties or behaviours or whatever but limit other options to other plugins and other stuff in C2. Also only will works for Blender and 3Dmax, the Unity nomenclature breaks this solution. Here are how the Duplicate models looks in the 3D Editors Babylon can be exported: Blender: Coin, Coin.001, Coin.002, etc... 3Dmax : Coin, Coin001, Coin002, etc... Unity5 : Coin, Coin(1), Coin(2), etc... Maybe there is a solution that we not found, or a Babylon function that solve this, but if not i want to make a request if is possible. Request for Babylon exporters: ------------------------------------------------------------ Add some kind of ID for all the objects, maybe "Babylon_Mesh_ID" or whatever that are the same for all the mesh with the same properties. Then for: Coin, Coin.001, Coin.002,etc... will have the "Babylon_Mesh_ID=COIN". So in the C2 we only will have to create an unique object that refers to "COIN" and add an actions like: On Player collides with COIN > Destroy COIN / Add 1 to COIN.Counter, etc... When the player collides with a mesh with the ID "COIN" will do the events/actions no matter the mesh name. No arrays, patch or other stuff. Is possible?
  13. So I'm a phaser/html5 newbie, but coming from java I've chosen to take the typescript route, and am now trying to get plugins to work, but have been having major issues, and haven't been able to find any "official" information about typescript plugin support, only a few threads here with hacky solutions that haven't worked for me. What confuses me is that there are often typescript typings along with the plugins, which would indicate that they're supposed to work with typescript. Any insight into this would be greatly appreciated, and if I may suggest, should perhaps be more clearly presented in the documentation.
  14. It adds keyboard shortcuts: Source / Demo
  15. var player; var keys; var shootButton; var bullet; function create() { //game.add.sprite(0,0, 'background'); game.physics.startSystem(Phaser.Physics.ARCADE); //creates player player = game.add.sprite(0.45*600,600-50,'galaga'); game.physics.arcade.enable(player); // allows player to fire 2 bullets bullet = game.add.weapon(2,'bullet'); // when bullet leaves the screen, it will be destroyed bullet.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; // offset rotation bullet.bulletAngleOffset = 90; // prevents ship from auto firing bullet.autofire = false; // The speed at which the bullet is fired bullet.bulletSpeed = 400; //keeps track of how many bullets were shot bullet.shots = 0; // Tell the bullet to track the 'player' Sprite, offset by 16px horizontally, 0 vertically bullet.trackSprite(player, 16, 0); //enabling keyboard use keys = game.input.keyboard.createCursorKeys(); shootButton = game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); } function update() { // Reset the players velocity (movement) player.body.velocity.x = 0; if (keys.left.isDown) { // Move to the left player.body.velocity.x = -150; } else if (keys.right.isDown) { // Move to the right player.body.velocity.x = 150; } else { //ship is idle } //shooting the bullet if (shootButton.isDown) {; } } What I'm trying to do is prevent my player variable from autofiring(holding down space button to fire bullets.). I want the player to be able to shoot two bullets at a time, but only when the player presses the fire button rather than holding it. I was under the impression that bullet.autofire = false; would do the trick, but I was wrong. Am I using the autofire variable the wrong way?
  16. Draws tween timelines and prints tween properties. Code / Demo game.debug.tween(tween, x, y); game.debug.tweenData(tweenData, x, y); game.debug.tweenDataInfo(tweenData, x, y); game.debug.tweenDataValues(tweenData, x, y); game.debug.tweenInfo(tween, x, y);
  17. Draws properties of Arcade Physics bodies. Demo / Code
  18. Hi guys, I think that Phaser need a market place like Ionic Framework, see the example: What do you think? I think that it's an excellent idea!! Regards, Nicholls
  19. Hi everyone. I'm creating a game with Phaser for a University project and I'm trying to use Flaxis'plugin slick-ui in my project ( I'm struggling since hours trying to get it to work. I initialized the variable slickUI, containing the plugin SlickUI, like this (following the code of a preview posted by Flaxis). In my script in index.html: window.onload = function(){ var game = new Phaser.Game(960, 640, Phaser.CANVAS,'', { preload: preload}); //adding slickUI plugin var slickUI; function preload() { slickUI = game.plugins.add(Phaser.Plugin.SlickUI); slickUI.load('assets/kenney/kenney.json'); //directory where I put kenney.json } //... } As I run this code I get no error in the console log. I thought that var slickUI, exactly as var game, was a global variable so I could be able to use it in any other .js file, but I guess I'm wrong. I tried to use slickUI variable in a file called MainMenu.js file (which is a game state, that is called after Boot.js and Preloader.js), to create a panel to be visible. My code is this: Game.MainMenu = function(game) //crea uno stato di Game { }; //prototype Game.MainMenu.prototype = { create:function(game){ var panel; slickUI.add(panel = new SlickUI.Element.Panel(8, 8, 150, game.height - 16)); //these two lines I took from the example on github }, //... } But when I try to use the variable I instantiated in the index file, that is slickUI, I get the error on console log that variable "slickUI is not defined". I tried to define and use that variable as "this.slickUI", "game.slickUI", "" but none of these worked. I also tried to instantiate the plugin directly in the MainMenu.js, but it didn't work either. So, my question is: how do I get to instantiate/call the global variable slickUI which contains the plugin, in order to be able to use it in every other .js file in the project? Your help would be so appreciated.
  20. Hi, I often have some backup objects in my scene on a different layer. Is it possible to exclude specific objects from export?
  21. phaser

    Hello guys, I was trying to create health bars for a game I am creating in Phaser and I thought that i would be a nice idea to create a generic, usable health bar plugin. As a result I developed a simple, customizable health bar for your phaser game objects and I decided to share it with you in case you need something similar and also to get your opinion about this. Here is the repository: Feel free to suggest improvements, new ideas or if it's crap just say it's crap Thanks
  22. Hi I am using this plugin to implement gamepad support to my ouya/android game: It works great but the problem is that only player 1 works and I want the game to be controlled by any connected gamepad, is there anything I can edit so that the plugin ignores the controller (i.e. player1 or player2...). So that a button on each connected controller will trigger the 'jump' for example.
  23. If you've been looking for a UI manager for Phaser before, you'll know there aren't really a whole lot of good ones out there. That's why I started working on a component for building user interfaces in Phaser, called SlickUI. It's still in early development, but already capable of buiding user interfaces with panels, buttons, text and generic display objects (like sprites). On the todo list is adding text fields, checkboxes and radio buttons. Website Github page Would be cool to see your opinions!
  24. Hey all, Just wanted to let you know that I created a phaser text input plugin. Should work like a normal input text box, and unlike CanvasInput it also works in WebGL renderer. It's also tested on iOS9 and mobile Chrome. There are some limitations right now for using it, but the basic concept works. Head on to github to check it out :)
  25. So I kinda need a bit of help with pathfinding. I have been using the Easystar.js library as well as this pathfinding plugin for Phaser to do pathfinding for my topdown game. I ended up with this in my update function: testenemy.forEach(function(item) { //pathfinding portion let tilemap = teststageMap; pathfinder.setCallbackFunction(function(path) { item.path = path || []; for(i = 0; i < item.path.length; i++) { let goingX = item.path[i].x; let goingY = item.path[i].y;, goingX * 32, goingY * 32, 75); } }); pathfinder.preparePathCalculation([Math.round(item.x / 32), Math.round(item.y / 32)], [Math.round(testplayer.x / 32), Math.round(testplayer.y / 32)]); pathfinder.calculatePath(); }, this); However instead the enemy following a path around walls to get to the target player, the enemy just blindly takes a straight path towards the player so it wouldn't be able to get to me if there were any walls in it's path. Please help! I have been stuck at this problem for days and i don't know what to do!