Comments (4)
Closing. After some considerations we are not going to add (official) pixi.js
examples. The implementation of Yuka is just not designed for a 2D game. The combination might work in certain scenarios but it's best to use a 3D engine.
from yuka.
Hey, really like the project!
Thank you for the feedback! Unfortunately, I'm not familiar with pixi.js so I'm not sure how easy it is to combine both projects.
The basic idea of using this library is to implement game logic via Yuka's game entity concept. A game entity can have a so called render component which is basically an object primitive of a rendering engine. For example an instance of THREE.Mesh
or PIXI.Sprite
.
You just copy the transformation of your game entities to your render components each simulation step and ensure they are nicely drawn by your selected rendering engine. This works properly with three.js
or Babylon.js
however pixi.js
is problematic since it's a pure 2D engine. Meaning it defines the sprite's position
in pixels/screen coordinates. In Yuka
, three.js
and Babylon.js
, the position values are defined in world units/world coordinates.
I actually don't know how to bring these two different concepts in a meaningful way together with Pixi.js. I've created a fiddle to illustrate the issue:
https://jsfiddle.net/s6mctj3r/4/
from yuka.
Interesting! I do see in the fiddle that the sprite's are moving around a bit, although I don't quite understand how. I will spend some more time fiddling with them and see if I can understand better. Thanks for illustrating the issue!
from yuka.
I do see in the fiddle that the sprite's are moving around a bit, although I don't quite understand how.
The problem is that the game entities position values lie in a range let's say [-50,50]
world units. Pixi interprets these units as screen coordinates/pixels which usually have a different range (check the app.screen
object). Hence, you see only a minor movement.
from yuka.
Related Issues (20)
- WanderBehavior within Navmesh HOT 2
- Efficient way to find an intersection HOT 2
- jsdoc contradiction to code in GameEntity HOT 16
- Steering handling in `Vehicle.update()` ignores `GameEntity.maxTurnRate` HOT 4
- how to judge arriveBehave over HOT 1
- how to set initial mesh HOT 1
- Request: Pathfinding 3D HOT 4
- Yuka and Babylon.js HOT 5
- Building navmesh HOT 2
- Question: Best Practices HOT 2
- Question: NavMesh HOT 8
- Non-terminating while loop HOT 5
- Is there any way to add obstacles dynamically on a 2D grid? HOT 3
- Building with webpack and es6 modules HOT 5
- SteerBehavior - Vehicle facing the wrong direction HOT 3
- How to generate NavMesh automatically? HOT 3
- NavMeshLoader for Typescript throw reference error for fetch HOT 1
- need explanation for this formula HOT 4
- YUKA findPath is not detecting any collisions in Babylon.js HOT 3
- Pursuit Behavor duplicate gltf model HOT 3
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 yuka.