Search the Community

Showing results for tags 'javascript'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 697 results

  1. Hi all of you!, Could anybody give me the solution while loading audio in safari browser issue as following. these are the audio files in local drive GET http://localhost/Projects/stacks/bgsound 404 (Not Found) startSoundGET http://localhost/Projects/stacks/startSound 404 (Not Found) normalGET http://localhost/Projects/stacks/normal 404 (Not Found) perfect1GET http://localhost/Projects/stacks/perfect1 404 (Not Found) shrinkGET http://localhost/Projects/stacks/shrink 404 (Not Found) perfect2GET http://localhost/Projects/stacks/perfect2 404 (Not Found) perfect3GET http://localhost/Projects/stacks/perfect3 404 (Not Found) perfect4GET http://localhost/Projects/stacks/perfect4 404 (Not Found) perfect5GET http://localhost/Projects/stacks/perfect5 404 (Not Found) perfect6GET http://localhost/Projects/stacks/perfect6 404 (Not Found) failureGET http://localhost/Projects/stacks/failure 404 (Not Found) pixi.min.js:14Pixi.js 4.0.1 - Canvas - 'undefined' is not a constructor (evaluating 'new window.Audio') Regards, Awadh
  2. Hello, I'm migrating my index.html phaser code to different javascript files for better structure and organisation; but I'm coming upon a problem. I've decided to use the template to make the game responsive "Basic Responsive Template" The templates features different states: boot, preload, game, and mainmenu as js files. I load all these in my HTML file and proceed to start from the "game" state. using a button I created in "Mainmenu". In the "create" method, of the "game" state, I call the createButtons function. This function is stored in another JS file that is loaded in the HTML file, before loading the phaser states. here is the createButtons code : function createButtons(){ //Mountain Brush buttonGroup =; buttonMountain = this.add.button(736, 32, 'buttons', mountainOnClick, this, "mountainbutton0.png","mountainbuttonpush.png", "mountainbuttonpush.png"); buttonMountain.fixedToCamera = true; buttonGroup.add(buttonMountain) function mountainOnClick () { currentLayer = terrainPop; currentTile = 5; } In the "game" state here is the code I use to call createButtons create: function () { //========================== WORLD CREATION //Make our game world and set it bounds, 0, gameWorldX*32, gameWorldY*32); // ========================== TERRAIN CREATION //create Blank tilemap terrainLayer = this.add.tilemap(); // add a tileset Image to the map terrainLayer.addTilesetImage(tileSetImage); //create the world as a layer terrain = terrainLayer.create('level1', gameWorldX, gameWorldY, 32, 32); terrainPop = terrainLayer.createBlankLayer('level2', gameWorldX,gameWorldY,32,32) terrainLimbo = terrainLayer.createBlankLayer('limbo', gameWorldX,gameWorldY,32,32) // Fills tilemap layer with default tile:HOLY WATER (6) terrainLayer.fill(0, 0,0,gameWorldX,gameWorldY, 'level1'); //allows camera to move around terrainLayer.fixedToCamera = false; currentLayer = terrain; createButtons(); },// End of Create When trying to load the state, I get the error: "TypeError : this.add is undefined" on the createButtons.js:3:1; I don't understand why createButtons isn't working in the scope of the create method I've been beating my head at this all day long and couldn't find any solution; i'm pretty sure it's a noobie mistake and would be grateful for some help! Thanks a lot
  3. There is many maze generation algorithm, some perform better in some cases some perform better in others. Some generate mazes with long lines, while others generate with huge number of branches. There is so many different options that for sure I will not cover all of them but you may have a look here: For my engine ( ) I offer base procedural maps which can be edited by the game owner, one of the generator uses the Prim's algorithm (if I don't mix up as it is actually pretty old code of mine): You can run multiple times the example, and each time you get a different maze. The steps involved are: Generate a maze array which have "rooms" separated by walls. Think about small rectangles touching each others. You start from one of those "rooms" and then select all the wall and open then up if the room there has not been visited already. Add those reached "rooms" as new points in the todo. If there is still rooms to visit go back to point 2. At the end of the process you should have visited all the possible rooms and therefore opened many walls. You will also have a fully solvable maze (starting from any room you will be able to reach any other room). Drawback it requires quite some memory and the maze is pretty messy. But that is not an issue in my case. From this array generation to my maps, I do have like a factor of conversion, ideally between 3-5 which means for each maze cell I have 3-5 map tiles involved. My tile code allows also to blend tiles and find automatically the transition between 2 types of tiles. I also added some "erosion" code which makes the look of the maze a bit more natural The erosion involves a Perlin noise generator and checking the neighbors tiles to see if that particular tile need to be changed or not. The erosion is run before the transition is run. Of course on top of that you could place objects, monsters or anything else you may think could improve your game. Be careful with maze generation, mazes can be really difficult to solve once you are playing them and... too difficult means boring in most cases. if you need more information please ask
  4. Looking for a passionate HTML5 developer with lots of experience in Javascript/CSS/JS libraries and can give life to lot of educational games to make the math learning more exiciting and interesting for students. Our requirements 2+ years of working experience with games or interactive and responsive websites. Have a flair to develop fun and interactive games with good sense of deign. Proficiency in XML, Javascript and ability to use libraries like like angular JS/ImpactJS/CreateJS/CraftyJS/PixiJS/GameJS/Objects etc. servertechnologies, web technologies Strong grasp of algorithms, data structures and object oriented systems. Please send your resumes to
  5. JavaScript / HTML5 Game Developer (m/f) Based in Berlin, the creative capital of Europe, SOFTGAMES is the world’s largest producer and distributor of HTML5 instant games. We’re delivering fun to 30+ million users every month across 6 continents on the device of their choosing. Our vision is to help users to instantly discover and engage with games they like, while helping brands to reach their target audiences. SOFTGAMES is looking for a super-talented JavaScript / HTML5 Game Developer to join our Game Studio team to build awesome HTML5 instant games that entertain millions of players. The position is full-time and based in our Berlin office. The JavaScript / HTML5 Game Developer role is responsible for creating and maintaining high quality fun games in HTML5 / JavaScript. You will work closely with artists and game producers to deliver a great player experience. Further you will work with other JavaScript / HTML5 Game Developers to share learning and best practices. The successful candidate will write well-structured code, is comfortable working on complicated code-base and has a great sense of what makes a good game. As part of the Game Studio team you will enjoy a creative, challenging and collaborative environment and are expected to have the entrepreneurial spirit with a "getting things done" attitude. Your role: - Create, maintain and optimize new and existing high-quality HTML5 Instant Games - Build valuable tools to support the game development process - Deliver high quality and well-structured code - Share knowledge and help colleagues Your profile: - Experience in JavaScript / HTML5 games development, ideally using Phaser - Passionate about games, with an understanding of (free2play) game-play mechanics - Well versed in OOP practices and design patterns - Knowledge of the latest libraries and frameworks - Experience with using third party plugins and code, and knowing when to use them - Open-minded and keen to learn - Competent in spoken and written English We offer: - A spirited, ambitious, international and enthusiastic team - The best and brightest company in producing and distributing HTML5 instant games - The chance to produce casual games for 30+ million monthly gamers around the world - Valuable insights into global expansion, start-up scene and entrepreneurship - Flexible working-hours and flat company hierarchy - Inspiring company breakfasts, team events and free fresh fruits, drinks etc. every day Have we caught your interest? Then we look forward to your detailed application here:
  6. KulerDuder

    Game Loop Problem

    Hi there! I am trying to do a very simple game, but before I continue developing it, I need to get something important right: the game loop. I will leave the link here so you can actually see the game and the code How can I get the gameloop right? There seems to be a problem, I can't get my humanHungerBar to register and log when it gets to 1 and also I have tried everything to loop the game and I can't... can you help me in any way?
  7. Time to reveal what is my latest project: So what is it? In short it's a 2D graphical RPG maker directly usable from your browser, which let you create multi player games. You can upload your own art (and soon your music too), change all the game rules, edit the maps, place monsters, create quests, and much more. Who can be interested? Whoever want to create his/her own 2D rpg or just even want to play one. How much will it cost? There will be a couple of options. You will be able to start without paying a cent, but some features will be disabled and available only for payed users. Can I make money with it? Yes you can, as we will introduce premium shops such that your players can spend money on your game. There will be a fee on the sales most likely but you shall get most of the money. Payment for your players and for you will be done via Paypal. Can I create a big game with it? Yes you can create really really huge games, with loads of maps and content. We doubt you will ever reach the limits of our system. Do I need to download something to start? No it's all fully working within your browser using HTML5 technologies (JS and Canvas). No need to download anything neither for you nor your players. Will my game be playable from mobile devices? Yes we do plan to make the games fully playable by mobiles, while the maker will most likely be too difficult to use from a mobile device. When shall the product be ready to be used? You can start already using our product, but we consider it currently as in beta. We plan to have a full product by the end of this year. However our own game will be released only middle next year. Can I save / export my game? We do offer backup and restore of your game data, which you can save on your PC. However we don't have a plan yet to let you export the code to run it on your computer or another server. How can my players access the game I designed? Every game created with our tool is accessible as <your_game_name> Using this URL your players access directly your game without jumping on our home site. Will you offer some content as start point? Yes we offer 2 different base content you could choose from and use for your own game creation. What about security? We do already have some cheat detection implemented but more will come later on preventing basically most of the player cheating. You can however already try to see what is already implemented and be surprised. Who participate in this project? Currently we are 2 people, an artist creating art, and working on our game, and myself working on the code. What is still missing? If you want to know if you can already use the tool then the answer is yes you can, but we still have loads planned and ongoing. You can check our roadmap for more information:
  8. Hi all, I am working on this game with a friend. We are having an issue when using the phaser-arcade-slopes.min.js. At the point when we go to add the plugin in the create() function it starts loading with a black screen and will then further keep the black screen and nothing seems to happen. We have attempted different statements etc and nothing seems to have worked. If you remove all lines that are commented saying "//Arcade Slopes", the game works perfectly with collision but obviously without the slopes working. The error we get with it when the arcade slopes code is implemented is as follows; Uncaught TypeError: Cannot read property 'x' of undefined(...) It says that this is coming from the phaser.min.js:24. Now if I extend this it takes me further to my JavaScript code which is as follows; var gameFunc = function() {}; var map; var ground; var player; var direction = 'left'; var jumpTimer = 0; var movement; var jumpButton; var bg; gameFunc.prototype = { create: function() { game.physics.startSystem(Phaser.Physics.ARCADE); game.plugins.add(Phaser.Plugin.ArcadeSlopes); //Arcade Slopes game.physics.arcade.gravity.y = 250; //Arcade Slopes bg = game.add.tileSprite(0, 0, 800, 600, 'background'); bg.fixedToCamera = true; map = game.add.tilemap('level1'); map.addTilesetImage('snow_tiles_32', 'tiles'); ground = map.createLayer('Tile Layer 1'); ground.debug = true; ground.resizeWorld(); //Arcade Slopes game.slopes.convertTilemapLayer(ground, { 1: 'FULL', 2: 'FULL', 3: 'FULL', 4: 'FULL', 5: 'FULL', 6: 'FULL', 7: 'FULL', 8: 'FULL', 9: 'HALF_TOP', 10: 'FULL', 12: 'FULL', 13: 'HALF_BOTTOM_LEFT', 14: 'HALF_BOTTOM_RIGHT', 15: 'HALF_BOTTOM_LEFT' }); //End of Arcade Slopes map.setCollisionBetween(1, 34, true, 'Tile Layer 1'); player = game.add.sprite(32, 32, 'penguin'); game.physics.enable(player, Phaser.Physics.ARCADE); //Arcade Slopes game.physics.arcade.enable(ground); player.body.slopes = {sat: {response: 0}}; //workaround for a phaser bug game.slopes.enable(player); player.body.slopes.preferY = true; //stops the player sliding down slopes //End of Arcade Slopes player.body.bounce.y = 0.2; player.body.collideWorldBounds = true; player.body.setSize(20, 32, 5, 16); player.animations.add('left', [0, 1, 2, 3], 10, true); player.animations.add('turn', [4], 20, true); player.animations.add('right', [5, 6, 7, 8], 10, true); game.slopes.enable(player); //Arcade Slopes; movement = game.input.keyboard.createCursorKeys(); jumpButton = game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); }, update: function() { game.physics.arcade.collide(player, ground); player.body.velocity.x = 0; if (movement.left.isDown) { player.body.velocity.x = -150; if (direction != 'left') {'left'); direction = 'left'; } } else if (movement.right.isDown) { player.body.velocity.x = 150; if (direction != 'right') {'right'); direction = 'right'; } } else { if (direction != 'idle') { player.animations.stop(); if (direction == 'left') { player.frame = 0; } else { player.frame = 5; } direction = 'idle'; } } if (jumpButton.isDown && player.body.onFloor() && > jumpTimer) { player.body.velocity.y = -250; jumpTimer = + 750; } }, render: function() { game.debug.bodyInfo(player, 32, 32); } }; Now once extended, it says the error is coming from my update function's first line; game.physics.arcade.collide(player, ground); I'm not entirely sure what can be the solution here, I have tried multiple different steps and just making it either worse or nothing at all happens. If anyone can be of any help that would be great! I have posted the HTML (index.html) and the preloadJS.js incase. index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script type="text/javascript" src="JS/libraries/phaser.min.js"></script> <script type="text/javascript" src="JS/libraries/phaser-arcade-slopes.min.js"></script> <script type="text/javascript" src="JS/preloadJS.js"></script> <script type="text/javascript" src="JS/menuJS.js"></script> <script type="text/javascript" src="JS/level1JS.js"></script> <script> var game = new Phaser.Game(800, 600, Phaser.AUTO, 'game'); game.state.add('preloadState', preloadFunc); game.state.add('menuState', menuFunc); game.state.add('gameState', gameFunc); game.state.start('preloadState'); </script> </head> <body> <div id='game'></div> </body> </html> preloadJS.js var preloadFunc = function() {}; preloadFunc.prototype = { preload: function() {'level1', 'assets/tilemap/tiles.json', null, Phaser.Tilemap.TILED_JSON);'tiles', 'assets/tiles/snow_tiles_32.png');'penguin', 'assets/sprite/penguin.png', 32, 48, 9);'ball', 'assets/sprite/ball.png', 30, 20);'background', 'assets/background/blue.png', 800, 600); }, create: function() {'gameState'); //Temporary state for testing the game quickly } } Thanks for the help!
  9. Are there any facilities to dynamically load javascript in babylon js... If not what it the recommended way to load javascript from a string? Is window.eval ok to use in a custom scene loader (like objFileLoader.ts)? If i use window.eval to dynamically load javascript, will it be acceptable code to submit to github project?
  10. Hey guys This is another one of my html5 games. It is the first html5 game that i have built using the Phaser framework. I have google analyse code in it but it isnt working. anyone that can help please do. Here is the link. I would appreciate the pointers and positive criticism. Cheers Pheaset
  11. I need to determin which side was hit when collision is performed. I for some reason never can figure it out. It only returns two sides regardless of where it hits. please help! I have been stuck on this forever! function collision(obj1, obj2){ if( obj1.x + (obj1.width/2) > obj2.x - (obj2.width/2) && obj1.x - (obj1.width/2) < obj2.x + (obj2.width/2) && obj1.y + (obj1.height/2) > obj2.y - (obj2.height/2) && obj1.y - (obj1.height/2) < obj2.y + (obj2.height/2) ){ if( obj1.prev_y + (obj1.height/2) >= obj2.y - (obj2.height/2) && obj1.x + (obj1.width/2) > obj2.x - (obj2.width/2) && obj1.x - (obj1.width/2) < obj2.x + (obj2.width/2) ){ return 'bottom'; } else if( obj1.prev_y - (obj1.height/2) <= obj2.y + (obj2.height/2) && obj1.x + (obj1.width/2) > obj2.x - (obj2.width/2) && obj1.x - (obj1.width/2) < obj2.x + (obj2.width/2) ){ return 'top'; } else if( obj1.prev_x + (obj1.width/2) > obj2.x - (obj2.width/2) && obj1.y + (obj1.height/2) > obj2.y - (obj2.height/2) && obj1.y - (obj1.height/2) < obj2.y + (obj2.height/2) ){ return 'right'; } else if( obj1.prev_x - (obj1.width/2) < obj2.x + (obj2.width/2) && obj1.y + (obj1.height/2) > obj2.y - (obj2.height/2) && obj1.y - (obj1.height/2) < obj2.y + (obj2.height/2) ){ return 'left'; } } }
  12. I can't understand why this is happening so please help me out. For some reason when i run this program at my home PC it will load a black screen. When I load the exact same files on a PC at my University it will run normally from using those exact files where it DID NOT work at my home PC. If anyone could shed some light into why this error is there and give a fix it would be great. Error: Uncaught TypeError: Cannot read property 'x' of undefined(…) P.s All files included in the ZIP. Test Game Phaser.rar
  13. Hey Guys. Im currently working on a Breakout game using Phaser so that i get used to the framework. I was wondering if anyone knows how to add tempory text to a canvas or webgl for a win/lose screen. Thanks in advance Pheaset
  14. I realised today, that I'd been working on my game much in the same way as the Phaser examples, and I had a question about best practice for variables. As per the examples, I tend to declare varaibles at the top, which is fine apart from 2 things, firstly this makes them globally available, secondly it makes them a little difficult to access dynamically (I end up using window["dyn_var_"+n] etc.) But, I have also add vars to the game function like this: Game.Play = function (game) { this.player1 = []; this.numBalls = 6; }; which means they are accessible throughout the Play state. But, I wondered if there was another way, a better way, or what was generally considered best (or maybe better) practice?
  15. Hi guys, I would like make a dos-look-style game using javascript. Can you suggest me what kind of library should I use? Tnx
  16. I've been programming for a few years now, and started writing javascript several months ago. I'm writing a web game in C# and javascript using SignalR and Fabricjs. If I could chat with a web dev guru, I would have an annoying number of questions. This is mainly because I'm completely self-taught and uncertain that I'm doing things the right way, or rather, that I'm not doing things the wrong way. I'm here to ask for general guidance about my code. I'm not asking for anyone to try to find bugs, but rather, I'm asking for a more experienced developer to let me know if there is something which is obviously a bad practice in my code. Here is my GitHub repo: Here is the live app: Thanks to anyone who takes the time to help. P.S. Please use Chrome or Firefox
  17. Dakara Online is a medieval MMORPG made using PIXIjs, jqueryui, howlerjs and much more. The source code is available, the client is released under the MIT license and the server under the GPL. Its based on an argentinian MMORPG called Argentum Online. GAME LINK: SOURCE CODE LINK:
  18. This is a bit of a simple question I feel, but I have been struggling to get it right for a while. I am using super simpler AABB collision in my rect based game. I have a bouncing rect which behaves funny when it collides with the player, who is also a rect. The ball 'sticks' and bounces a bit inside the player before bouncing away. I don't have gravity at the moment, or any advanced collision logic. All I am doing is inverting the x or y vectors based on whether the bouncing ball hits the top or sides of another rect. I feel like to resolve this issue I should get the displacement value from the overlapping rects and then 'push' the overlapping rect (the ball in this case) away from the second rectangle by using the displacement value as a positive offset. To do this I feel like it would be cleaner to separate the collisions to different sides, or corners? Does anyone have any experience in implementing a slightly more advanced version of AABB?
  19. pheaset

    View Counter

    Hey Guys, I was wondering if anybody knew how to add a view counter. I want to know how many views my breakout game will get when it is launched and the same for my other tennis game. Help is really appreciated Pheaset
  20. Hello all, i've seen some solutions for my problems, yet i still looking for some enhanced solution. I need my game to resize and it should not lose the screen proportions. however, i have every sort of screen to deal with, and some of them cuts off the bottom of my game. i am using it for resize: game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.scale.setScreenSize(true);#game { width: 100%;}Would be nice to find a way to make sure that there is enough height on screen so scale manager could respect that.
  21. I'm currently having this issue when I am trying to get a sprite to go up a slope within phaser using the phaser-arcade-slopes.min.js plugin. I am using a .csv tilemap also with a tile size of 32x32. I'm unsure if my names are just incorrect or I am using the wrong type of file for the tilemap itself. I have been getting errors such as - Tilemap.createLayer: Invalid layer ID given: null & Cannot read property 'resizeWorld' of undefined(…). Any help would be much appreciated. "snow_tiles_32.png" is the name of the tileset I created and I'm using "tiles.csv" the tilemap created inside Tiled. I've also included a .rar file of everything to do with the game if anyone decides to take a further look into this issue. HTML var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); function preload() {'tilemap', 'assets/tilemaps/csv/tiles.csv', null, Phaser.Tilemap.CSV);'tiles', 'assets/tilemaps/tiles/snow_tiles_32.png', 32,32);'player', 'assets/penguin.png', 32,48); } var player; var cursors; function create() {;; cursors = game.input.keyboard.createCursorKeys(); ='tilemap');'snow_tiles_32', 'tiles'); = '#80e3ff'; this.ground ='collision'); this.ground.resizeWorld();,{ 2: 'FULL', 3: 'HALF_BOTTOM_LEFT', 4: 'HALF_BOTTOM_RIGHT', 6: 'HALF_TOP_LEFT', 5: 'HALF_TOP_RIGHT', 15: 'QUARTER_BOTTOM_LEFT_LOW', 16: 'QUARTER_BOTTOM_RIGHT_LOW', 17: 'QUARTER_TOP_RIGHT_LOW', 18: 'QUARTER_TOP_LEFT_LOW', 19: 'QUARTER_BOTTOM_LEFT_HIGH', 20: 'QUARTER_BOTTOM_RIGHT_HIGH', 21: 'QUARTER_TOP_RIGHT_HIGH', 22: 'QUARTER_TOP_LEFT_HIGH', 23: 'QUARTER_LEFT_BOTTOM_HIGH', 24: 'QUARTER_RIGHT_BOTTOM_HIGH', 25: 'QUARTER_RIGHT_TOP_LOW', 26: 'QUARTER_LEFT_TOP_LOW', 27: 'QUARTER_LEFT_BOTTOM_LOW', 28: 'QUARTER_RIGHT_BOTTOM_LOW', 29: 'QUARTER_RIGHT_TOP_HIGH', 30: 'QUARTER_LEFT_TOP_HIGH', 31: 'HALF_BOTTOM', 32: 'HALF_RIGHT', 33: 'HALF_TOP', 34: 'HALF_LEFT' });,34, true, 'collision'); //player this.player =,50,'player');; this.player.body.bounce.y = 0.2; this.player.body.gravity.y = 2000; this.player.body.collideWorldBounds = true; this.player.animations.add('left', [0,1,2,3], 10, true); this.player.animations.add('right', [5,6,7,8], 10, true);;; } function update() {, this.ground); this.player.body.velocity.x = 0; if(cursors.left.isDown){ this.player.body.velocity.x = -150;'left'); } else if (cursors.right.isDown){ this.player.body.velocity.x = 150;'right'); } else{ this.player.animations.stop(); this.player.frame = 4; } if(cursors.up.isDown && player.body.onFloor()){ this.player.body.velocity.y = -350; } } Test Game Phaser.rar
  22. The previous time I worked on this project it would load no problem within the browser, now I get the error Uncaught TypeError: Cannot read property 'x' of undefined and it says it's coming from phaser.min.js:24 which isn't making sense to me. var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); function preload() {'tilemap', 'assets/tilemaps/csv/tiles.csv', null, Phaser.Tilemap.CSV);'tiles', 'assets/tilemaps/tiles/snow_tiles_32.png', 32,32);'player', 'assets/penguin.png', 32,48); } var cursors; //var snowballs; //var sTime = 0; //var fireButton; function create() {;; cursors = game.input.keyboard.createCursorKeys(); ='tilemap');'snow_tiles_32', 'tiles'); = '#80e3ff'; this.ground =; this.ground.resizeWorld();,{ 1: 'FULL', 2: 'FULL', 3: 'FULL', 4: 'FULL', 5: 'FULL', 6: 'FULL', 7: 'FULL', 8: 'FULL', 9: 'HALF_TOP', 10: 'FULL', 12: 'FULL', 13: 'HALF_BOTTOM_LEFT', 14: 'HALF_BOTTOM_RIGHT', 15: 'HALF_BOTTOM_LEFT', });, 34, true, 0); //player this.player =, 50, 'player');; this.player.body.slopes = {sat: {response: 0}}; // workaround for a phaser bug; this.player.body.slopes.preferY = true; // stops the player sliding down slopes this.player.body.bounce.y = 0.2; this.player.body.gravity.y = 700; this.player.body.collideWorldBounds = true; this.player.animations.add('left', [0,1,2,3], 10, true); this.player.animations.add('right', [5,6,7,8], 10, true); //this.snowballs =; //this.snowballs.enableBody = true; //this.snowballs.physicsBodyType = Phaser.Physics.ARCADE; //this.snowballs.createMultiple(1, 'snowball'); //this.snowballs.setAll('anchor.x', 0.5); //this.snowballs.setAll('anchor.y', 1); //this.snowballs.setAll('outOfBoundsKill', true); //this.snowballs.setAll('checkWorldBounds', true); //this.fireButton = game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR);;; } function update() {, this.ground); this.player.body.velocity.x = 0; if(cursors.left.isDown){ this.player.body.velocity.x = -150;'left'); } else if (cursors.right.isDown){ this.player.body.velocity.x = 150;'right'); } else{ this.player.animations.stop(); this.player.frame = 4; } if(cursors.up.isDown && (this.player.body.onFloor() || this.player.body.touching.down)){ this.player.body.velocity.y = -350; } //if(fireButton.isDown){ //this.fireSnowball(); //} //} //function fireSnowball(){ //if( > sTime){ //this.snowball = snowballs.getFirstExists(false); //if(snowball){ // this.snowball.reset(player.x+30, player.y+30); //this.snowball.body.velocity.x = 400; //this.sTime = = 10; // } //} } Test Game Phaser2.rar
  23. Hello, A complete newbie here. So, I selected my project within 3 weeks as " Mario like game with level editor" for my college and can only use plain javascript and nothing else. I have done some research and i found that i have to make it on canvas. My logic was to first create a json data and render the map from that and make it playable. Then make an editor where the user can drag and drop tiles which after finished creates a json data, from which the game can render from. But, how do i start on this? Any guidance? How do i render the json and provide collision detection. Also, how to let user create their own level and create the json data. Help is much appreciated, Thank you!
  24. I am developing one application (platform) where I have 10 users (maybe this will increase with time). I have created one login page and created one map using tiled (phaser framework). But this map is now same for all users, What I want is to create a separate map for every user and that will be visible after login. Please give me some suggestion so that at least I can try. Or give some idea for this implementation. Thank you !
  25. I wrote an article titled You already know Flash, so JavaScript is easy. One important thing I missed was how easy it is to animate things in Flash compared to JS. So might have to share what I learned there later. I'm wondering what else did I miss. I need feedback, what would you say to convert Flash developers to HTML5?