Coder Social home page Coder Social logo

josephmbustamante / phaser3-typescript-starter-kit Goto Github PK

View Code? Open in Web Editor NEW
95.0 5.0 36.0 2.13 MB

This repository contains the code necessary to start making a game in Phaser 3 using TypeScript.

Home Page: https://www.youtube.com/channel/UCLzFt-NdfCm8WFKTyqD0yJw/

License: MIT License

HTML 7.60% TypeScript 77.77% JavaScript 14.63%
phaser typescript tutorial phaser3 phaser-boilerplate phaser-tutorial typescript-boilerplate

phaser3-typescript-starter-kit's Introduction

phaser3-typescript-starter-kit's People

Contributors

dependabot[bot] avatar josephmbustamante avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

phaser3-typescript-starter-kit's Issues

Huge vendors file

Hello @josephmbustamante ! Thanks for sharing this repository, I wouldn't be able to get phaser3 running so quickly with typescript and webpack without your code.

I have one problem - on clear repository I get 17MB vendors.app.bundle.js file. Do you know by any chance if this is some wrong configuration or is there a way around it? From what I understand, phaser3 by itself should only be ~6MB (and minimized around 1MB) and this is the only repository referenced in the app code.

yarn install does not work with node 16.0.0-head

I try to yarn install on node 16.0.0-head. I have to use this version because it is the first one that runs yarn without errors natively on M1 mac.

Output:

`yarn install v1.22.10
warning You are using Node "16.0.0-head" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
[1/4] ๐Ÿ” Resolving packages...

[2/4] ๐Ÿšš Fetching packages...

error [email protected]: The engine "node" is incompatible with this module. Expected version ">= 10.13.0". Got "16.0.0-head"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.`

Cannot find module

Getting the following error

$ webpack --mode development && webpack serve --mode development
[webpack-cli] Failed to load '/home/atlantageek/dev/phasergames/phaser3-typescript/src/boilerplates/webpack-boilerplate/webpack.config.js' config
[webpack-cli] Error: Cannot find module 'Phaser'
Require stack:

  • /home/atlantageek/dev/phasergames/phaser3-typescript/src/boilerplates/webpack-boilerplate/webpack.config.js

issues when importing third party plugins

Im having issues importing external plugins,
have had some luck setting the EsModuleinterop flag in tsconfig for some.

but there is one that keeps giving me:

'Module parse failed: Unexpected token ... you may need an appropriate loader to handle this file type'

I have made an example here:
https://github.com/hendrikras/phaser3-typescript-starter-kit

I have also raised this to the maintainer of the plugin in question:
mikewesthad/navmesh#46

Perhaps someone could weigh in on this.

Can you make this repo a template?

Hey. I would like to use your repo as a base for a template that I want to use in my game, and if you make this a template, my repo will have a generated from josephmbustamante/phaser3-typescript-starter-kit and people will know where most of the code came from.

I rather do that than simply copying and pasting your code into my own repo.

Thanks

License file?

It's currently impossible to know what the license of this project is.

typescript errors

I get numerous errors from typescript when I attempt to run the project. I'll list the first below and perhaps you can tell me what is going wrong.

ERROR in /home/gb/Sync/phaser3-typescript-starter-kit/src/main.ts
./src/main.ts
[tsl] ERROR in /home/gb/Sync/phaser3-typescript-starter-kit/src/main.ts(25,37)
      TS2345: Argument of type 'GameConfig' is not assignable to parameter of type 'Phaser.Types.Core.GameConfig'.
  Types of property 'input' are incompatible.
    Type 'boolean | InputConfig' is not assignable to type 'boolean | Phaser.Types.Core.InputConfig'.
      Type 'InputConfig' is not assignable to type 'boolean | InputConfig'.
        Type 'InputConfig' is not assignable to type 'Phaser.Types.Core.InputConfig'.
          Types of property 'keyboard' are incompatible.
            Type 'boolean | KeyboardInputConfig' is not assignable to type 'boolean | Phaser.Types.Core.KeyboardInputConfig'.
              Type 'KeyboardInputConfig' is not assignable to type 'boolean | KeyboardInputConfig'.
                Type 'KeyboardInputConfig' is not assignable to type 'Phaser.Types.Core.KeyboardInputConfig'.
                  Types of property 'capture' are incompatible.
                    Type 'number' is not assignable to type 'number[]'.

I can run another typescript phaser project I found so I think my environment is OK.

Any help appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.