Code Generation

wormilwormil Member Posts: 127
edited November -1 in Working with GS (Mac)
I've been working on my game for about two weeks now hard core (8+ hours a day), but I lack some basic understandings of how things are implemented and why the work they way they do.

As I develop my game, I imagine how things would work in code and implement as such, based on some limited knowledge of corona sdk and lua.

I have a vision that a scene loads similar to a basic app, and each object runs it's initialisation code (anything not in a repeated action such as a timer, a constraint, a conditional or callback).Conditional rules appear to me as being in a large onupdate function that has if statements. Timers appear to me as similar to tcl's after function (use of a call back or just a delay). If i'm wrong here, please correct me.

I cannot for the life of me understand what a constraint is doing after checking a minimap demo. I believed that if i had game.X and constrained it to actor.Position.X, only one object could be tied to that. After seeing the minimap demo, actors themselves constrain to this single variable, and spawn an actor constrained to it as well. I'd expect them all to be the same, but alas, this is not true. while the overall game.X appears to the first actor as the last instance, why do the spawned actors kept tied to the actor that spawned them?

For anyone wondering exactly what I mean, I'm referencing the Mini Map Demo by wohoo iRock.

Some clarification on how the internals work would be appreciated.

Comments

Sign In or Register to comment.