Domain Model Programming on plugins

0 favourites
  • 4 posts
  • I'm new to construct 2, it seems to be very good for easily creating games.

    I've started doing a game in android using java, and decided to give it a try, to make my graphical life easier.

    I'm a developer, and used to working with an object oriented approach, I already have my domain model set up in java classes, with custom business logic and interactions there.

    I was thinking on porting this to construct but without re-doing everything with the event system, I think that'd be too complex and also wouldn't want to do it like that, for me it's much cleaner and maintainable the way it is right now

    What's the normal way of doing this? I was thinking that maybe I can create a custom plugin, then create javascript classes and objects there, and finally when I need to communicate with Construct (to show something visual for example), can use instance variables in the plugin to do so.

    Is this a correct way of doing it in this platform, or there's another way? thanks for your help!

  • It's better just to make everything in the event system, if you can. It requires a fairly significantly different way of thinking to traditional programming, but you'll get used to it.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi Ashley, I understand that the event system is the main asset of Construct2, and therefore the "normal" way of doing things here, but in my case the game is a simulation, and relies heavily on object interactions. Believe me, it'd be a nightmare to implement that using the event based system, not to say that it'd become unmaintainable. THat's why I'm asking how to get the best from both worlds, from one part the flexibility to handle the UI / graphical part from Construct and the power of being able to code behind.

  • HI Sephrag,

    Did you in the end go with Construct2, and managed to get both world working. Perhaps the way to go is to make more heavy use of javascript and use C2 as a "thin" UI interface.

    If you can events firing in javascript or get functions in javascript called as actions.

    I don't know enough api dev. just yet, but thats one thing that came to my mind.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)