Giter VIP home page Giter VIP logo

muffin-game's Introduction

muffin-game's People

Contributors

tassaron avatar

Stargazers

 avatar  avatar

Watchers

 avatar

muffin-game's Issues

Lifecycle for actors (beforeTick, beforeRemove?, beforeAdd?)

  • Actors should have beforeTick the same way that scenes do. This is undoubtedly useful as I wanted it several times while making Pipe Puzzle.
  • Opting out of tick() should be possible. When a container opts out of ticking, none of its children will tick either. This might be premature optimization, but most game engines do not tick every object on every frame so it's probably good practice ;)
  • Some actors like AnimatedActor could be built by a function that adds a few properties to an Actor and gives it a beforeTick func that animates.

Keyboard events

  • Remove keyboard from tick functions everywhere. Use an event based model for keyboard input instead. Actors/scenes can subscribe to an event and have a function called when the event triggers.

Resize events

  • Pixi.JS has resize events. Scenes should be able to adjust their contents in response to a resize event.
  • Percentage-based or viewport-relative units should be used when moving actors on the stage.
  • Perhaps something like isLandscape and isPortrait would be useful as layouts often change drastically depending on which dimension is largest maybe in future

Test scenes

The scenes in /examples are my current (manual) tests.

  • Rename /examples to /tests
  • Create simple test scenes for each type/combination of scene with some uncomplicated actors
  • Create test scenes for each combination of actors and actions

That's the simple part.

Eventually, figure out how to do automated testing of Pixi.JS and build support for that into this project. But that's the hard part :)

Actor management

  • Adding actors to the scene after instantiation of the scene object should automatically add them to the mounted container. Perhaps addActors could take an optional argument for a parent actor (or subscene?)
  • addActor variant of addActors
  • Actors should tick their children automatically
  • Maybe I should strive for consistency with lifecycle methods and use actors.add() instead of addActors?

Scene transitions

  • Ability to pass a function to game.changeScene which could do a transition (e.g. fade alpha value) before changing scene. Maybe by adding it to the beforeMount lifecycle on the scene being changed to?
  • Similar to how keyboard is disabled during transitions to/from PauseScene: interactivity with taps/clicks must be disabled during most scene transitions and briefly afterwards

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.