GithubHelp home page GithubHelp logo

evade's Introduction

melonJS TypeScript Vite Boilerplate

melonJS Logo

License: MIT

A simple TypeScript Vite based boilerplate to create games with melonJS, built with :

Prerequisites

Ensure you have Node.js installed, then install all the build dependencies in the folder where you cloned the repository :

$ [sudo] npm install

Usage

  • npm run dev to start the dev server on watch mode at localhost:5173.
  • npm run build to generate a minified, production-ready build, in the public folder

if everything goes well, on running the dev server for the first time you should see this : boilerplate-helloworld

Folder structure

src
└── data
│    ├── bgm
│    ├── fnt
|    ├── img
|    ├── map
|    └── sfx
└── scripts
|    ├── renderables
|    └── stage
├── index.ts
├── index.css
├── index.html
├── manifest.ts
public
├── data
│    ├── bgm
│    ├── fnt
|    ├── img
|    ├── map
|    └── sfx
├── build
|    └── index-xxxxx.js
└── index.html
  • src
    • the root folder for your game source code
    • The entry file is index.ts.
    • index.css and index.html are default templates that can be customized
    • manifest.ts is a list of asset to be preloaded by melonJS
  • src/scripts
    • add your source classes here
  • src/data
    • where to add your game assets
  • public
    • where the production-ready build files will be copied/generated when using npm run build

Debug plugin

The boilerplate include the melonJS plugin, and will automatically import and instantiate it when running under a development environement.

the Debug Panel is hidden by default and can be displayed using the "S" key, see here for more details about the plugin.

Questions, need help ?

If you need technical support, you can contact us through the following channels :

  • Forums: with melonJS 2 we moved to a new discourse forum, but we can still also find the previous one here
  • Chat: come and chat with us on discord
  • we tried to keep our wikipage up-to-date with useful links, tutorials, and anything related melonJS.

Thank you and Final Note

  • Thank you @edmundg for providing a first version of this TypeScript x Vite boilerplate
  • TypeScript support in melonJS is still a work in progress, if you notice any TS definition missing you can use @ts-ignore to ignore the error message for a specific line, please then please report it here
  • if you wish to request for a missing feature in the boileplate, open a ticket here or submit a pull request

evade's People

Contributors

liorp avatar

Watchers

 avatar

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.