Painting visuals over a whole layout

0 favourites
  • 5 posts
From the Asset Store
Paint the drawings the way you like, with 77 colors to make various paintings.Have fun and in the end save your painting
  • This is less of a technical question and more of a problem-solving one. But it feels possible, and perhaps someone else has already solved it?

    At present, I have a platformer game with a map made out of tiled background objects for collision purposes. Now I want to add actual visuals to it.

    I started by making sprites of various sizes to cobble together. Works alright, but I believe there might be a faster way. And one which it seems some other similar games have used.

    Basically, I'd like to get a scale-accurate image of the layout as it stands, with all of the collision objects, and export it so that I can take it into an image editor and paint over the whole thing. Or something to that effect.

    I reckon it'll make for far more cohesive and less repetitive visuals than cobbling together individual sprites. The workflow will probably be faster, too.

    Is there any way to do this, or achieve something similar to this?

  • In general it is not possible to design levels as one huge image, as it wastes too much memory. In practice virtually all games use composition of objects for level design instead. This is described more in the old but still mostly relevant blog post Remember not to waste your memory.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah, very well. I'll just have to make lots of pieces, then! (Ones I can smartly reuse without things looking repetitive, of course.)

    Thank you for the quick response! :)

  • A cheap or old graphics card might have 256mb of VRAM.

    Ignoring optimal and effective... I actually wonder what the limit is nowadays with a high-end graphics card. Or even lower-end graphics cards nowadays come with 8GB of vram, surely it's possible to make a moderately sized layout with a bunch of big images, no? 4k textures aren't exactly a new thing, so loading in like 16 of those per layout should be possible? It's not that unusual that modern games require like 4GB of VRAM minimum. How big could they possibly be? Even assuming 64mb uncompressed per 4k image * 16 images is 1GB, that seems like childs play for modern standards. And that would result in a 16384 x 16384 layout.

  • The blog is from 2013 so parts of it, like the reference to a 256mb VRAM graphics card, is out of date! It's overall point is still relevant though: composition is better than large images.

    You could go a lot further with large images on modern systems, and unified memory systems are more prevalent these days (where there is no separate VRAM and the GPU re-uses system memory, perhaps with an additional dedicated cache). However it still won't scale: no matter how many gigabytes of memory you're willing to use, composition can extend to essentially an unlimited extent, whereas a single drawn image will exhaust memory at a far smaller size, so it imposes tighter limits on the level size. Then there's the fact you have to split everything up in to tiles to work around the maximum texture size (4096x4096 tiles for best compatibility) which is inconvenient. A single tile at 4096x4096 is about 67 MB in memory. If you make a 10x10 grid of them (approx 40k x 40k pixels) you have already used well over 6 GB of memory, so your game will probably already crash on systems with 6GB RAM or less, and that's not including the memory requirement of everything else in your game. With composition you could make a same size level probably well within 500 MB RAM. It would probably render faster too as there'd be less pressure on GPU memory.

    Realistically for broad compatibility I'd avoid going over 1 GB RAM for the background alone, which as you noted limits you to about 4x4 tiles of 4096x4096, or approx 16k x 16k pixels. I suppose that could be enough for some games. So perhaps it is a somewhat more viable option these days within reasonable limits. However I wouldn't be at all surprised if it runs poorly, especially on weaker devices; if it's at all possible to achieve the same by composition, it's far more efficient, both on memory use and runtime performance. It also depends on how willing you are to have demanding system requirements for gamer-style GPUs with loads of dedicated memory, or compatibility with mobile devices and general web browsing.

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