00:00
00:00
PsychoGoldfish
I like turtles

Age 47

NG Code Monkey

Hard Knocks

Ur Mom

Joined on 9/26/00

Level:
14
Exp Points:
2,010 / 2,180
Exp Rank:
31,563
Vote Power:
5.60 votes
Audio Scouts
2
Art Scouts
3
Rank:
Town Watch
Global Rank:
47,834
Blams:
48
Saves:
131
B/P Bonus:
2%
Whistle:
Normal
Trophies:
57
Medals:
788
Supporter:
11m 30d

Comments

gonna be digging through this later, god bless ya PG

Thank you so much for this!

Thanks for writing this up, PG, Super helpful as always. I noticed two things as I was following along. First off, you wrote that the scene files should look like this in their directories:

C:\PhaserTutorial\htdocs\js\InitScene.js
C:\PhaserTutorial\htdocs\js\PreloaderScene.js
C:\PhaserTutorial\htdocs\js\GameScene.js

But if I'm following along correctly (which I believe I am) , they should actually be:

C:\PhaserTutorial\htdocs\js\scenes\InitScene.js
C:\PhaserTutorial\htdocs\js\scenes\PreloaderScene.js
C:\PhaserTutorial\htdocs\js\scenes\GameScene.js

So it looks like you just left out the scenes folder there.

The other thing is that for a while I couldn't get past the black screen even after setting up the InitScene, PreloaderScene, and GameScene scripts. Finally on a whim I added script src="js/main.js" after the phaser script src in the body of the index file and that got everything rolling. I'm not sure if you actually did say to do this in your post or if I just totally overlooked it, but yeah, that was a little hang up I had.

Good catch, I tottaly messed those bits up. Should be all up to snuff now.

this sounds awesome.. what about completely code-illiterate goons like me?

Get literate, duh.

Really cool! Thanks for posting this!

This comment pretty much confirms HTML5 Shark game right?

@PsychoGoldfish haha well maybe a baby shark game :D

Oh, I somehow deleted my old comment. Hm, I should drink less beers. :/

I disagree

I'm an idiot, didn't realise you needed to highlight the host code to make it work

I "kinda" fixed it, but for some reason not only does it show black boxes where the Newgrounds logo and play button are supposed to be, the one I built doesn't want to play at all. Is there something I'm missing this time?

Got 2 javascript games uploaded and just realized this exists. Thank you PG!