Yeah thanks for pointing out the double head tag. I was doing that for a specific reason and forgot to take it off 😂

I finally figured it out! I’ll post about it later because I’ve been working on something that I think is pretty cool

Reply to this note

Please Login to reply.

Discussion

🤗

There's unused variable declarations, so I assume it's unfinished.

You forgot 'new' the line should be -->

var game = new Phaser.Game(config);

There's a few other things... And I'm pretty sure there's an extra } for no reason... Unless I counted wrong.

Yeah there are definitely unused variables. I coded this on my phone, so I don’t really have the best tools. And wtf, I left a variable named fart 😂🤭 I was supposed to remove that before sharing this publicly.

Otherwise it should be good. I have the new, but it’s kind of hard to see on here. Not sure about the extra } because my code doesn’t throw any errors and works as expected. I’ll DM you what I was working on so you can check it out

Running Nostr

//** Here I think this code includes all the necessary fixes to make it work properly. However, I haven't tested the functionality of the game, per se. **//

I'm missing a closed parentheses. And probably something else.

Missing ) in this section:

scene.anims.create({

key: 'run',

frames:

Should be:

scene.anims.create(){

key: 'run',

frames:

>> I think

That part looks okay. I think you may be mixing Phaser Arcade physics with Matter physics. This game would probably run better if I used arcade, but I’ve spent so much time working with Matter that I don’t really know all the functions of arcade.

Phaser is awesome if you ever want to get into 2D game development. It’s the new Adobe Flash, but written in JavaScript so it will always be compatible.

Maybe. I haven't played with phaser yet.

No leave the fart! Lol

😂😂😂 I kinda have to now, because it’s pulling the code from the note.

Hey I appreciate you trying to fix it, but it all works. I tried to run your code, but I’m getting a script error. It doesn’t tell me anything beyond that. I just use Textastic on my phone, so it doesn’t give me a lot of information.

Do you make games with Phaser too?

No. I just like messing with HTML.

What is textastic

Textastic is a text editor on iPhone that lets you run JavaScript. I sent you a DM. If you like html, I think you’ll like my website

Ok cool. I'll take a look.