• Content Count

  • Joined

  • Last visited

  • Days Won


Dumtard last won the day on July 31 2014

Dumtard had the most liked content!

About Dumtard

  • Rank
    Advanced Member
  • Birthday 03/28/1990

Contact Methods

  • Website URL
  • Skype

Profile Information

  • Gender
  • Location
    Toronto, Ontario, Canada

Recent Profile Visitors

823 profile views
  1. That will fix your infinite loop but, your description of what you expect that loop to do is wrong. It will push 4 tiles into the array with (x, y) in order (32, 32), (32, 64), (64, 32), (64, 64). If you want it to include 96, change '<' into '<='. The way you describe this "In the first for statement: if 32 is less than 96; it is, so we change 32 to 64 and move on" makes it seem like you do not understand the order in which for loops work. for (a; b; c) { d}a is executed before the loop d starts. b defines the condition for running the loop d and is checked before every iteration. c is executed each time after the loop d has been executed.
  2. Here is a simple example of how to extend a class. var MyClass = function() { BaseClass.call(this); this.variable = null // Extra property};MyClass.prototype = Object.create(BaseClass.prototype);MyClass.prototype.constructor = MyClass;MyClass.prototype.func = function() { }; // Extra function
  3. Well you can put the line "debugger;" at the top of your play_state preload and use Chrome's development tools to step through your code. Does Dreamweaver run the server for you? I am guessing so, that could have lead to the issue with phaser.js not sure how dreamweaver handles files and serving them to the client. Personally I would say not to use Dreamweaver, a good text editor and a webserver to serve the files is all you need. But that may be just my personal preference as I have never used Dreamweaver.
  4. Not sure, maybe a problem with the phaser.js file, I doubt it, but I have not used it. I guess go back to the phaser.min.js file for now, but solving this you will need to work harder to fix. Figure out where in your play_state the phaser call is that is causing the error. You can do this using debugger or console statements, to narrow in to the function call so that we can figure out what the issue is.
  5. Not sure the problem, but I would fix it by getting a minimum working example with phaser.js. Include just phaser.js and a game.js with game.js being: function preload() { console.log('preload');}var game = new Phaser.Game(640, 480, Phaser.CANVAS, 'ejemplo', { preload: preload });Once you have that you can start adding back on and see where the problem occurs.
  6. It should be a drop in replacement for the min version. 'Unexpected token <' looks like it is trying to put a HTML tag in make sure the index.html is correct.
  7. Don't use the min version of phaser, use the regular unminified version and then come back and tell us what line the error is on. Also what version of phaser. For development you should not use minified files, it makes it hard to debug. When you are done and what to put the game out to the public you can then use the minified version.
  8. You are missing commas in your play state. var play_state = { create: function() { }, //HERE update: function() { }, //HERE createBet: function(x,y) { }, //HERE releaseBall: function() { }, //HERE ballHitsBet: function(_ball, _bet) { }, //HERE setBall: function() { }};
  9. Why would you not use it as a Q&A site? Taken from the top of Stack Overflow.
  10. game.state.add is not Phaser.State.add it is Phaser.StateManager.add. To read the documentation start at the base and work your way up. Start at Phaser.Game then find its state variable which is a Phaser.StateManager then you can find it's add method.
  11. And just like that Cairhien is gone. The Aiel just can't leave them alone can they.
  12. Dumtard

    Blinking Tile

    You shouldn't be adding a new sprite every time, you can just call Sprite.revive() to bring a dead sprite back. Also depending on your goal for this sprite a better approach may be to create an animation for the sprite and run that.