[Request] Tiled BG Image Offset..again.

0 favourites
  • 10 posts
From the Asset Store
Elevate your games with our AI Chatbot Integration! Seamlessly connect your Construct 3 projects with GPT-4 for dynamic,
  • I've been trying to get Tiled Background's "Image Offset" from CC into C2 ever since it first came out. Some 15+ threads asking about it and it still hasn't been implemented! Yes there are some workarounds but they don't always work..it just depends on what you're trying to do. Anyway, perhaps now this can finally be added? Please?

    Some uses:

    -Infinitely Scrolling Backgrounds

    -Animated Tiled Backgrounds

    -Image alignment

    -(Most importantly) Tilesets! Currently you have to import a tileset into a sprite object as individual frames which results in a folder stuffed with hundreds of image files containing a single tile each. Not good! C2 actually crashes if you use "import sprite strip" on a tileset that's too big (and not that big either). It also takes a while to update them and can easily crash when modifying all tiles (shift+crop for example) The better way to do this is with Tiled Backgrounds and Image Offset so you can set the offset to a single tile from a single image in a single file. You'll get better load times too!

  • I would love a native way to use tilesets in C2. I don't need to make them in C2 as I already have a program (PyxelEdit, exports tilemaps in both XML and plantext/CSV, exports tilesets in png)

    All of those are features I would love in a tileset object, and I bet would improve performance over 100s of sprites with their own instances and collision vertices to check.

    That last part though, sprites crash C2 if they have too many frames? D: That's not good for my project that uses tiles.

  • Thndr I just meant C2 can crash if you use "import sprite strip" on an image that results in too many tiles. Fixed OP.

  • There's a code you can use:

    <img src="http://i.imgur.com/kNOmFzA.png" border="0" />

    Where the 50*dt is the speed and the 128-128 is the size of the tile. R0J0hound helped me a LOT last year with this!

  • You can do infinitely scrolling backgrounds without this, e.g. in the autorunner template. Also Sprites are better for tilesets - if you have crashes using them, you should report it as bugs and we can look in to fixing it. C2's spritesheeting on export will make them in to a few large images anyway, so you still get the fast download and low memory usage at runtime.

    The main reason it's not supported is while it's easy in WebGL, the canvas2D API for tiling images is completely flat out bonkers. I have no idea why they designed it the way they did, but it was a struggle just to get it working with scrolling, and a huge PITA to get it working with rotating layers, so I dread to think of wrestling it in to doing offsets. In the mean time there are workarounds, such as using masking layers or just sprites for tiles.

  • Sorry if this comes off as rude but that workaround is hardly a suitable replacement. Very limited, not very elegant, and won't work for many of the things I'm going for as stated in the OP :\ So basically it won't be added because it's a pain for Canvas2D? Does anyone even use that anymore? Can't keep letting one weakness drag everything else down with it..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Actually yes it is still being used. Especially if you target Windows 8, Windows Phone, and mobile platforms that may or may not support webGL.

  • If the future is HTML5 then its also webGL.

  • We'd love to drop the canvas2D renderer, but I really doubt we'd be able to for the foreseeable future. Old desktop machines with crappy drivers still get canvas2D, and although the percentage will be decreasing over time, it will probably be a couple of years before it's a non-issue. And then IE9 and IE10 would still need to die, which takes excruciatingly long with IE's release cycle.

    I'll take another look sometime, maybe I can get it working anyway.

  • We'd love to drop the canvas2D renderer, but I really doubt we'd be able to for the foreseeable future. Old desktop machines with crappy drivers still get canvas2D, and although the percentage will be decreasing over time, it will probably be a couple of years before it's a non-issue. And then IE9 and IE10 would still need to die, which takes excruciatingly long with IE's release cycle.

    I'll take another look sometime, maybe I can get it working anyway.

    remember iOs, which supports canvas2d is "a little" big:

    <img src="http://www.asymco.com/wp-content/uploads/2012/11/Screen-Shot-2012-11-26-at-11-26-10.11.11-AM.png" border="0" />

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