One res for editor one res for gameplay
Monkey Forums/Monkey Programming/One res for editor one res for gameplay
| ||
Hi all, the game I am working on has a level editor. When editing, I would like to use quite a high resolution, when playing the game I would like to use a 1024x768 view that is blown up to fill as much space as possible while maintaning the 1024x768 aspect ratio. Is there a recommended practice for this kind of things? Ta! |
| ||
To follow on from this, I've attempted using a couple of libs, AutoScale and AutoFit and both work well expect for having to make a trade off either by having slight gaps between tiles when image filtering is true, or by having irregular looking text/lines when image filtering is false. I'm wondering if there's a "new" better way of doing things now that Mojo has moved on a bit. |
| ||
Mojo, or Mojo 2? Mojo is still going to need something like autofit. I wrote my own implementation of it, and I don't have any issues with lines and text. It also supports Mojo 2, but it's not doing things the most efficiently for that module. Mojo 2 has SetScissor, like before, but it also has 'SetProjection2d', 'SetProjectionMatrix', 'SetViewMatrix', and 'SetViewport'. By default, Mojo 2 automatically stretches the image, unless specified otherwise. To get proper borders, you'd need to use 'SetViewport' for the actual area (Or 'SetScissor'), and 'SetProjection2d' for your "virtual resolution". For reference, view the "modules/mojo2/bananas/letterbox/letterbox.monkey" example. |
| ||
Nice one, thank you, I will give your autofit lib a go and look into the letterbox example too :) |
| ||
What tile engine are you using? If you're using Diddy's, you can use my tile extruder tool to reduce seams when the scaler is creating interpolation / seam problems. This is mainly for mojo1, since ImmutableOctet pointed out, you have more control over canvas manipulation in mojo2... |
| ||
Cheers Nobu, if I stick with Mojo1 I will definitely give the Tile Extruder a go :) I am using my own tile engine. I'm experimenting with Mojo2 and by the looks of it, it's the way to go (or at least, will be!) |