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

Frame-rate independence #192

Open
tzachshabtay opened this issue Nov 8, 2017 · 4 comments
Open

Frame-rate independence #192

tzachshabtay opened this issue Nov 8, 2017 · 4 comments

Comments

@tzachshabtay
Copy link
Owner

tzachshabtay commented Nov 8, 2017

Make sure walk speed, animation speed, tween speed and mouse cursor speed are frame-rate independent.
Expose some mechanism to allow frame-rate independence in externally written components.

See: https://www.scirra.com/tutorials/67/delta-time-and-framerate-independence
And: https://www.scirra.com/blog/ashley/17/using-lerp-with-delta-time

@ghost
Copy link

ghost commented Nov 8, 2017

I have a question: are you going to feature virtual time in your engine, or only use system time always?
I was thinking that with virtual time it would be possible to change overall game's speed.

(On other hand, the next question is clearly about whether to apply this virtual time to everything, or only some objects, e.g. except GUI)

@tzachshabtay
Copy link
Owner Author

Yes, I want to have a virtual time (like the time scaling mentioned in the first post I linked to).
I haven't considered only making it applicable to some objects, but it makes sense. I'll probably allow disabling it on a per-entity basis (like I'm already doing in other places in the code, for example:

IConcurrentHashSet<string> EntitiesToSkipCrop { get; }
).

@ghost
Copy link

ghost commented Nov 8, 2017

May I propose a concept of "entity family" (made that name up), which would make appliance of virtual time simplier?
Although I do not know engine well enough yet to see how easy it may be to separate entities into such groups.

@tzachshabtay
Copy link
Owner Author

tzachshabtay commented Nov 8, 2017

Maybe? Or maybe we can use the layers for this (

public static IRenderLayer UI { get; private set; }
), as they already group entities. Not sure we need another construct for this.

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

No branches or pull requests

1 participant