[Suggestion]Familys not only for one kind

Discussion and feedback on Construct 2

Post » Thu Jul 17, 2014 2:31 pm

Hi,

it would be totally great if things like tiledbackground, spritefont etc. could also be packed into a family together for doing basic stuff like setting coordinates, visibility or opacity.

my imagination of that would be that when you create a new family you can choose if its the normal family (like it always was) or just a "basic" family where you can put in all the different objects together that has only the basic propertys like size, coordinates, visibility and so on that they all have in common.

what do you think?
B
38
S
11
G
5
Posts: 485
Reputation: 5,340

Post » Thu Jul 17, 2014 7:59 pm

I understand your feel. But IMO it's technically impossible to do that.
The structure of Construct 2 can't allow mixed types in families.

It's hard to explain if you don't know any programming language.

When you make a family, you have to know which type this familly is, to know what actions and property you have.
But, in this case, we have Sprites, and TiledBackgrounds. Both have an action "Set Position", but it's not the same for this two objects.

For having both objects in one family, you need a supertype "Graphics" which contain Sprites and TiledBackground common possibilities. But for intuitive reasons, and because the software is made for non-programmers and need to be easy, I think that this is impossible.
Last edited by grandbrinus on Fri Jul 18, 2014 10:50 pm, edited 1 time in total.
B
13
S
5
G
1
Posts: 138
Reputation: 2,659

Post » Thu Jul 17, 2014 8:48 pm

yeah i know about the problems when mixing different types you talk about, thats why i suggested to reduce the family actions in case of mixed objects to only what they have in common. what i dont understand is whats the difference in setting opacity or x coordinate or setting size (by self.width*2 or something similar) in the different objects.
B
38
S
11
G
5
Posts: 485
Reputation: 5,340

Post » Fri Jul 18, 2014 2:16 am

Requested.... 2 years ago. I agree. A mixed family would would only contain basic information and not inherited specifics.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Wed Aug 12, 2015 9:22 pm

Rather than starting yet another thread on this request. I'm just going to post this request again in the same thread.

I'm working on a game with a group of people. We are using Spriter for our character animation. Our character has about 20 objects. Now in disgusting method that Spriter characters are imported. This leads to 20 sprites being created just for this character. ok moving to the next important step.

We have enviromental and object sprites. These are Sprites(not spriter objects). Our game require sort by Y/zindex. Now the easiest method to sort the objects we want to sort is to

FamilyZSort is On Screen
-- For Each FamilyZSort ordered by FamilyZSort.Y ascending
---- FamilyZSort Move To bottom of Layer

so now all our sprites sort each other no problem..... except there is a problem. Spriter can't be put into the FamilyZSort because of the lack of mixed families. So our Spriter Character cannot be sorted as part of the algorithm. Ok, what if I put my Spriter Sprites into the family... Well besides the disgusting amount of Sprites on how Spriter imports, and the fact that there are enemies, bots and other Spriter Objects that will blow up to a few hundred distinct sprites.. This method unfrotunaly messes up Spriters layering now. So it's not a solution.

There are two solutions.
1. Allow Mixed families
2. Add a new action. Object.SetZIndex( int )

I love C2 so much, but some times I come across these brain smashing issues that can't be fixed effectively from the developer side.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests