• Content Count

  • Joined

  • Last visited

About ReleeSquirrel

  • Rank

Contact Methods

  • Twitter
  1. Yeah that's definately what was wrong. Say, you're the one putting this whole thing together, do you have any advice for creating groups of game objects outside of the world space to be added all at once? Or would you say that's a bad idea to begin with?
  2. Hello there! Welcome to Learning Phaser with Relee. I'll be learning Phaser for some time, and you lot reading this get to help me out and/or learn from my mistakes. First up, I've already done the basics. Hello world and all that. It's very nice to put an image on the screen, but there's not much to do with it. I'll mostly be focusing on top down games reminiscent of the original Legend of Zelda for the course of my learning experience. It's a game style I think Phaser is particularly suited for. As such, I'll have to do certain things. I'll need to have a little man run around the world. I'll need to have a world for the little man to run around in, that's not empty.Those are the basic goals we'll be starting with. We'll worry about enemies and fighting later. I'm pretty confident about my ability to make a little man who walks around, both from the tutorials and examples, but I'm not so confident about the levels. What is a level? A miserable pile of tiles! I want to be able to plop and pluck a pile of tiles from world space at a moment's notice. As such, my first experiment will be trying to make a group of seperate game objects operate as a single whole. Near as I can figure, that's what the Group class is for, isn't it? There's 21 examples of grouping, so hopefully I'll be able to figure it out. First up I'll copy some of the basic code to get Phaser up and running, then I'll follow this example to try and make a group: I worry though, since the example seems to be meant to draw ten sonics at random and it only seems to draw one in the top left corner... Anyways the first thing I do is create a game object, and the second thing is preload my image in the preload function handler. In this case, it's a zelda style block I made a long time ago. Next I make a variable to hold the group, and after that I create a new group object and assign it to that variable. Then I add a bunch of new sprites to the group. Odd, it doesn't have any code where the group is put on the screen. Is it normal for groups to immediately be in world space? Oops, now I've got an error in phaser.min.js "Uncaught TypeError: Cannot read property 'style' of null" it says, at line 7. Maybe if I use the regular Phaser.js instead... No, as expected it has the same problem. My experiment hasn't deviated in any significant way from the example. I wonder what could be wrong? I'll start commenting out bits until I find the problem code. First everything, to make sure it runs fine with just phaser... yeah that works fine. Next creating the blank game. ... Huh, that's it. All it takes is this line to get that error. var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create,update:update });copied straight from an example, too. I'm not sure why this could be happening. I did update to the newest version of Phaser that was released today. I'll go back and try the more basic "Hello Phaser" example using the new Phaser. Okay, Hello Phaser works fine. There's one notable difference between it and my program, the whole thing is encapsulated in a window.onload function, so I'll try that. Nope, no difference. It just doesn't make sense! Why is this happening on one and not on the other when there's so little functional difference between them? I'll try copying over the game instantiation from hello phaser and see what happens. And that worked. So, what's wrong with my game instantiation? I've added a space in the json bit to match, and removed the name, and that seems to have done it. Very frustrating. This is what it looks like now: var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });Alright then! Now I'm going to uncomment all the other stuff and see what happens. It works fine! That's great. What a relief. I'm still not sure what was causing that bug earlier, if it was having a name in the '' or having no space between update:update but it's fixed now thank goodness. Nothing worse than an error that you can't figure out the cause of. I've gone ahead and put my eight tiles in the middle of the world space to demonstrate that groups can be moved together, and I'm also increasing its rotation to make it spin. Nice work on the rotation, guys. Very smooth. That satisfies my need for moving groups, but it raises a problem. Why are groups automatically rendered in the world space? I was hoping to have something like an array of groups representing different rooms, and plopping them down into world space as the player moved about. What do I do? What's your advice? I'll check it next time on Learning Phaser with Relee. For now it's naptime. Watch today's example spin around here:
  3. Yeah that's what I figured. I got another mac user to try it and it was fine. It's my friend's curse, he's always got messed up stuff going on. I wonder what it could be, though. At this rate he can't play any phaser games.
  4. So I was all excited to make games with Phaser, and I decided to show my friends the Phaser Breakout example on the front page news. Works fine for me and my other friend using Windows, but my friend using a Mac has his whole computer crash. He returns to our skype call freaking out because his Mac made scary noises and force quit. In his words "Basically, sound cut off, screen went grey, and up popped a message saying "You need to restart your computer, hold down the power button to restart." I had him load one of the examples from the examples, the one with einstein moving right, and it crashed again, the same. I was really confused and worried 'cause how in the hell is HTML5 Canvas crashing his mac? He uses the latest version of Firefox, same as me, and it works fine for me of course. I had him try Mozilla's BrowserQuest, an HTML5 based mini MMO, and it worked fine. Whatever is going on is a Phaser problem, apparently. Does anyone else here have a mac? Any idea how this is even possible?
  5. I was just using this example to show my friends how great HTML5 games are, how they don't use flash and whatnot. It crashed my friend's Mac, and he refuses to try again to see if it happens again. How do you crash a mac? Does anyone else here have a mac?
  6. Alright. I'mma take the examples off my server since I can use the examples someone else uploaded. I'm making progress anyways.
  7. I found a link to the examples uploaded by someone else linked in the 1.1 update notes. It doesn't answer my question but it does solve my problem. Incidentally, Invaders is totally bugging out for me. Anyone else? The enemy shots spawn but don't go anywhere, and after a while the explosions stop despawning or animating.
  8. I'm having some trouble with the Phaser examples. I uploaded them to my web server but any time I try to look at one of the examples, I get a error like "Unable to load basics/01 - load an image.js" and I'm not sure what's wrong. I've got them uploaded at if anybody wants to take a look.
  9. Hello! New Phaser user here. Going through this tutorial: Did you know that Phaser 1.1.2 doesn't have a helloPhaser folder in its docs folder? It's not in the examples folder either. I don't think it's anywhere...