Tiles versus canvas: a lil test

This forum is currently in read-only mode.
From the Asset Store
Pixel Destruction like in "Worms" (Drawing Canvas based)
  • Just dropping some observations here...

    Display size: 1024x768, unlimited FPS mode

    a) Tiles

    32x32 sprites in 32 columns and 24 rows, total of 768 instances.

    VRAM usage: 0.00 MB (minimal)

    FPS (after a few seconds): 720-750

    Observation 1: Painful to work with (try moving 768 objects around in layout). PROBLEM: Prone to crashing with this amount of objects on the layout. May consider creating these at runtime instead (might increase loading time a bit, but hey.)

    Observation 2: FPS takes a slight dip the more different frames are shown by tile sprites. Faster to render same textures than different ones, anyway.

    Observation 3: This method may work better for dynamic tile replacements.

    b) Canvas

    1024x768 internal Canvas resolution (fills the whole display)

    VRAM usage: 7 MB (for the canvas object alone)

    FPS (after a few seconds): 800-810

    Observation 1: After pasting the sprite in tile manner and thus populating the canvas with varying textures, the frame rate took quite a dive (down below 400 FPS) and the VRAM usage is at 14 MB.

    Observation 2: Perhaps the best choice for static tiled terrain.

    Will post more as I test some more. I will be experimenting with various tile engine options.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Why not both?

    I know people probably get tired of me touting the benefits of distort maps, but the thing is its just so versatile.

    I recently realized that its possible to take an image like this:

    <img src="http://ronenix.com/wp-content/uploads/2008/04/oglrpg_4.jpg">

    And make an entire map out of just the one image using a distort map.

    Then for collision detection, you could just paste the sprite into the canvas and update its collision mask.

    Of course you would only want to make a simple background out of it, and creating an editor would be quite an undertaking, but the benefits would be very nice. The map could be just about any size, and your ram would be that of the the one sprite, and canvas. Once the map is generated, you could destroy the sprite.

  • The downside of tileset within one image is that it doesn't really leave you with much freedom of adding new tiles or altering existing ones.

    Anyway, it certainly is interesting, as you can use an existing tileset and replace it later. I was just exploring performance limits. Big canvas certainly is slow, especially on resolutions of 800x600 and larger (>512). Big advantage, it cuts the number of on-screen objects down dramatically.

    Yeah, seems using both is the way to do; canvas for background and sprites for, uh, sprites.

  • I'd like to see an example of this.

  • I almost never use canvax Oo should I?

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