Minimap performance question

0 favourites
  • 3 posts
From the Asset Store
Two types of minimap: "full map" and "player is the center" (square map and radial map)
  • Hello,

    I am doing a mini-map that represent connected levels. I was wondering what would be best for performance between..

    1- Creating a single sprite that show all the possibilities of connection. A level can have from 1 to 4 levels connected (left, right, top, bottom) so i though i could use 14 animation and then each frame would be the type of level showed on mini-map. This would take less objects in the screen at the price of maintenance. (Total of 144 minimum objects created for a 16x9 grid)

    2- Creating a sprite connector (1x4 pixels) for left-right and top-bottom and create one if the level have a connection with another level. So that mean that basically for each level 4 sprites connectors can be created for a total of 16x9x4 (576 objects created generated each time i draw the mini-map, i normally do it once the level is loaded and each time the mini-map change or the window is resized). This take less maintenance but at the price of performance... however.. does this will reduce a lots the performance ? (Total of 576 possible objects created for a 16x9 grid, minimum still 144 but with the connectors that can be up to 576)

    Thanks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • could the 16x9 grid be just one sprite, or tiledbackground - showing all the connections open, then add the connectors to close the ones that aren't open. Or if the map has more close connections than open ones then reverse that (have them all closed and only add the open ones).

    If the connectors are wide enough and centered between two levels, then one could do the job for both sides of the connection, cutting the number needed in half...

    I made a calendar app that could show up to 12 months at once, each month had 40 cells, each cell was a sprite and a text box. In total I had well over 1000 objects on screen and performance was fine.

  • Alright thanks! Nah it couldnt be just one sprite but i what i did is put 4 connectors as one sprite through reducing the amount of objects needed.

    Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)