Object oriented CONSTRUCTion

Discussion and feedback on Construct 2

Post » Fri Sep 28, 2012 4:34 pm

Hi there,

just wanted to read your opinions on OOP possibilities in construct. What I miss right now (or don't get) is the way of defining custom objects in construct without using plugin API.   
B
42
S
11
G
4
Posts: 505
Reputation: 7,267

Post » Fri Sep 28, 2012 7:32 pm

What kind of customization do you want to do? Can you give an example?

You can add instance variables and behaviors to objects, which allow a certain level of customization.

To change the inner workings of an object, or create new object functionality, you need to use the JavaScript SDK and make your own plugins or behaviors. Wastrel2012-09-28 19:41:26
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608

Post » Sat Sep 29, 2012 1:26 am

Are you asking about Construct Classic or Construct 2?

Construct Classic forum is lower on the page.

In C2, there are a lot of ways of defining individual objects, we need more details to respond to your question. What do you want to do?

Also, please search the forums (topright search box), look in the C2 Manual, and check Kyatric's FAQs. Most questions can be quickly and easily answered through those sources.teahousemoon2012-09-29 01:31:53
B
28
S
6
G
5
Posts: 248
Reputation: 5,463

Post » Sat Sep 29, 2012 11:08 pm

For example, extending sprite class with some custom "methods", which could be accessed through events and actions. As far as I understand behaviour system has exactly this function. May in the feature it will be possible to write nested event logic with visual editor inside an object type, which could be accessed like a method.

Another example is defining a new/custom class type. But again, behaviours and plugins are the answer.

May be there are some good practices, how to structure event logic, so it resembles some OOP concepts.
B
42
S
11
G
4
Posts: 505
Reputation: 7,267

Post » Thu Aug 04, 2016 5:27 am

Message: walshmagger can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
OOP is powerful enough to express what needs to be expressed in practice and simple enough so that many programmers can do this in a consistent way. It is also simple enough for compilers to do their job well and produce fast binaries (at least after 30 years of robust compiler R&D). Some OOP languages come with extensive domain-specific libraries (Java, PERL, Python) which allow programmers to think in domain-specific terms. C++11 supports typed numerical quantities, e.g., you can multiply meters/second^2 by seconds and get meters/second --- very handy to avoid mistakes in kinematics applications. More about...http://net-informations.com/faq/oops/oops.htm Oops
B
2
Posts: 1
Reputation: 152


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests