Comments (4)
Yup, that sounds about right; though we'd also need to support collision between circles and polygons (and vice versa). But we can use circle-like polygons to do that, if needed.
Thanks for the links! They'll be super helpful.
Something else that may be useful is this library, which decomposes an arbitrary polygon into its convex pieces: https://github.com/schteppe/poly-decomp.js/
from hex-engine.
I don't know how the best pratices for raycasting are either, but I did develop one prototype for use with the Kontra game engine.
Here's the link for the demo, with the link for the code inside: https://kontra-experiments.netlify.com/
Also, a discussion about the experiments which may inspire you for other features: straker/kontra#136
from hex-engine.
Thanks for sharing! I will take a look. Hex Engine's raycasting requirements aren't exactly the same as Kontra's (since entities can be non-rectangular), but I can probably get some good inspiration from your Ray
class. Thanks again!
from hex-engine.
Yo! Pretty new to game dev, so excuse my ignorance 😅.
I've been doing some light research on collision detection. Would it be accurate to say that we'd want to support these three types of collision detection?
- Axis Aligned Bounding Box (detects collision between two rectangles)
- Separating Axis theorem (detects collision between two convex polygons)
- Circle Collision( technique that detects collision between two circles)
1
and 3
seem simpler to solve: MDN collision detection
2
seems a way more complex, but this lib looks promising.
from hex-engine.
Related Issues (20)
- Inspector improvements HOT 2
- Improve generated example HOT 6
- Display a spinner when creating a new project HOT 1
- Performance with many physics objects HOT 4
- Animated GIF component
- Issue with Mouse.insideBounds & rotated geometry HOT 3
- API Proposal: useContext HOT 10
- Typing errors when starting/building create-hex-engine-game project HOT 5
- Blocking call to window.localStorage
- Add a script to build a desktop game. HOT 1
- Do not include any inspector code in production builds HOT 1
- Document "StorageFor" pattern
- Image should support "repeat" pattern HOT 3
- Systems HOT 7
- Tiled: Support embedded tilesets in maps HOT 1
- Error in webpack when building in CI HOT 1
- Ogmo decals and entities are rendered with the wrong origin offset
- Ogmo 3.4.0 support
- ERR_OSSL_EVP_UNSUPPORTED with node 18
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 hex-engine.