MisterMaSK

Members
  • Content Count

    17
  • Joined

  • Last visited

About MisterMaSK

  • Rank
    Member
  • Birthday 12/01/1988

Profile Information

  • Gender
    Male
  • Location
    India
  • Interests
    Web Development
    Game Development
    Movies
  1. i think for the array you could do something like - this.tile_array = [ [0,0,0,0,0,0,0,0,0], [0,1,1,1,0,0,0,0,0], [0,0,0,0,0,0,1,1,1], [0,2,0,0,0,0,0,0,0], [1,1,1,1,1,1,1,1,1], ];and then you could write a for loop like this - this.floor_group = this.add.group(0,0);for(var i = 0; i<9; i++) { for(var j = 0; j<15; j++) { if(this.tile_array[i][j] == 1) { var floor = this.floor_group.create(i*20,j*20, 'floor'); // add immovable or something here } else if(this.tile_array[i][j] == 2) { this.player = this.add.sprite(i*20,j*20, 'player'); } // add more else ifs for more items in your array }}
  2. have a look at this game....its a genius game working with light masks....may not be exactly what you are looking for....but will give you some idea nonetheless... Pixel Lanternbearer Play Url - https://dl.dropboxusercontent.com/u/51179665/html/LD28/index.html Source Url - https://dl.dropboxusercontent.com/u/51179665/other/felixnemisLD28.zip Site - http://www.ludumdare.com/compo/ludum-dare-28/?action=preview&uid=6525 also you can visit http://pgl.ilinov.eu/?order=source&dir=desc to checkout the source of some really good games made with phaser and how they work....
  3. i couldn't find it in examples either. this is how you do it though - sprite.alpha = 0.2;
  4. nowadays i do my programming in silence (mostly). but i used to listen to pretty much every linkin park song these is, namely two metallica (battery, where ever i may roam) and one imagine dragons (radioactive) songs. i love the whole alternative genre.
  5. nevermind guys. i named the font wrong in the function.
  6. i am always getting this error while trying to add bitmap font to the screen - Uncaught TypeError: Cannot read property 'size' of undefinedi have exported the font file xml from shoebox under starling xml format.....i even tried bmfont....same error how can i solve it? here is my font xml file. i can't see any problem with it whatsoever. http://pastebin.com/wFiFSMat
  7. ok thanks a lot....ill try checking for overlap
  8. so i am creating a player sprite and an enemy sprite and then i am adding a tween to the enemy like this - this.add.tween(this.enemy).to({ x: 300 }, 2000, Phaser.Easing.Quadratic.InOut, true, 0, 1000, true);then i add a collision callback - this.physics.collide(this.enemy, this.player, this.player_die, null, this);the player_die function simply kills the player sprite. but when i test it, if the player simply goes in between the path of the tween and stays still, the player_die function is not called. the enemy just goes through the player and nothing happens. but if the player is moving while coming in contact with the enemy, then the player_die function is called can i make the check work everytime and not just when the player is moving?
  9. i need to learn better character creator and frame animation for the character...like walking , raising hand (to shoot) etc. any sites you could point me to, would help. thanks.
  10. Don't know about the first question but for the second one - you can go through a group like this - this.groupName.forEach(function(item) { // do whatever you want with them right here});
  11. the spelling of immovable is wrong
  12. this is how this error happened to me - var game = new Phaser.Game(960, 640, Phaser.CANVAS, 'my_game');here's how you create a new game right?.. so you need to have a div #my_game in you html<div id="my_game" ></div>or you can just do it like this var game = new Phaser.Game(960, 640, Phaser.CANVAS, '');and not give any div id...in this case the game will be added directly to the body of the page... try it see if it works.
  13. thanks for the help....ill see if it works...
  14. so i am making a platformer and i'd like to achieve mario like kill mechanics.. like if the player jumps on top of a say demon the demon dies but if the player touches the said demon from either side - right left or bottom, the player dies.... just like in mario if mario touches the moustache creatures mario dies or even if they fall on mario, mario dies but if he jumps or falls on top of them, they die.....
  15. 1. if you want to remove everything displayed in the screen, you can use - game.world.removeAll();else if you just want to remove all displayed sprites of a group (and not delete the group itself), you can use - game.groupName.forEach(function(item) {item.kill();});2. phaser supports tilemap import, if thats what you mean - http://gametest.mobi/phaser/examples/_site/view_full.html?d=tilemaps&f=fill+tiles.js&t=fill%20tiles look around in the examples for more. you can import different tilemaps for different levels. use Tiled to make them. you can also use different states for different levels. have a look in the 'resources\Project Templates\Basic' folder for a sample template for better understanding of the states. 3. i think they are already working on better collisions. 4. i couldn't find a way when i wanted it so.. i just took the necessary data (in this case it was player position and score) and sent it to a php file and with that php file i save it to the db. so while loading the game if the player enters his username i check if he exists in the database and if yes i fetch his data and apply it... -- P.S. this IS a really good engine, 3-4 days in i have made like 3 good small games that i wanted to make since forever. and now i am working on a big one.