Particle System in THREE.js - javascript

I am making particle System in THREE.js by using SPARK.js, but the problem is that I am done with the code that is needed for the particle System but I am unable to see any thing on the screen related to the Particle System.
I am making a flame in THREE.js but I don't know why flame is not showing in the world.

You can take look at Three.quarks!. It's one of the best particle system engine for three.js. It supports texture batching, physics engine integration and everything else.

Related

How can I mesh a point cloud in Javascript

I need to mesh a point cloud and create an stl file in Javascript. I see several python packages that will do it. But none in Javascript. I used open 3d and got great results. But again... Python. I also tried three.js, but it can only create a mesh using convex hull and that is not detailed enough.

P5.JS 3d how to pre-rendering

My project is to complete our Computer Science Final Project. Our teacher forced us to use the P5 framework to write games on the web for the Final Project. I don't want to write a 2D game because it is so easy.
So I tried to use P5.js to imitate Minecraft to write a game as my Final Project (our teacher said that I can imitate the existing game modes and ideas, just to ensure that the code is written by myself.)
Because the single-thread performance of P5.js is too poor, and the block does not support multiple textures, I can only use a plane to draw the block, but this causes my FPS to be seriously reduced. Drawing 10 * 10 blocks will reduce the FPS to 80 about.
I want to ask whether p5.js can pre-render frames, or how to directly operate webgl?
I can only use p5.js because our teacher does not allow our final project to use other frameworks to write web games.
The FPS in the following display is the number of frames per second of the draw function of p5. Since P5 can only draw graphics in Draw, and this is a serial drawing, when the drawing function takes too long, it will reduce the FPS. I The Minecraft to be imitated may require a field of view of at least 50x50-80x80 blocks, which is not a block underground.
If I have 9x9 blocks, I will get 144FPS:
If I have 20x20 I will get 88FPS:

How can I render realistic in A-Frame

I import model to a-frame with obj and mtl like this :
<a-obj-model src="models/ladybug.obj" mtl="models/ladybug.mtl"
scale="0.03 0.03 0.03"></a-obj-model>
How Can I render this model in a-frame with realistic quality like vray in c4d or similar render engines
A-Frame is meant for building VR experiences, meaning the renderer (three.js-based) must run at >=90FPS. The three.js WebGL renderer can give very good results (examples: https://threejs.org/), but is not the same as slower non-realtime renderers like C4D provides. Those renderers are not able to run fast enough for VR, and are not supported by A-Frame.
If you want to do that type of high-quality rendering on the web, you will probably want to use three.js directly, instead of A-Frame, along with one of the third-party pathtracing renderers. See thread here: https://twitter.com/alteredq/status/932729847301967873.
It's possible that someone could create pathtracing extensions for A-Frame using those renderers, but that's probably a significant amount of work.
If you are asking how you can get the highest-quality rendering possible within the limits of VR and A-Frame support, then learning about using modeling tools and PBR materials is a good place to start, but that's too broad a question for Stack Overflow.

Is phaser capable of large multiplayer games?

Newbie here. I am working with phaser, specifically with the isometric plugin.
I would like to know if it is possible to create games in phaser similar to agar.io, in terms of handling real-time multiple connections, generating a enormous map with about 300 players in it and all this without having too much impact in game performance. I seriously don't know how to handle the multiplayer part (probably sockets, node.js) for it to work really well. And as for generating a really big map I am quite blank too.
Is it possible, in phaser, to create a isometric-type game that handles multiples real time multiplayer and HUGE maps that are generated when the user gets to the edges of the visible "map"? How?
If not, what should I opt for (game engine in js and other applications) in order to achieve what I want?
You're not asking the right question, but you're close!
Your first guess is correct. You wouldn't handle multiplayer with Phaser, you'd use web sockets, or nodejs, or some other backend. So Phaser does not really limit you in what you can create with regards to multiplayer, since none of the networking code has anything to do with Phaser.
The idea of handling a huge map also just depends on how you optimize your graphics, regardless of what platform or framework you're using. For example, if you have huge or infinite maps, you can always just only show what's on screen, or around the edges of the screen, and use object pooling to show the rest of the map as the players move.
For multiplayer in Nodejs, check out Socket.io. It's really easy to use. I've set up a barebones example using it here. And in case you might find it helpful, here's an open source game I made for Ludum Dare in Phaser, with networking (this one is only p2p, so it's only made to handled 2 players connected to each other, but like I said, that's only a limitation of the multiplayer framework I used, in this case peerjs.com, and has nothing to do with Phaser itself, which can take care of all your rendering and game logic needs.)
Hopefully this helped answer some of your questions!
Phaser (at least in its 2.0 version) is not a good candidate for implementation of real time game networking as explained here.
If you're looking for a Javascript Multiplayer game engine you should check out Lance, which was written specifically for this purpose. You can then choose a renderer of your choice (Pixi.js, for example, if you're aiming to implement something like Agar.io. It's the same Renderer Phaser uses)
Regarding PhasedEvolution's comment above - Firebase is a nice tool if you're doing turn based games. It's not up to par for real-time game development as it doesn't allow low level access for any game-critical features that mitigate latency like client-size prediction, bending, interpolation and extrapolation.
Proper disclosure: I'm one of the co-creators of Lance :)

How to Implement web worker for stemkoski example

Stemkoski made an example which uses a particle system in Particle Engine. I am looking to use the logic for the candle, but will be making multiple candles and the frame rate tends to drop with just the single instance in his example.
Looking online, I came across another example of a particle system, but on a much larger scale by Ian Webster. One of the things he talks about using is web workers to prevent the UI from locking up and it seems to be the best way to go (from what I can tell).
I have tried breaking down some web worker examples, such as This, and implementing the logic into the particle engine, but I am not having any luck. Anyone know if this is even the best way to handle a larger load of particles and particle systems? And if so, what would need to be done for this situation?

Categories

Resources