Comments (3)
What would be the steps to implement this?
from flappy-svg.
Well if we're going to use Cannon.js (a purely physics library) , we can assume each of our characters and obstacles as some form of 2-D textured object. We can assign anisotropy properties to them using cannon.js where we can render each of their pixels (i.e map out every curve,edge corner individually) , instead of treating our characters bounded within a rectangle/square/circle. The collision detection and resolution will be handled by cannon.js.
How is this better? We can now create any form of SVG character with complex shape and geometry , load this image in Webgl using 'THREE.ImageUtils.loadTexture' and then render/store the image coordinates into a vertex array. Basically we're generating a geometry representing a parametric surface. This way collision detection will be as accurate as possible and in fact we can allow users to post their own SVGs can then create an algorithm to render out the coordinates. This will be challenging but the basic part above can be easily done.
A Demo (http://schteppe.github.io/cannon.js/examples/threejs_cloth.html). _Ignore the 3-D aspect of the demo _
from flappy-svg.
I feel like you like WebGL and because of this you would like to apply it.
My priorities are:
- The tasks should be easy like adding a file or a layer.
- The code should be beginner friendly.
- There must be at least two people who understand the code, one of them having the right to merge.
- It should work on smartphones, tablets, computers.
- some more that may not apply here.
Given these, you can
- create a demo with a background, a flappy and obstacles that renders it.
- just put collision detection into WebGL or whichever framework.
- do what you want.
Enhancing the current physics is hard, I guess, because gravity is pretty simple. Do you have in mind adding other physics simulations?
You can go ahead and implement whatever you like. If you keep my priorities in mind when adding features, I will merge it. If not, you may need to find another person to merge it. Also, both implementations may co-exist for some time and we could restructure the projects so both work.
from flappy-svg.
Related Issues (20)
- Create automatic build for Windows app HOT 2
- Keyboard Control HOT 4
- Travis is failing
- Refactor the credits page with jekyll HOT 3
- Remove a character's onclick function HOT 6
- Add loading animation HOT 3
- First Android app: loading of game takes a long time HOT 1
- Add travis build badge
- Make build fail when APK did not compile HOT 2
- Merge apps
- Why does this game has pathetic graphics HOT 3
- Game Over without touching any object? HOT 4
- Help page doesn't open in chrome browser HOT 1
- How to Play Link leads to Blank Page in Chrome!
- [ci] Build failure because of broken Play Store link
- No Sound in the github pages version of the app
- Typos in the hints readme file
- Not ending game when touching object HOT 2
- Error message HOT 9
- Bugs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flappy-svg.