grossd's Recent Forum Activity

  • In such discussions I wish you could consider making C2 open source

    Enthusiasts could then add features -- offloading work from you guys. But, would it then be possible for you to define a viable business model for yourselves to ensure that all the hard work you put into this is not lost (in a commercial sense) ...

    Dan

  • Also, i guess, a HUD would then go into an "inheritance layer" rather than replicate it across layouts.

  • I think an include layer would be indeed very good.

    You mention inheritance -- do you actually mean inheritance in the Object Oriented sense?

    I used to work (a long time ago) with a visual language (Digitalk Parts for Smalltalk), and visual components were in essence object instances (not unlike object type instances in C2), and you could freely subclass them, to add or customize specific behavior.

    For example, consider having a named (layer/include event sheet pair), which you can include in another named (layer/include event sheet) to add additional objects types and events. Perhaps this makes sense too in C2.

    Dan

  • Thank you spongehammer.

    The problem with Spawning is that they obscure the actual visual layout by pushing the layout elements into code. A key strength of C2 in my mind is that its visual programming which makes it easier to understand, program, maintain and change. This means that if you want to do reuse you have to move away from this paradigm.

    BTW, the keyboard is mostly spawned from one letter, but there are still layout specific design elements included.

    Dan

  • HI Ashley,

    Thank you for your prompt response.

    I can of course replicate the keyboard and other design elements across quiz layouts.

    But, I am going to include the keyboard in, say, 15-20 screens, and duplicate other kinds of design elements across various screens, and as requirements change, and they will change, since we are doing participatory design -- I have to redo all screens, one at a time -- all layout elements that can not be reused. Its tedious and error prone.

    It would have been nice if there is one location where I make the change and the change propagates across all layouts. Perhaps such modularity is not a strong requirements in game design, and my quiz game is unusual that it reuses design components across screens.

    Dan

    p.s. Also, i want to avoid parameterizing screens, and events, to facilitate reuse, since it reduces the readability of the event code, and there are always exceptions you need to deal with, which make things even more complex.

    EDIT: Also, i think the simplicity of C2 event coding, which I appreicate a lot, is lost to a greater extend when I parameterize for reuse. I've tried it, and then i found myself spending time debugging reuse code rather than improve the games themselves.

  • Btw, I understand that I can include events, and I am indeed making extensive use of "includes", for example, to "automatically" internationalize all Quiz screens. But, sometimes I need to include both layout elements and associated events, and C2 currently does not support such kind of combined reusable "components" "out of the box".

  • Thank you Ashley,

    What i am trying to do is to break down my quiz game into game "components" with which to construct quiz screens. A component would be in part layout elements and in part associated events.

    For example, I designed a visual keyboard (going from "A" to "Z", working in English and Hebrew), and want to include the keyboard in various quiz screens -- those for which an entry is required.

    So, instead of replicating the keyboard layout elements and event sheet across all screens, I want to include a keyboard component only, as a whole, in a new quiz screen.

    Using iFrame and HTML5 Messaging as implemented by the postMessage plugin seems to enable doing that. But, the overhead this would create may in the end be a bottleneck.

    Dan

  • Hi BluePhaze,

    (I just posted a reply but it seems to have gotten lost), so here again:

    Indeed, my question was about performance of exported games. I am wondering if there is a difference in performance if "games inside games" are run within one exported C2 game or whether each run in an iFrame.

    Daniel

    p.s. I would need to check the non-focus item you mentioned. I would want the game inside the iFrame be responsive at all time, not only when it has focus.

  • Hi Ashley, all,

    If i were to run one or many C2 games within a Game using the iFrame plugin, would this cause significant performance degradation?

    Why yes: because C2 runtime, runs two or many times in parallel, creating both memory usage and processing overhead

    Why no: because in the end all C2 game instances run on the same processor, and hence processing is time shared overhead is similar to running all games within one C2 game.

    Which argument is correct?

    If there is significant overhead could in principle the code be optimized to recognize multiple instances of C2 being loaded in a browser?

    thank you,

    Dan

  • OK. thanks.

    re: iframe composites

    So, Iframe within IFrame is not supported -- only one level of iFrame per C2 project.

    re: optimization

    Indeed something I haven't thought about: a C2 app running inside an iFrame imports all of the C2 runtime code again. I wonder whether browser optimize such things, since it appears to me that iFrame is in the end of the day a browser DOM construct, not an independent browser running in a browser -- at least according to my intuitive understanding of how iFrames might work.

    Dan

  • What is the ID used to direct a message to the page that includes the iFrame?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Pode,

    Thank you for your prompt response. Can can you further explain the problem?

    What if each Canvas included in an iFrame is self contained and the only sharing with the "outer" canvas are events and messages.

    For example, I created a "virtual" keyboard and Entry Field to enter text. I'd like to reuse this functionality across several games/quizzes. So, I envision the keyboard to "live" within an I frame, and the linkage to the outer application is only via messages sent -- i.e. the complete text entered.

    EDIT: i.e. the application within the IFrame is treated as one object type in the "outer" application.

    Dan

grossd's avatar

grossd

Member since 4 Feb, 2014

Twitter
grossd has 1 followers

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies