I've tried changing it and noticed no change. At first I thought it was the amount of gray you get but as far as I can tell that's not it...could be wrong though.
Originally Posted by nim Actually I've always wondered - what's the reason for using "virtual" frame size?
Nice example and great graphics, by the way
Virtual frame size determines the area in which the camera will scroll. If the virtual frame size is larger than the actual frame size it will scroll into what in the frame editor is the gray area i.e. outside the frame. I could only think of using it to utilize the fact that it will go into areas where events take place as "outside the frame". Things like "Deactivate object when too far from frame" and "Destroy object if too far from playfield" or whatever would still take place in this area. Maybe you could use the frame size for the inside of a building and the outside as a grassy area entrance. It'd make it easier to change things based on if you're inside or outside.
Originally Posted by nim Actually I've always wondered - what's the reason for using "virtual" frame size?
Nice example and great graphics, by the way
Virtual frame size determines the area in which the camera will scroll. If the virtual frame size is larger than the actual frame size it will scroll into what in the frame editor is the gray area i.e. outside the frame. I could only think of using it to utilize the fact that it will go into areas where events take place as "outside the frame". Things like "Deactivate object when too far from frame" and "Destroy object if too far from playfield" or whatever would still take place in this area. Maybe you could use the frame size for the inside of a building and the outside as a grassy area entrance. It'd make it easier to change things based on if you're inside or outside.
That's very useful - thanks. MMF1.5 and TGF used to have a "Play" button that would allow the game to be viewed in the editor window. This was very used for checking what's going on outside of the viewable window. I wonder why it wasn't included in MMF2.
So I now understand what virtual frame width/height is used for. That being said, I'm still struggling to figure out why it's used in the platform engine above. Something to do with resizing scrolling levels to fit the window or something?
Originally Posted by nim ...I'm still struggling to figure out why it's used in the platform engine above. Something to do with resizing scrolling levels to fit the window or something?
Exactly! I tend to set the Virtual Frame Size in order to resize the frame and keep the ability to scroll. I think there is an extension to accomplish this but this is the poor man's way of getting the job done.
The method is this:
Application
--> Size - 800x600
--> Resize display to fill screen - CHECKED
Frame
--> Size - 400x300
--> Virtual Width/Height - 2000x300
So, the 400x300 viewable frame is resized to 800x600 (keeping its proportions) and the sprite is allowed to explore and scroll through the entire 2000x300 level. I do this because I LOVE LOVE LOVE pixel graphics and want to see them displayed in big, bold proportions. Can I get an AMEN from all you pixel lovers out there!
Originally Posted by Jess Bowers Exactly! I tend to set the Virtual Frame Size in order to resize the frame and keep the ability to scroll. I think there is an extension to accomplish this but this is the poor man's way of getting the job done.
The method is this:
Application
--> Size - 800x600
--> Resize display to fill screen - CHECKED
Frame
--> Size - 400x300
--> Virtual Width/Height - 2000x300
So, the 400x300 viewable frame is resized to 800x600 (keeping its proportions) and the sprite is allowed to explore and scroll through the entire 2000x300 level. I do this because I LOVE LOVE LOVE pixel graphics and want to see them displayed in big, bold proportions. Can I get an AMEN from all you pixel lovers out there!
That's a nice trick, thanks. The Window Control Object can do this but it's a bit funny (you have to add a little to allow for the window frame etc). In one of my games (falafel) I drew everything in the sprite editor at twice the size. I guess that would be the very poor man's way of doing it..
Also, if anyone decides to use this method for enlarging the screen, you'll need to be aware of a bug in MMF2. To see the bug, do this:
1. Open my MFA above.
2. Open the "Sample" frame in the Frame Editor.
3. Open the Layers Toobar (CTRL+K)
4. Select the layer numbered "1". This is the layer on the bottom. It should have a red lock next to it and be completely empty of objects.
5. Delete that layer! At this point, you should still have all of the objects in the top layer.
6. Run the application (F8 ).
7. Walk the sprite to RIGHT and see what happens.
As you can see, without that second "empty" layer the sprite falls right through the backdrop obstacles. It would appear that without the second layer, the backdrop obstacles are no longer recognized outside of the 400x300 window.
After you do the above, do this:
1. Change the Application size from 800x600 to 400x300.
2. Change the Frame size from 400x300 to 2000x300 (to match the Virtual Width/Height)
3. Run the application (F8 )
7. Walk the sprite to RIGHT and see what happens.
This time the sprite is able to walk on the backdrop without falling through. Pretty strange, eh?