Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recreate the factory animation from https://github.com/46bit/rts #14

Open
46bit opened this issue Aug 27, 2020 · 1 comment
Open
Labels

Comments

@46bit
Copy link
Owner

46bit commented Aug 27, 2020

RTT is an in-browser recreation/expansion of a game I built in Ruby named RTS. One thing RTS does better is the factory animation. See how the factories 'glow' as they create new units:

https://github.com/46bit/rts/blob/master/preview.gif

This is really pretty and can be done with a simple shader, a bit like how health bars work. Do it!

@46bit 46bit added prioritised Things I plan to work on soon enhancement New feature or request labels Aug 27, 2020
46bit added a commit that referenced this issue Aug 30, 2020
In https://github.com/46bit/rts, factories had a solid border colour
with a varying inside area. The inside area changed colour to
visualise the progress of constructing a new unit.

This commit experiments with replicating it in WebGL. A few issues:

  - Right now I use a perspective camera, not orthographic. This is
    so that I can reuse CameraControls, a nice library for users to
    move the camera around. But the perspective is visible when
    meshes are being visually layered at different layers from the
    camera.

  - This really shouldn't be done using multiple meshes. It should be
    done using a texture and then a custom shader. But I don't want
    to open that pandora's box quite yet.

So I'll leave this for later. Saving this work as a record of how to
do custom shaders and notes above.
@46bit
Copy link
Owner Author

46bit commented Aug 30, 2020

Doing this well requires learning about textures, and using that in conjunction with a custom shader. I'm going to leave that alone for now. More details in https://github.com/46bit/rtt/compare/animated-factories.

@46bit 46bit added idea and removed prioritised Things I plan to work on soon enhancement New feature or request labels Aug 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant