Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the idea of BlSpaceFrameIdlePhase? #644

Open
tinchodias opened this issue Oct 25, 2024 · 2 comments
Open

What's the idea of BlSpaceFrameIdlePhase? #644

tinchodias opened this issue Oct 25, 2024 · 2 comments
Labels

Comments

@tinchodias
Copy link
Collaborator

A BlSpace has a BlSpaceFrame (i.e. space's main loop).
A BlSpaceFrame has a collection of phases. This allows, for example, Toplo's skins to add 2 new phases to a space on runtime.
Okay until here. But there is a phase that runs nothing:
Screenshot 2024-10-25 at 10 24 09

added to default initialize:

Screenshot 2024-10-25 at 10 43 09

I don't see the point on having BlSpaceFrameIdlePhase by default on spaces.

@plantec
Copy link
Collaborator

plantec commented Oct 25, 2024

No idea, I would have the same question :)
I tried to remove it and no consequence for now

@tinchodias
Copy link
Collaborator Author

tinchodias commented Oct 25, 2024

Let's remove the idle phase.


Additionally, I'd rename BlSpaceFrame. Why? To me, since first time I browsed it, the name of BlSpaceFrame is misleading:

A BlSpaceFrame has a sequence of phases that can be modified and run via its API. In this sense, a BlSpaceFrame corresponds to what is usually called a "main loop" in technologies to build desktop applications (and especially to create games).

A BlSpaceFrame also knows what is the next phase to be executed. So this "frame" represents a particular execution state of a "main loop" of a specific space.

I'd rename it as BlSpaceLoop or BlSpacePhaseLoop or BlSpaceMainLoop.

And I would either make it point to the associated space (now, it is received by parameter in runOn:), or move runOn: to BlSpace.

Also, I'd do something with the BlSpaceFrame's id (an instvar that starts in 0 and increments on each run). It is misleading to discover in the debugger that an object's id changes constantly during a window's lifetime, and then discover that in fact it is the number of loops done until creation. It could be renamed as iterationCount or frameCountor loopCount or runCount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants