Stephan_H

Members
  • Content Count

    9
  • Joined

  • Last visited

About Stephan_H

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you for showing me up. Look, I am just trying to meet you halfway. Nowhere in your github posts were chunks mentioned, neither looks like your plugin Pixi-tilemap ready for chunks, neither is the chunks method new which you already exhibited. As you have said, you are facing problems when zooming out which is why, I am just trying to meet you halfway.👍 I would like to do a "high-level algorithms" renderer, however yet I dont think that Pixi-Tilemap is ready for chunks, as there is an "overall 16k tiles limitation" (how should it be then possible to go beyond) and creating a tilemap can be simplified without bounding texture to it. tileset = new PIXI.tilemap.CompositeRectTileLayer(0, PIXI.loader.resources['atlas'].texture,true);
  2. I propose changing the way the renderer draws, as the renderer wont be able to draw more than 16k tiles per second. My renderer draws the visible part of the map when moving which means moving every tile forward, the renderer must draw the whole map again. I think a pc wont be able to draw all 500k tiles at once. Instead we can predraw a couple of chunks (32tilesx32tiles) sourrinding the visible part of the map. Like this ,the map appears smooth and big when moving, while the renderer works and predraws chunks at the area where the player goes to. And when zooming out, all chunks are scaled and simply moved and not drawn. What you would need to do is to put the limitation way higher or completly remove it, make a seperate function to prepare tile/ object images (json) for universal .addFrame. and introduce a function for the creation and deletion of tilemaps (chunks) in which .addFrame() is used I imagine functions like this chunk[a] = new Pixi.tilemap(); // I know these three functions already exist chunk[a].position.set(x,y); // when created or a tile in this chunk changes chunk[a].clear(); chunk[a].addFrame(tree.png,x,y,); // when it is to far away from viewport chunk[a].delete(); This is just a suggestion. Maybe you already have this idea.
  3. You have told that you will start upgrading Pixi-tilemap soon. Did you find time yet? And apart from that can you explain me how to hack Pixi-tilemap to improve performance?
  4. I found a new bug in PIXI-Tilemap, which is probably correlating to the tiles limitation of 16384 tiles. This time, I am adding a feature that objects will be shown as one big image instead of seperate layed together tiles like in:https://github.com/Alan01252/pixi-tilemap-tutorial I would like to add pictures to illustrate the problem, however this website won`t let me 😕 So I will briefly explain my assumption. The problem is that not all trees are displayed, altough the renderer perceives all trees which need to be rendered. Simply, a few trees of a dozen are displayed. Furthermore, when moving, these trees disappear at a certain point in the middle of the screen and other trees appear in the middle of the screen. Moving forward and back, this certain point for every particular tree is unchanging. When delaying rendering trees trough collecting all needed trees in an array and then executing rendering, more trees are displayed, but not all trees. This brings me to the conlcusion that the limitation of the plugin PIXI-tilemap is the cause of the problem.
  5. I have updated the pixi tilemap renderer. However it seems that the the .addFrame function has some sort of limit, as it displays at a certain point only a specific amount of tiles. Ivan, can you check the renderer, if I am not wrong please. Fully working renderer: https://github.com/StephanHQ/PIXI-Tilemap-Renderer
  6. When will you add that to pixi, because I could take advantage of these features
  7. Is there a way of changing the drawn tile size with tilemap.addFrame(png,x*size,y*size)? For example, instead of drawing 32px*32px tiles, the t.addFrame should draw 16px*16px tiles of the original 32px*32px tiles.
  8. Hi Ivan, Thank you for your reply. I was able to solve my issue almost. The bug was that drawn pixtures were not cleared. Alan could add that at drawTiles() before drawing: tilemap.clear(); Still the renderer seems to jump every draw time. Somehow the PIXI playground seems not to save my code. That's why I opened a githubg page: I can't use a tileset.png as I don't know how to use that correctly. A Json file seems to be easier. After that I will add a scale and a movement function to the tilemap renderer. Ill probably publish this renderer for others later that newbies won't have to waste too much time.
  9. I am creating a game, where a lot of tiles need to be rendered. My goal is to render with this method at least 500k tiles. Since the tiles won't be redrawn every time but moved, this method should work out. I am using the pixi-tilemap library to create a fast & simple renderer to render a dynamic tilemap. The renderer approves itself to work, but .position.set seems to pull the tilemap from the interface away. I know, the function .position.set does not contain the same parameters as the one of the demo, however this function also does not work with the parameters of the demo. Some parameters must be added. The tutorial I have been using this classic demo: https://github.com/Alan01252/pixi-tilemap-tutorial