Open msteiger opened 10 years ago
Or it may be that we should skip drawing tiles at 2x2 and 1x1 and go straight to the city-rendering-view
On Fri, Feb 28, 2014 at 2:48 AM, Martin Steiger notifications@github.comwrote:
Currently, drawImage() is used to draw individual tiles. Using drawLine(), fillRect() or maybe setting raster data directly should be a lot faster for tiles that are smaller than 2x2 pixels.
Reply to this email directly or view it on GitHubhttps://github.com/MovingBlocks/FacadeAWT/issues/4 .
The cities renderer relies on two aspects: it uses the 2D (simplex noise) height map directly, which is a lot faster than creating actual chunks and extracting the height map from there.
Second, it uses an intermediate structure (the Brush) that just writes the block with the highest y value to a 2D array instead of creating chunks.
I think that both approaches are difficult to generalize and therefore won't work for other world generators. If that's ok, we can surely speed up the rendering a lot, but it will work for "Cities" worlds only. What do you think?
If you are willing to give it a try, that sounds good. Right now we don't have anything that works, right? So getting it to work with Cities worlds is a start.
On Fri, Feb 28, 2014 at 4:37 AM, Martin Steiger notifications@github.comwrote:
The cities renderer relies on two aspects: it uses the 2D (simplex noise) height map directly, which is a lot faster than creating actual chunks and extracting the height map from there.
Second, it uses an intermediate structure (the Brush) that just writes the block with the highest y value to a 2D array instead of creating chunks.
I think that both approaches are difficult to generalize and therefore won't work for other world generators. If that's ok, we can surely speed up the rendering a lot, but it will work for "Cities" worlds only. What do you think?
Reply to this email directly or view it on GitHubhttps://github.com/MovingBlocks/FacadeAWT/issues/4#issuecomment-36334758 .
Currently, drawImage() is used to draw individual tiles. Using drawLine(), fillRect() or maybe setting raster data directly should be a lot faster for tiles that are smaller than 2x2 pixels.