EventEditor --> StoryboardControll --> Set Virtual Width, Set Virtual Height
I made a test application with counters, but i cannot see any difference even if the values ( Virtual Height/ Width ) are below 0.
What does Virtual Height/ Width do?
Printable View
EventEditor --> StoryboardControll --> Set Virtual Width, Set Virtual Height
I made a test application with counters, but i cannot see any difference even if the values ( Virtual Height/ Width ) are below 0.
What does Virtual Height/ Width do?
Frame Width/Height specifies the size of the frame that is shown to the user.
Virtual Width/Height specifies the size of the frame that can be scrolled to. If set to -1, you have quasi-infinite space in that direction.
Frame Width Heigth dont change the the size of the frame i can see ( i can allways see the gradient background no matter what ), it however seems to instantly destroy/ hide objects wich are outside the Width Height area, if i increas the area again they dont reappear ( see attachment ).
It's actually working. The problem is you can't see it because you have nothing scrolling. The play field is getting larger, but have to scroll. I uploaded your example with an object set to 8 direction movement with scrolling set. I even added a backdrop outside of the playfield and expanding it made it visible. (I didn't have the backdrop in the edited example I posted, but easy enough to test yourself).
Shawn, your version doesnt do anything new for me ( other than scrolling a few pixels ). I place 32x32 backdrops outside each corner of my frame, but they never apear no matter how high or low i set the frame Width and Height.
...
I dont get it, whats supposed to happen?
Is there something worng with my version of MMF2 or am i missing something here?
Yeah that's really odd. It worked fine on my end. I have no idea why it wouldn't work. What build are you using?
MMF2 Developer Build R254
Shawn, could you post a coupple of screen shots illustrating whats happening on your end?
Yeah I'm using Build R254 as well. Ok here's a pic
Attachment 5680
The active on the right is outside the original play area (it's the active I set to 8 direction movement). It expanded as I pressed W as you can see with the counters. The backdrop on the right was placed outside of the play area originally and is now inside it as you can see. It will keep on expanding as much as you like.
Is that what you are attempting to achieve? Or am I misunderstanding?
Also, just to note, you can't shrink it smaller than the original size of the frame. And it will always expand using the top left 0,0 as the starting point. so anything placed outside of the play area on the left or top won't ever show up. So, let's say you wanted to make a level taller and your window is 800 x 600. If you change it to be 800 x 1200 you have to move everything down. It won't expand up, only down.
One time I wanted to make a level grow taller. I got around this problem by using fastloops and looping through an array to create my background. When I changed the level size, I erased the created objects, ran the loop again this time place them at coordinates for the new size (so, if the floor was 600, on the second loop floor was 1200). Then I changed the player's Y coord to be at the bottom.
Works ok on my end too?
I see, thats not whats happening for me at all.
...
This is how my frame looks:
( see ScreenResizeRAW.PNG, below )
This is whats happening at my end ( counter values are the same as in your screenshot ):
( see ScreenResizeTest.PNG, below )
Even if i fullscreen the window, the objects outside the frame are not visible:
( see ScreenResizeTestFullscreen.PNG, below )
...
Thank you for helping me out Shawn.
So, should i report this as a bug or something?
That is very strange. I have no idea why it wouldn't be working on your end. Maybe PM Yves or someone and ask if they have any idea why it might not work for you but works for others.
This is wrong, Set Frame Width/Height doesn't change the size of the frame that is shown to the user at all. It changes the dimensions of the frame, the ones you can see in the frame properties. If you want to change the size of the area that is shown to the user you have to use the "Frame Window / Set Width/Height" actions of Window Control object. These actions also contain a parameter that allow to resize the size of the frame at the same time.
Oh my.
I thought for scrolling purposes that SortaCore's statement was correct. Well, back to MMF pre-school for me, I guess.LOL.
Marv
OK, makes sense, but i have issues with changing Frame Height and Wdth.
...
Try this:
What happens if you reduce the frame Width/ Height to lowet than its original parameters? ( try FrameA in .mfa attachment )
- As i see it, although the Frame is reduced in size, i can still see all elements which were there when the App was at original size, in other words 'i can see whats outside of the Frame'!
If your Frames size is lower than your App size ( example: App 640x480 Frame 320x240 ) and you then increase your Frame size to fit the App size ( 640x480 ), what hapens? ( try FrameB in .mfa attachment )
- Youd think youll be able to see 640x480 pixels of the entire Frame ( since your App size is at 640x480 ), but no all you can see is 320x240 of the Frame although your App size should be 640x480
King Cool, you need to also resize the Frame Window. The Frame Size is used merely for things like movements and such, the Frame Window is used for viewing varying amounts of the frame. Also make sure to tick the Do Not Center Frame Area In Window option in the application properties, or you'll get unintended side effects.
I see.
So is there any way of altering the Frame Window size, without using the Window Controll object?
No.
Shawn your example doesn't work for me as well.
That's strange. I wonder what could be causing the difference?
Shawn, your example ( called "WindowResize Scrolling.mfa" ) is working for me, im guessing it worked all along.
I must have been confused by what SortaCore said and what Frame Width/ Height actually does, or i might have confused the arrow key controlls ( in your example ) with the WASD controls, or both.
Ah yeah, the default for 8 direction movement is arrow keys. I didn't bother to do anything to adjust it.
I still don't quite understand what virtual width/height are used for. What kind of potential applications do they have?
Infinite scrolling. Jeff has an example I believe. It's just used for internal things like wrap around play area and object leaves/enters frame area.
Just to add to LB's answer. This is from the help file:
Virtual Width
Very useful for huge scrolling games: defines the virtual width of the frame. A large virtual width allows you to scroll on a large surface, larger than the frame itself. If the Wrap option is selected in a layer, the background of this layer will wrap automatically when it reaches the real width of the frame. For example, a frame size of 640x480 and a virtual width of 10000 will enable the player to scroll up to the position 10000 on the right without being stopped. If you enter -1 in this field the scrolling is quasi-infinite.
Virtual Height
Same as above, vertically.
Marv
I see... Infinite scrolling as in repeating/looping levels? I had always achieved this using the layer object instead of moving the camera, and having the layer set to wrap.