Tag Info

New answers tagged

0

Run the game like any other, calculate data on the client side as needed and simply overwrite when you receive packets from the server.


4

tl;dr You control how much data you are willing to process each frame. If a packet is too big, break it into smaller cells and process them one at a time (i.e one each frame). If you get a lot of small packets than split the group into chunks and limit the amount of information processing that is done each frame. The client does not need all the information; ...


1

I assume that when your network data arrives, its processing diverts enough CPU power to slow down your rendering process. Are you enforcing a constant framerate or are you just rendering frames as fast as you can? Assuming you have a constant framerate, you may chose when your network packets are processed. I mean by that that your websocket event should ...


0

The client is written with JS? If so, than you need to use some kind of async library to make network IO in backgraound. There is RxJS and many other (try google: reactive, async etc.). Also consider switch from JS to CloujeScript: some local guys are using it for kind of tasks you've described.


0

Here's how most people start out in it for "basic" terrain height maps ... Create my volume (voxel array). Generate a Y value for each x,z im interesting (terrain heightmap generation). Loop through a column of voxels from 0 to terrain height and set their values as "inside the volume" (on). Generate a mesh based on examination of the volume by looping ...


0

I found the answer to my question by experiencing. Take a look here to learn how to reconstruct position from depth buffer. As you can see, converting do view-space is a little cheaper. So that's what I chose. Position and Normals on view space. The only drawback is having to project your lights position from world to view space, but that's done only once ...


1

The normals would be generated based on the gradient of the density function at the same time that you get the intersection points between the edges and the surface. If it's something simple and closed-form like a sphere then you can calculate the normals analytically, but with noise you'll need to take samples. You have the next steps in the wrong order. ...



Top 50 recent answers are included