Design paradigm... Thought?

Discussion and feedback on Construct 2

Post » Sat Jun 06, 2015 7:30 pm

C2 loves making difficult things easy and easy things difficult. What you're asking doesn't sound terribly difficult though. Just use generic input functions, UIDs, families, and maybe custom containers because C2's aren't very good.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sat Jun 06, 2015 7:33 pm

@Colludium - I remember the problem more specifically.

Okay:

Lets say you create a new character. You create a PilotCharacter manager, from the family managers. It then needs to create pilot states, of the familiy states.

But here is the thing, you can't abstract any of this away. If you have generic code in the manager family to handle creating and setting up components, those components have to be an actual type. You can't create a family and send it a type to make from. This makes it impossible for a family to hook itself up with other families. It has to occur at the type level. Which means repeating tons of hookup code, for every character. You can put specific types into a container, so that when you get a pilotManager you get the pilotStates. But again, that automatic hookup means you can't get families to talk to each other generally. A manager needs to talk to states, so then you need uid referencers as part of the family. This sort of means you are replicating code that is already happening at the container level on the specific type.

In the end, families don't solve the inheritance issue. Which is the core of the problem. I can't simply say, this specific type needs to call a function at the family level....

So in the end, lots of code has to be repeated. OOP is meant to make code simple, and need to be only written once.
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,173

Post » Sat Jun 06, 2015 7:38 pm

@Tokinsom - ya I think you nailed it, I have a solution that does that but it isn't as easy as I think it should be. It's awkward and still involves alot of work to set up a new character. Wrapping this up in a script and attaching it as a single behavior would be probably be better... but behaviors and plugins don't play nice with each other. You have to sit them down and make them play with each other. I really like the constuct way of solving the whole game engine and global events things... but man, the simple stuff gets to me. I like construct where I hate unity and I hate construct where I love unity. >.<
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,173

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests