ourcade / phaser3-dungeon-crawler-starter Goto Github PK
View Code? Open in Web Editor NEWA starter project for creating a Dungeon Crawler with Phaser 3
Home Page: https://ourcade.co/templates/dungeon-crawler-starter
License: MIT License
A starter project for creating a Dungeon Crawler with Phaser 3
Home Page: https://ourcade.co/templates/dungeon-crawler-starter
License: MIT License
Missing packages required to build;
npm install parcel
(required server to run the game - ##note:## see Additional Notes first if running on Windows)npm install parcel-bundler
(required to serve the game assets correctly - the urls will return HTML instead of their content otherwise)./src/index.html
to have the type in the script
tag on #7
like so (game won't compile without this);<script src="main.ts" type="module"></script>
index.html
file (missing tag causes the browser to run in compatibility mode)<!DOCTYPE html>
package.json
, change the script
entries that have --out-dir
to --dest-dir
(breaking change for parcel
)parcel-bundler
does not appear to run correctly via the standard command prompt. I was able to get a successful run by running npm run start
via bash terminal created from within VSCode (get Git Bash here), after installing parcel-bundler
from within the bash instance (installing from the command prompt does not appear to work).Hi, trying to make your project work - no bueno:
since you installed parcel with -g flag, i had to add it manually into project, so
npm init
npm install
npm install parcel-bundler --save-dev
npm start, i get warnings and errors in browser's console:
`phaser.js:74289 generateFrameNames: Frame missing: run-down-1.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-2.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-3.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-4.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-5.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-6.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-7.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-down-8.png from texture: faune
generateFrameNames @ phaser.js:74289
createCharacterAnims @ CharacterAnims.ts:21
phaser.js:74289 generateFrameNames: Frame missing: run-up-1.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-up-2.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-up-3.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-up-4.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-up-5.png from texture: faune
phaser.js:74289 generateFrameNames: Frame missing: run-up-6.png from texture: faune
[MANY MORE WARNINGS HERE]
[AND AT THE END, FOLLOWING WARNING:]
phaser.js:135325 createStaticLayer is deprecated. Use createLayer
[AND FOLLOWING ERROR:]
phaser.js:43946 Uncaught TypeError: Cannot read properties of undefined (reading 'texture')
at AnimationState.setCurrentFrame (phaser.js:43946)
at AnimationState.handleStart (phaser.js:43412)
at AnimationState.startAnimation (phaser.js:43392)
at AnimationState.play (phaser.js:43266)
at new Faune (Faune.ts:44)
at GameObjectFactory.faune (Faune.ts:243)
at Game.create (Game.ts:54)
at SceneManager.create (phaser.js:100338)
at SceneManager.bootScene (phaser.js:100218)
at SceneManager.start (phaser.js:100926)`
Game.ts shows errors in VSCode (Line 47):
map.createStaticLayer('Ground', tileset)
The error is on 'createStaticLayer': "Property 'createStaticLayer' does not exist on type 'Tilemap'.ts(2339)"
package.json phaser version:
"dependencies": { "phaser": "^3.22.0" },
is the same as what you're using, so why can't it recognize that method? Did you by chance upgrade without testing?
when i change 'createStaticLayer' to 'createLayer', i get the same warnings (except the last one), and following error:
phaser.js:43946 Uncaught TypeError: Cannot read properties of undefined (reading 'texture')
I suppose the parcel package didn't properly locate the files in the filesystem (i see you using the static files copy 'public' and cleanpaths plugin, i suppose the former fails to locate the files). Can you recheck and fix your repo? (or update your tldr installation guide).
Cheers hope this helps.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.