Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Zoom object?


Steven M

Recommended Posts

Let's say I have a frame size of, for example, 320*228. Is there an object or series of code that I can use that will let me zoom in 2* on an area when the game is running (e.g from 0,0 to 160,112)?

Perspective and Lens are useless as they warp the area zoomed in on.

Link to comment
Share on other sites

if what you want is to make a double size screen, you can do it by changing the window size using the window shape object. You make the window size double, and if the resize option is selected, you will have it zoomed.

Else, i don't know about any extension, but you could try with the creen capture extension.

Link to comment
Share on other sites

if what you want is to make a double size screen, you can do it by changing the window size using the window shape object. You make the window size double, and if the resize option is selected, you will have it zoomed.

1) Checked Properties on the main program, under Window menu. Clicked "Resize display to fit window size". Main frame = 320 * 288. A frame size of 320*288 displays normally.

Shrunk window of selected frame to 160*144 as an example. Result - picture zooms in 2* fine.

2) Want to make a scrolling level. Frame resized to 660*144 as an example. Distorted graphics (main window still 320*288).

Is there a way to 'zoom' in (keeping the 160*144 area) in a larger frame to allow scrolling at 2* magnification?

Horizontally scrolling display (width=320+) = 320*144. Vertically distorted.

EDIT: I think I've got it. It's the virtual width and height I have to toggle for the level, and the 'actual' w/h for the window itself. Could be wrong, though. Have to check.

Link to comment
Share on other sites

Try using subapplication object. You can also resize it with events.

But, if what you want is a 160*144 screen resized to fit a 320*228, you should make a 160*144 game, then, resize window to double size and automatically it will zoom. But I think you want to have 4 small screens, right?

Link to comment
Share on other sites

Virtual height and width is only used if you want to make seemingly large levels that are actually just repeating itself since it's virtual height/width is larger than the actual height/width.

If you want to do what you want, you need an extension called Viewport. It allows you to zoom in/out the view on a certain area. I used it in my own game I released at SAGE 07 for a realtime zooming camera. Just note two things about this extension; one, if you're using the zoom out and get close to a frame boundary, you'll see a black border where the frame ends; two, you cannot use the Viewport to display an area outside of the frame.

For what you want to do, it sounds like you want to display an area that's half the size of the game window and resizing said display to fit the window. To do that, you'd stretch the Viewport to the real window dimensions, then tell it to zoom with the center coordinates being where the camera is looking at and the boundaries set to half the dimensions of the window. Should work just fine.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...