Tile with Variant

Get help using Construct 2

Post » Tue Jun 18, 2013 8:02 pm

@BluePhaze:
Yeah I thought about that earlier. It's a viable alternative, although not as visual in the editor so it might be difficult for the developer to imagine where the rectangles would be amongst all the other objects in the layout. And as you said you'd have to calculate scale manually. More like programming, so it sort of defeats the purpose of C2.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Tue Jun 18, 2013 8:11 pm

@Nimtrix yeah, my background is as a developer so I am just used to going that route first. Though if you did it based on a percentage of the window like the halfway point, etc... then it would work across multiple resolutions as well. Not sure if the overhead of an extra calculation would offset the extra object or not though resource wise.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,573

Post » Tue Jun 18, 2013 10:03 pm

THanks for the replies.

I'm building art on the fly for random generated lavels, and I read that the tiled object was less expensive than the sprites, so that's why I asked.

I was wondering if COnstruct has a feature that lets you pre-render images before they are used in the game (so I dont need to place one sprite on top of the other)
B
7
S
3
G
3
Posts: 53
Reputation: 2,459

Post » Wed Jun 19, 2013 9:26 pm

@BluePhaze

just was reading this and i think your point about vram usage is not quite right (if i understood you right)

i quote ashley here (from optimize blog responses about vram)

"only the source image is kept in memory (what you see in the image editor"

so this means that a stretched out pixel uses less vram then lets say a 32*x32 black image or transparent image, so stretching it over the screen will not add to vram, but is not advised because your likely to have more overdraw (stacking images) wich i read is slow on mobile and also that transparency overdraw and transparency in general is slower for the gpu than opaque

also using the same image(sprite) multiple times doesn't increase vram, it is however slower using lots of objectsvtrix2013-06-19 21:27:07
ImageImage
B
69
S
21
G
7
Posts: 827
Reputation: 10,017

Post » Thu Jun 20, 2013 5:39 am

@vtrix There is the amount of memory the object uses, and then there is the amount of memory used to store the color value for each pixel on each refresh of the screen. WHile a 1 px image takes up a small amount of memory on the system, if you stretch it across the screen your 1 pixel image is covering however many pixels the screen is rendering which means that the buffer must now store that color value for every pixel on the screen.

Since C2 games are rendered back to front, each layer in the back renders first and hence it's colors get stored in memory for each pixel and then as the layers above it are drawn in this happens for each layer. So the more overlapping layers you have the more color values must be stored in each frame. This is the memory I am speaking of. The memory used to store the color value for every pixel on the screen.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,573

Post » Thu Jun 20, 2013 11:50 am

@BluePhaze i think what you speaking of is called a framebuffer, but when we talk about vram in construct its the uncompressed size of an image, it was that i was pointing to, as it doesn't matter if you stretch an image for vram size, i dont know how much impact this framebuffer has on performance, i guess there's where overdraw comes in.
ImageImage
B
69
S
21
G
7
Posts: 827
Reputation: 10,017

Previous

Return to How do I....?

Who is online

Users browsing this forum: Casimir, pwrtoppl, resdesign, sublimate and 8 guests