What to choose?

Get help using Construct 2

Post » Tue May 26, 2015 12:32 pm

Hello, im new in Construct 2 and I have a question to those, who work with this programm for a long time. Im creating a clicker game and I need to know, what way to create monsters would be the best:

1. Just to create one sprite object and put ALL monsters animations in it (animation layer 1 - monster №1 animation, animation layer 2 - monster №2 animation, ets) and then just go to random animation layer and play it, this should be looking like a new monster on a screen created with his animation.

2. Create a new sprite object for each monster, put all these sprite objects to one family (thats exactly what im doing now), and then just work with family. It helps me NOT to create same events for each monster, but all of them should have instances on a layer and when I spawn random monster instead of one I have on screen now, all family instances plays same animation as one on the screen, which disturbs me, maybe it will ruin game's fps.

Thank you.
B
6
S
1
Posts: 24
Reputation: 332

Post » Tue May 26, 2015 2:58 pm

I'll go with number 2
B
17
S
7
Posts: 277
Reputation: 2,514

Post » Tue May 26, 2015 3:03 pm

Use the famaly feature. You can create one event for the famaly. And later different behavior for each sprite (monster). For the animation you can shift the start animation frame randomly. ...
Can you upload the game or example project?
B
13
S
4
G
1
Posts: 107
Reputation: 1,337

Post » Tue May 26, 2015 3:28 pm

The fact the layout-by-layout texture management works by loading entire object types in to memory (all animations, all frames, per object type) is a good reason to go with number 2. If you use number 1, you can only either load all the images in to memory, or none; with number 2, only the objects used on each layout are loaded in to memory.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842

Post » Wed May 27, 2015 8:27 am

Ashley wrote:The fact the layout-by-layout texture management works by loading entire object types in to memory (all animations, all frames, per object type) is a good reason to go with number 2. If you use number 1, you can only either load all the images in to memory, or none; with number 2, only the objects used on each layout are loaded in to memory.

In 1st case we will have 1 instance of sprite object with, for example, 3 different animations, and in 2nd case we will have 3 sprite objects instances instead, which with 1 different animation. So the question is wouldnt it take the same amount of memory?
B
6
S
1
Posts: 24
Reputation: 332

Post » Wed May 27, 2015 9:24 am

If I remember correctly:
Animations (per object) are placed on a spritesheet on export by C2.
If you use three objects you'll get three spritesheets, which will probably be smaller combined, than the one spritesheet you would get by using animations on one sprite-object.
Only way to know for sure is export your project and compare pixel-amount..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 27, 2015 9:32 am

Joe Bookmaker wrote:In 1st case we will have 1 instance of sprite object with, for example, 3 different animations, and in 2nd case we will have 3 sprite objects instances instead, which with 1 different animation. So the question is wouldnt it take the same amount of memory?

Only if everything is loaded in to memory at once. Option 1 forces the engine to load everything at once. Option 2 allows it to only load say one of the three objects if that is the only one being used.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842

Post » Wed May 27, 2015 9:38 am

LittleStain wrote:If I remember correctly:
Animations (per object) are placed on a spritesheet on export by C2.
If you use three objects you'll get three spritesheets, which will probably be smaller combined, than the one spritesheet you would get by using animations on one sprite-object.
Only way to know for sure is export your project and compare pixel-amount..

So seems like it would be just a little difference at the end. OK, I got it, Im going to continue using the 2nd method. Thank you for help, guys :)
B
6
S
1
Posts: 24
Reputation: 332


Return to How do I....?

Who is online

Users browsing this forum: David181 and 24 guests