Game inventory
I am trying to make simple inventory for my game, but I can't decide how to do it. Now I have something like this function Game() { this.player = new Player(); } function Player() { this.inventory =...
View ArticleScope of an object in a different function
Hello everyone, I just started Phaser, and I am trying to get a sprite to change on button click: create: function() { this.game.button = this.game.add.button(this.game.world.centerX-450, 660,...
View ArticleWebGL Primitive Batching unexpected performance
Hello, I'm kinda new to WebGL in general, I've started to make some batching experiences on primitives (just drawing a bunch of rectangles by using a combination of two triangles repeatedly). I've...
View ArticleHelp with ideas for Tetris-like game
Hi everyone! So I'm fairly new to making games (made one for school and currently working on another) and I'm having trouble with implementing the game board for my game. Specifically, I want to make...
View ArticleHaving problems with keyboard inputs for my game
I'm working on a game and I'm trying to get the main character to move left and right while playing an animation. The animation plays and the character moves in the correct direction, when I press the...
View ArticleTypeError: this.data.getLocalPosition is not a function
Hello, So i have some problems with my code, i wanted to drag some objects but i have this error! This is my code poisson.mousemove = function(data) { if (this.dragging) { var newPosition =...
View ArticlePerformance out of canvas
Hello, I am developing a game using several canvases (3) on top of one another. I am close to finishing the game and I haven't yet optimized the performance, it's my first game so any suggestion on...
View Articleuse single var for multiple new Image()
Hi. I was testing to see if I could use the following code to store new Image() in a variable and use it for several images. var _new_image = new Image(); var _image_1 = _new_image; _image_1.src =...
View ArticleIs my way of creating objects correct?
Hi, I am new on javascript and I can't get my head wrapped on Objects. Is my way of creating objects correct? I am using this way along with require.js. I am having few comments from my colleague...
View Articlewhere to start?
i want to learn to make games with html5, never made any games before, please tell me good resources, where to start? and please tell me good editors where it's possible to immediately view the...
View ArticleGUI - Html or Canvas
Hi guys, I'm very new into the game dev scene (1 week new). My idea is to develop games using Phaser and then compile it, using phonegap, for mobile devices. In this scenario - as I see some no-nos in...
View Article2D NPCs with random appearances
I'm starting work on a game where I want to be able to randomly generate NPCs. These NPCs could have different faces, haircuts, eye colors, outfits, etc. I'm wondering what the best way is to handle...
View ArticleEfficiency difference between using large png and scaling down vs small pngs
Is there a big efficiency difference, in terms of game speed/smoothness and memory usage between using a small png for entities sprites VS using a big png and scaling it down with javascript ingame?
View ArticleHow to do hitboxes?
We are building a multiplayer top-down shooter deathmatch app. My team's idea is to upload all hits at a given time as x,y coordinates to an array (which is then passed to the server) and then check...
View ArticleA javascript Tutorial for BenghaziGame :
Hello & Thanks , A javascript Tutorial for BenghaziGame : I just wanted to let you know that I have written a javascript tutorial for my BenghaziGame , and to thank all you folks on this Forum...
View ArticleMaking a game like FreeriderHD
Hi, I'm looking for some advice. I've been trying to create a snowboarding game. I want it to make use of a physics engine so that I can get realistic reactions to the landscape like in FreeRiderHD....
View ArticleSprite size & performance
Is there a substantial difference in performance using big frame animations vs smaller ones? What about movement? Thanks.
View ArticleUI/UX Feedback
I am looking for some feedback for my UI (images attached). The game was a text adventure - but has now gone towards the way of point and click. I have it laid out with a full screen background that...
View ArticleTrouble with Phaser in Pong like game
Hey all, just started programming with Phaser and I'm still trying to get the hang of it. I fiddled around with with the sandbox environment and then decided to switch over to Sublime for easier...
View ArticleNeed help with creating an invisible barrier for a project
Hi.I am in a bit of a pickle and need some advice please.I need to complete a project but I do not have much knowledge in Javascript.Help needed with: 1. LEFT and RIGHT need to rotate the ant 90...
View Article