-
Content Count
23 -
Joined
-
Last visited
About askariwa
-
Rank
Member
Contact Methods
-
Twitter
askariwa
Recent Profile Visitors
1004 profile views
-
Great work Hexus, i really like the sprite scale support, btw i think you meant May (not June 2017). Any thought about what you're thinking to add to the v0.3.0 ?
- 32 replies
-
- slopes
- sloped tiles
- (and 6 more)
-
askariwa reacted to a post in a topic: Phaser Arcade Slopes Plugin
-
askariwa reacted to a post in a topic: Phaser Arcade Slopes Plugin
-
askariwa reacted to a post in a topic: Shoebox Configuration File for exporting atlas for Phaser
-
Could anyone tell me why the p2 physics example don't collide with world bounds ? I have tried to add game.world.setBounds(0, 0, 1600, 1200) before game.physics.startSystem(Phaser.Physics.P2JS) but moving the player to the left keeps moving him out of the screen. :-( Updated : i had to add instead game.physics.p2.setBoundsToWorld(true, true, true, true, false); after "placing" the player sprite just as the example here http://phaser.io/examples/v2/p2-physics/tilemap :)
-
askariwa reacted to a post in a topic: Phaser Arcade Slopes Plugin
-
Hi hexus, any thoughts about Circle body support ?
- 32 replies
-
- slopes
- sloped tiles
- (and 6 more)
-
Thank you for your suggestion VitaZheltyakov, i saw that i had to modify the update function by adding this (the second line keeps the body centered on the sprite) sprite.body.setCircle(45*sprite.scale.x); sprite.anchor.set(0.5*(sprite.scale.x/2));
-
askariwa reacted to a post in a topic: Arcade physics circle body scale
-
I tried to modify the Arcade physics Body scale example online this way : game.load.image('wizball', 'assets/sprites/wizball.png'); modifying the sprite in the create function like this: //sprite = game.add.sprite(200, 300, 'gameboy', 2); sprite = game.add.sprite(200, 300, 'wizball', 2); then adding this line after game.physics.enable : sprite.body.setCircle(45); and finally activating the debug in the render function game.debug.body(sprite); Why the circle body does not scale ? The only thing that scales is the sprite.
-
askariwa reacted to a post in a topic: Get tile value from a tilemap
-
Hi,what do you mean by "certain location" ? if the coordinates are given in tile values then you have to get the tile using the getTile method, if they are in pixel values then use the getTileWorldXY method. After getting the tile, you can read its index property to get its type or its properties public property to get its "properties" (defined in Tiled) See this example for tile properties.
-
askariwa reacted to a post in a topic: [Plugin] Arcade Circles
-
Ok, it was my fault My map had too many layers and i was expecting results from the wrong layer. I should have tried to use a simple tilemap with just one level because getTileWorldXY works as advertised
-
askariwa reacted to a post in a topic: Phaser Arcade Slopes Plugin
-
askariwa reacted to a post in a topic: Position sprites and player based on tile map
-
Hi, i am trying to get the type of a tile once clicked on but i get inconsistent results, i have made an example of my case here : http://jsfiddle.net/fkossyvas/7Lybhpda/ The code which displays the type is this one : this.currentTile = this.map.getTileWorldXY(pointer.worldX,pointer.worldY,32,32,this.layer); this.text1="pointer.worldX:"+pointer.worldX; this.text2="pointer.worldX:"+pointer.worldX; this.text3="currentTile index:"+this.currentTile.index; Any help ? Thank you
-
askariwa reacted to a post in a topic: How can i disable collision between a body and tilemap ?
-
I was using explosionsCollisionGroup after the code i've posted (i didn't wanted to make a long post) that's why but i just didn't saw missing the increment during the loop ! I am going to study your example, which seems to be exactly what i was trying to do. Thank you for sharing this stvrbbns and for your help
- 5 replies
-
- p2
- collision group
-
(and 1 more)
Tagged with:
-
I have finally defined the collision groups as i had to, at least i think var ship; var map; var layer; var cursors; var result; var tilesCollisionGroup; var shipCollisionGroup; var explosionsCollisionGroup; function create() { game.physics.startSystem(Phaser.Physics.P2JS); tilesCollisionGroup = game.physics.p2.createCollisionGroup(); shipCollisionGroup = game.physics.p2.createCollisionGroup(); explosionsCollisionGroup = game.physics.p2.createCollisionGroup(); ship = game.add.sprite(200, 200, 'ship'); game.physics.p2.enable([ship],true); ship.body.clearSh
- 5 replies
-
- p2
- collision group
-
(and 1 more)
Tagged with:
-
I am trying to modify the p2.js example (http://phaser.io/examples/v2/p2-physics/tilemap). I have added a group named explosions which i want to have it's members to collide with the ship but not with the tilemap. From what i've read in the forum, i need to use the collision groups but i cannot understand how (in this case). Using them for the ship is easy and think that using a loop could be ok for the explosions group but for the tilemap it's not that easy. I have read nearly all posts in this forum but i didn't find anything for this case. Any hint ? function preload() {
- 5 replies
-
- p2
- collision group
-
(and 1 more)
Tagged with:
-
Is it possible to apply a shader (filter) to a sprìte, get the resulting image and "send it again to the shader" , ie apply the filter to the new image ? I have already asked this question at the Phaser forum (here) but i have got no answer, maybe it can't be done ?
-
It's fine for me too, Chrome on Android.