Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Why would you want to tick a js-object in the first place?
I thought that a js-object stores data and functions that operate on that data. Data doesn't tick.
What paradigm are you trying to implement?
I don't want to tick a js object, i want to tick a class instance that has been associated with a C3 instance.
Yes, I meant that. Why? C3 instances are already being ticked. What is it that you're trying to do that needs to be ticked in JS?
Well, if I want to write all of the game in JS, I need to be able to run some code on each frame.
But you can't make the whole game in JS, there's still sprites and stuff on the Construct side. What is also on the Construct side — is the ticking mechanism.
From what I understand, you're trying to extend Construct sprites with your own classes and make them a part of your model. But what's the benefit of it?
The ticking mechanism and all the routines related to it — are the engine. Why are you trying to invent your own engine inside of the Construct engine? Why don't you let Construct call whatever js functions you want to be run every frame?
I'm not sure we're on the same page concerning that whole JS thing.
Construct just introduced JS in the editor with the aim to eventually allow them to replace event sheets entirely. Aka making games entirely in JS.
My code is nothing final and only served as an example to what I meant in the proposal. I am asking to allow users to write their own classes and link them to C3 instances to write said code that would replace event sheets more effectively.
I don't want to write my own engine, far from it. I want the engine to extensible.
That would let Construct call js functions every tick, unless you meant call them from event sheets in which case, that would be "replacing event sheets entirely".