Texture tiling problems

Post your own tutorials, guides and demos.

Post » Fri Dec 11, 2009 3:16 pm

[quote="Ashley":29nsu82h]As soon as you hit save in the picture editor, the image is converted to PNG and stored inside the .cap. They're also exported to the runtime as PNG. So what you use before importing it doesn't matter, although I'd recommend something lossless obviously.[/quote:29nsu82h]

Awesome, that's good to know! Thanks! :D
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Fri Dec 11, 2009 4:11 pm

Thanks for the replies Ashley. We've drifting a little off-topic here but it doesn't matter since the conversation is productive.

Another question regarding the texture handling: if I use external textures as in load files to fill sprites are the external textures all converted to PNG before the app runs? Is it faster to use external textures instead of ones inside the cap? When I add a sprite to Construct it converts it to a PNG, but if it's loaded in the runtime will Construct convert it to a PNG as well?
B
11
S
2
G
3
Posts: 100
Reputation: 2,150

Post » Fri Dec 11, 2009 4:36 pm

[quote="Zotged":20r9lmez]if I use external textures as in load files to fill sprites are the external textures all converted to PNG before the app runs?[/quote:20r9lmez]
If you mean actions like "Load frame from file" at runtime, then no, they're decompressed and loaded directly in to video memory. There would be no point converting the file to PNG then loading in to video memory! That would be the same as decompress source file -> recompress source file as PNG -> decompress PNG -> load to video memory!

[quote:20r9lmez]Is it faster to use external textures instead of ones inside the cap?[/quote:20r9lmez]
Probably not, it would only affect the startup time, and if the startup time of your application is fine, there's no point caring.

[quote:20r9lmez]When I add a sprite to Construct it converts it to a PNG, but if it's loaded in the runtime will Construct convert it to a PNG as well?[/quote:20r9lmez]
As I said earlier, once images are saved in Construct, they stay PNG, and the runtime loads them as PNG.

Basically, to summarise the system:
Images in Construct are stored as PNG, given to the runtime, and then decompressed to video memory on startup or another time (depending on your texture loading settings).
Images loaded at runtime are immediately decompressed to video memory.
That's it! :)
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Fri Dec 11, 2009 4:53 pm

Right, very informative. That's all there is I need to know, basically the start times with our current project ARE getting irritating in our test builds. The texture handling is more than useful to know in future development.

Construct is the most powerful tool for fast development I've ever worked with. I'm not much of a coder myself but I find the Construct's inner works very intuitive. Will look forward and support further development as much as I can.
B
11
S
2
G
3
Posts: 100
Reputation: 2,150

Post » Sat Dec 12, 2009 8:28 am

Loading times are inevitable in projects which involve extensive assets. Consider creating a loading screen with animation, if the time exceeds 5-10 seconds to let the user know the game hasn't crashed on load.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sat Dec 12, 2009 4:10 pm

My game was starting to take a long time to load/save/run, so I replaced all the big background graphics I had with tiny squares, then load the images at runtime instead. It now loads/saves/runs in less than half the time. This works with any object that has no animation, but it does make them harder to place. (Note: if you do this make sure that after replacing the images with tiny squares, make them 1:1. Otherwise construct crashes when loading images to them.)

Mipey: IIRC, construct freezes while loading assets. You could make a loading screen, but it couldn't have animation.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Previous

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests