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

Add support for scene transition #7

Open
coeuvre opened this issue Sep 16, 2014 · 0 comments
Open

Add support for scene transition #7

coeuvre opened this issue Sep 16, 2014 · 0 comments
Labels

Comments

@coeuvre
Copy link
Member

coeuvre commented Sep 16, 2014

Multiple scenes are common in a large game. We should add several built in transition effects. The basic idea of how to do transition are:

  1. We have currently running scene from_scene and the scene to be transited to to_scene.
  2. Render one frame of from_scene to a texture, and create a sprite from_sprite.
  3. Assume that the to_scene have enough resources to render. We render one frame of to_scene to a texture, and crate a sprite to_sprite.
  4. Change to a temporary scene which has only two sprites: from_sprite and to_sprite.
  5. Perform transition between these two sprites.
  6. Once the transition has finished, we change the scene to to_scene.

As you can see, the most important step is render to texture. So we should find a way to render scene to a texture first and then do the scene transition.

Any suggestions?

@coeuvre coeuvre added the draft label Sep 16, 2014
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

1 participant