Jump to content

Gravix

Members
  • Content Count

    3
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Gravix reacted to phreaknation in Phaser Web Components UI Plugin   
    tl;dr:
    An HTML based UI component system for phaser. MIT License, and links to pretty pictures and videos at the bottom.
     
    So I have spent the last week or so working on a new way to handle ui components with Phaser. Most of the UI plugins out there are created with Phaser which means Phaser not only has to handle the game but the UI as well. Meaning that Canvas/WebGL has to handle both the game and ui. With other games platforms versus web games this is not an issue because performance is expected so the systems typically are beefier. With web games the games can be played on anything from an older tablet to an Lenovo Thinkpad to a raspberry pi. So the systems that these games can be played on can be lacking in power.
     
    As a developer you want your game to utilize as much of the accelerated GPU as possible. Chrome and other web browsers tend to offload Canvas and WebGL rendering to the GPU. While some aspect of html nodes, most of which are minimally impactful as opposed to the Phaser created ui components. This is where this plugin comes into play.
     
    Introducing Phaser Web Components. A growing library of HTML based elements to handle all of your UI needs. You can use your standard HTML elements to create your UI as well as use the custom components that are packaged as well. One of the great features is that you can attach these components to Phaser game objects and they will move with the objects on screen and the disappear when the object no longer is on screen.
     
    Already there is a lot of power with this library and it is barely a week old. First off, its free. Not just free to use but you can customize the library how you see fit with the MIT license. You can create your own custom components and if you wish to give back you may even create a pull request and share your work with everyone else. Also, each component has minimal dependencies and some only depend on the base web component which means you can build the library for your game and cut out any fat with ease.
     
    Documentation is a thing that it is currently lacking. However, with each control I release I update the wiki page for that control with the base code to get that component up and running. At the moment it is light but expect the documentation to grow over time.
     
    I am also at the constant keeping things up to date with the release chart so that way people can see what to expect with things coming down the pipeline. Also if you wish to see work done on a component that doesnt have a release date yet, to see if it can be focused on, or if you have a new idea for a component then you can request that through the issues tab in github.
     
    With all that, if you wish to see it in action, below are some links to screen captures of **some** of the components that are already working.
     
    GitHub link
    Damage Indicator
    Name Plate and Stat Bars
    Marker
    Window
    Volume bar
    Video Player
    Avatar
    Icon
    Screen Splatter
    Component improperly loaded
  2. Like
    Gravix reacted to kodyrouse in Calculate needed y velocity for given y point   
    This answer worked for me (answer I got from Stack Overflow)
     
    height = velocity^2 / (2 * gravity)
     
×
×
  • Create New...