What should I do?

For questions about using Classic.

Post » Mon Jun 03, 2013 5:32 am

Okay, i have a question to ask

Should I load my picture from the .bmp/.png file or load my picture from the .cap file.
B
14
S
2
G
1
Posts: 46
Reputation: 1,144

Post » Mon Jun 03, 2013 10:59 am

That highly depends on what you want to achieve.
If your project is not going to be gfx-heavy I highly suggest to store the graphics in the cap.
If gfx-heavy and mostly sprites are used, I would store the images outside the cap and load them at runtime into the blank sprite images.
Animating a sprite while constantly loading the pictures from harddisk is bad, though, so you have to load them at once at app-start /layout start or change.
After all storing gfx externally leads to more flexibility, but you may stumble accross problems with e.g. image points coordinates in terms of setting them anew.
Image
B
17
S
5
G
1
Posts: 122
Reputation: 1,930

Post » Tue Jun 04, 2013 1:03 am

I should just load my pictures from files then. thx

Edit: I have uniquesprite plugin and loaded my pictures from files and it was good but the thing is why does it uses so much vram then loading pictures from .cap.blackstr2013-06-04 01:49:44
B
14
S
2
G
1
Posts: 46
Reputation: 1,144

Post » Tue Jun 04, 2013 1:57 am

@blackstr sadly uniquesprite means just that, each image loaded should take up new VRAM. Probably best to load up one sprite with images (Load Frame action) to prevent using VRAM for the same textures.
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
116
S
41
G
17
Posts: 2,204
Reputation: 19,545

Post » Tue Jun 04, 2013 4:59 am

so just say i have a sprite, for example, I load 100 animation frames with 100 images with a file? or .cap?
B
14
S
2
G
1
Posts: 46
Reputation: 1,144

Post » Tue Jun 04, 2013 3:12 pm

It's not so much the number of frames, you can do it both through a file or cap. I'm saying that you should use the "Load Frame" action for a Sprite and TiledBG objects instead of UniqueSprite to save VRAM.

Try looking at the source code to my game, it shows a few different ways to load graphics at runtime: I Had Hope

I do use UniqueSprite in my project, for objects that do not animate, but otherwise for objects where I know the number of frames I use a sprite.
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
116
S
41
G
17
Posts: 2,204
Reputation: 19,545

Post » Sat Jun 08, 2013 12:51 am

Does behavior lag the game more or remains the same?
B
14
S
2
G
1
Posts: 46
Reputation: 1,144

Post » Sat Jun 08, 2013 3:53 am

@blackstr when used correctly the behaviors should perform better or at least the same as events.
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
116
S
41
G
17
Posts: 2,204
Reputation: 19,545

Post » Sat Jun 08, 2013 4:13 am

thanks @Jayjay :D
B
14
S
2
G
1
Posts: 46
Reputation: 1,144

Post » Sat Jun 08, 2013 6:47 pm

@blackstr anytime
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
116
S
41
G
17
Posts: 2,204
Reputation: 19,545

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests