Jump to content

VizuaaLOG

Members
  • Content Count

    14
  • Joined

  • Last visited

  1. Hi JeZxLee,I am assuming you are running your game through some kind of server so that asset loading etc works, so you could use Ajax to load the text file then split the returned string. If I am not mistaken then below is one method var xmlhttp = new XMLHttpRequest();var myData;xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState === 4 ) { if(xmlhttp.status === 200){ myData = xmlhttp.responseText.split(" "); } else if(xmlhttp.status === 400) { alert('There was an error 400') } else { alert('something else other than 200 was return
  2. What version of android do you have? In my research I found that it is apparently an issue in 4.3+
  3. Hi everyone, This isn't strictly a phaser or cordova issue but I was wondering, anyone here who have published a HTML5 game to android using cordova or something similar how has the performance been? The game I have been working on recently is very sluggish once it is running on an android device. I have spent hours researching and it is apparently a bug in the webview on android, which cocoonjs appearenly fixes with its webview+ but that had the same affect. I tested my game which just has simple tweens and some maths on a Galaxy S3 Mini which isn't the most performant of devices and so I t
  4. Yes, I looked at the example you provided and decided to experiment and indeed what you said is correct, except I don't need to get the bounds of the circle like the example does with the rectangle instead the intersects function on the circle class just takes two circles, and so I created a two for loops to loop over each alive circle and then each alive circle again and see if any are intersecting, apart from its self, if they are then they have collided. Thanks for your answers to help come up with the solution much appreciated.
  5. I have tried that as well but because all the circles are in one group it seems to count the entire group as being overlapped even when there is only one circle on the screen. Its like Phaser counts a group as being the full size of the stage and so the circle is always overlapping the group. Edit: looking at the example I see that is without physics which might work. Although is there a way to use circles instead of rectangles for the bounds? As using rectangles would mean a collision would be made even though it wasn't.
  6. Hi all, In my game I have circles which are spawned and then are tweened over time to adjust their scale. This is working however, I want to detect when two circles collide and run a function when this happens. All the circles are in a group. I have tried using arcade physics however after researching I found out that collision detection only works if the sprites have motion, and mine do not they are just being tweened, arcade physics also doesn't have a circular hit box. I then decided to look into P2 physics which does work and the collisions are detected, however, it causes the circles
  7. Could you not disable the checkWorldBounds and outOfBoundsKill parameters on the sprite?
  8. Not sure where it is but I think I remember seeing somewhere in Phasers docks a way to speed up the game. I think its under the time section, I'll see if I can find it and update this post if I do. Edit: No, maybe not I must be getting confused with another framework.
  9. If you know how many tweens are going to be called you could create two variables, one for the total tweens and one for completed tweens. And then after each tween completes increment that number and check to see if the two variables are the same, if they are then all of your tweens have been completed so you could then run the code or call the function now they have all finished.
  10. Yes, I understand your last point it could mean that a lot of time is wasted trying to find a position to spawn the circle. If I understand what you are saying correctly I would create an array and then have x and y positions for different spawn points. Like below: var spawnPoints = [ [x, y], [x, y], [x, y], [x, y]];But I think wouldn't it also be good to have each spawn point as an object which can then have a value such as available which would be true or false, this way I can just make the spawn point true or false if its available, then on the sprite I could have a reference to
  11. Hi Phaser Devs, I'm having trouble with something in the game I am currently creating. The concept of the game is that circles randomly spawn on the screen and begin to grow in size, this I have achieved using a tween object to scale the sprite. However the game is about taping the circle to get points, the bigger the circle the more points you get, but if two circle collide then it's game over. The problem I'm having is checking to see if the space where the circle wants to spawn is free, otherwise it would spawn on an existing circle causing the game to just end even though the player had no
  12. Sorry for the late reply. Glad it solved your problem . About your grass issue, I did some googling and found out the sprite object has a method to bring it to the top of the display list. Not sure if this will solve your issue as I haven't used this myself. Here is the documentation for the method http://docs.phaser.io/Phaser.Sprite.html#bringToTop
  13. I've been learning Phaser as well so this kit be wrong but I think you just have to make sure you render the ladder before rendering the player. Because of how canvas works the last rendered thing will be on top. Don't think there is a option to change this when it has already been rendered.
  14. Hello Phaser Users, I have recently started using Phaser after buying Thomas Palef's Phaser book. I was just wondering if Phaser supports a way of interacting with the audio. What I want to try and do is have a tween occur when the audio has a low bass e.g. a bass drum. I wan't to have a kind of pulsing effect on the game when the music hits that part. Not sure if this can even be done is JS but ah well. I also have experience with javascript so be as complex as you need Thanks, Tom
×
×
  • Create New...