Jump to content

SlimTim

Members
  • Content Count

    9
  • Joined

  • Last visited

  1. I have some trouble using the RenderTexture. I'm making a side scrolling game with procedural map generation. At this point I've got a working prototype of the map rendering, but it keeps adding new images, thus clogging the memory. Ideally I want to kill any image that reaches a negative x-value and revive new map tiles just outside the canvas (in the positive direction). At this point I'm wokring with my images via a group. Why RenderTexture? Well, since the map generation is randomized, I need to change the (sheet) frame of the image upon revival in order to change the map, RenderTexture
  2. I have successfully implemented a map generating algorithm that generates part of a map before the player reaches it. I add the new part of the map after the last made part: nextMapTileXValue = streets.getAt(streets.length-1).x + tileWidth;Now, nextMapTileXValue keeps rising when I move the player to the right. streets.getAt(streets.length-1).body.xSeems to return the coordinates within the game canvas itself, not the entire game universe (IE: never exceeding game.width). Now, how come player.x and player.body.x is always within game.width? Shouldn't player.x rise in conjunction with nextMapTi
  3. I realized that I need to set the velocity of the player in order to move, but that requires adding physics to the player which is pointless since no physics is used in the game. Is there a way to emulate velocity without adding physics?
  4. I just encountered this too. Indeed, setting the bounciness to something arbitrarily small fixes it.
  5. I upgraded to 13.10 which seems to have fixed the problem, upgrading my GPU drivers in the process. Thus, rich would seem to be right.
  6. So, I've begun fiddling with the tutorial example, but noticed that my fan was running a lot faster than it usually does. I checked the system monitor and noticed a CPU usage of around 50-60% when running the game code. This happens in both Firefox and Chrome. Is this normal? Any workarounds? It even slows down my code editor and other tasks. Sometimes it freezes for about 10 seconds, then continues but leaves the computer in a very sluggish state. - Scrolling vastly slowed down, programs shut down very slow etc. What is even more disconcerting is that nothing in the system monitor indicates
  7. So, I'm looking through the keyboard docs in order to find a function for buttons being pressed as opposed to being held down. Say I'm firing a bullet, I only want one bullet spawned per button press, regardless of how long the button is held down. I have achieved this with raw JavaScript earlier using a boolean: isButtonADown = false;if(buttonA){ if(!isFiringButtonDown){ console.log("Shot fired."); isFiringButtonDown = true; }}else{ isFiringButtonDown = false;}Is there anyting like this implemented in Phaser?
  8. I forked Phaser, local server up and running, everything's snazzy. Now, where do I place my game?
×
×
  • Create New...