Author Topic: Scale layer - Text + std frame layers  (Read 1110 times)

dave_h

  • Wizard
  • *****
  • Posts: 185
    • View Profile
Scale layer - Text + std frame layers
« on: August 16, 2015, 04:08:41 AM »
Do you already have this?

A text layer scaled to zero. Gets larger over time and in combination with MoveLayer you could make the fly in and give the perception of it zooming in from above and getting closer.

This is the first thing that came to mind after thinking about it and close to the effect although this is just scaled in. Xenon 2 on Amiga.

https://www.youtube.com/watch?v=7y0cpNzhqoY  :-*

Would be nice as an added function passing in a text or image layer. Creating on the fly is a bit better than pre editing things like this. At least it can be changed as and when you need to and not a video/image sequence made beforehand, which is a bit more work if you ever need to edit or keep editing.

MOcean

  • Moderator
  • ****
  • Posts: 822
  • Michael Ocean
    • View Profile
Re: Scale layer - Text + std frame layers
« Reply #1 on: August 16, 2015, 08:13:22 AM »
I have a scaling operation for layers and animated layers (as I'm sure you saw).

I had built what I call a "ZoomingLayer" for text display in Buffy's "big bad battles" based on the old VGA code, but I didn't love the way it worked -- the text position would drift for certain justifications of the text (maybe it was right justify?). Anyway that was based on the old code and now I expose the physical size of the rendered text, so this might be a lot easier.

Relatedly, I'm also working on a generic "Video Mode" (mini-game mode) for Pinbot 2.0, and for that I have essentially recreated the behavior of the zooming layer, so I'll take a look at this again some time later today.

For all I know, the old ZoomingLayer might still be in the code...

Do you already have this?

A text layer scaled to zero. Gets larger over time and in combination with MoveLayer you could make the fly in and give the perception of it zooming in from above and getting closer.

This is the first thing that came to mind after thinking about it and close to the effect although this is just scaled in. Xenon 2 on Amiga.

https://www.youtube.com/watch?v=7y0cpNzhqoY  :-*

Would be nice as an added function passing in a text or image layer. Creating on the fly is a bit better than pre editing things like this. At least it can be changed as and when you need to and not a video/image sequence made beforehand, which is a bit more work if you ever need to edit or keep editing.

MOcean

  • Moderator
  • ****
  • Posts: 822
  • Michael Ocean
    • View Profile
Re: Scale layer - Text + std frame layers
« Reply #2 on: August 16, 2015, 10:39:01 AM »
Checked in a simple version of the ZoomingLayer.  It's in layers.py, though you should probably also grab the rest of the updated files.  The new method is actually documented (*faint*) and the check in comments have an example of use.

https://github.com/mjocean/PyProcGameHD-SkeletonGame/commit/002decc8903435b502980fdd5ab610c0d573ec64

dave_h

  • Wizard
  • *****
  • Posts: 185
    • View Profile
Re: Scale layer - Text + std frame layers
« Reply #3 on: August 16, 2015, 01:44:52 PM »
Nice, thanks!!! This will be the first thing I try out later.

Quote
I have a scaling operation for layers and animated layers (as I'm sure you saw).

No, not aware of it! Only scaling I was aware of is when your layer is first initialized.

dave_h

  • Wizard
  • *****
  • Posts: 185
    • View Profile
Re: Scale layer - Text + std frame layers
« Reply #4 on: August 21, 2015, 08:54:46 PM »
Have just been using this now and think I can see what you mean by right justify or scaling keeping correct ratio? The scale is being pulled from the bottom right of a layer.

It's still a decent effect starting a scale from 0.1 - 1.0.

The example you provided was total_frames but is total_zooms.

dave_h

  • Wizard
  • *****
  • Posts: 185
    • View Profile
Re: Scale layer - Text + std frame layers
« Reply #5 on: August 22, 2015, 08:47:21 AM »
Ended up going the video editing route. This is what I was trying to get on the fly inside pyprocgame. Uniform scaling.

https://www.youtube.com/watch?v=zaw7SubChv0&feature=youtu.be