GAZ082 Posted June 25, 2018 Share Posted June 25, 2018 Hi there. I just made a tilemap with an image which can be 200x200 px or 5000x5000 px, the result is the same: GPU usage above 60% and after a few minutes settles down to about 35% , even when doing nothing. I'm using phaser3 in Chrome under Linux x64 on an old Nvidia GTS250 card. Here are the main parts of the code, tried loading the main map as image and also as spritesheet: let config = { type: Phaser.AUTO, width: window.innerWidth * window.devicePixelRatio, height: window.innerHeight * window.devicePixelRatio, zoom: 1, parent: 'map', pixelArt: true, backgroundColor: '#4488AA', scene: { preload: preload, create: create, update: update } }; let game = new Phaser.Game(config); function preload() { this.load.setPath('http://localhost:8080/assets'); this.load.image('tile_set', 'worldMap.png'); also tried this instead of load.image: this.load.spritesheet('tile_set', 'worldMap.png', { frameWidth: tileSize, frameHeight: tileSize }); //also tried this } function create() { let tiles = map.addTilesetImage('tile_set'); let terrain_layer = map.createStaticLayer(0, tiles, 0, 0); } Any tips? Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts