Size of viewport on world maps?

Chris H.'s Ultima / ACS-style game development system!

Moderators: Ice Cream Jonsey, joltcountry

rld
Posts: 223
Joined: Sun Jan 25, 2009 2:17 am
Location: Dallas, TX

Size of viewport on world maps?

Post by rld »

Is there any way to make the scrolling viewport for worldmaps larger, or is it fixed at 11 squares wide by 9 high? The ACK manual says that the viewport should be 11x11, but this may be a typo as the U4PART2 and other games I have looked at all have an 11x9 viewport.

ALSO: Since the world map viewport is 11 squares across, and mosaics are drawn at 16 wide by 11 high, does that mean that if you draw a mosaic with TMOSAIC, there is no way to get it to align properly with the view you are looking at on the world map?

Garth lurker

Post by Garth lurker »

Did you ever figure that out rld? Im interested to know more about anything map + viewer related as I am still trying to figure out the best way to make worldmaps...

User avatar
Tdarcos
Posts: 9341
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Re: Size of viewport on world maps?

Post by Tdarcos »

rld wrote:Is there any way to make the scrolling viewport for worldmaps larger, or is it fixed at 11 squares wide by 9 high? The ACK manual says that the viewport should be 11x11, but this may be a typo as the U4PART2 and other games I have looked at all have an 11x9 viewport.

ALSO: Since the world map viewport is 11 squares across, and mosaics are drawn at 16 wide by 11 high, does that mean that if you draw a mosaic with TMOSAIC, there is no way to get it to align properly with the view you are looking at on the world map?
Monitors are generally rectangular, not square, so it should be 3x4 because if I'm not mistaken a typical monitor is 3/4 as high as wide. So 12x9 would be better. Or maybe it's 16x9 or something.

I note HD television is advertising that odd improper fraction whose value escapes me which resolves down to the other value. I just looked it up, it's 4:3 (SD) or 16:9 (HD). I have just this second realized, for a long time, that I've been subconsciously reading 16:9 as an improper fraction multiple of 3/4 which it isn't.
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

rld
Posts: 223
Joined: Sun Jan 25, 2009 2:17 am
Location: Dallas, TX

Re: Size of viewport on world maps?

Post by rld »

rld wrote:Is there any way to make the scrolling viewport for worldmaps larger, or is it fixed at 11 squares wide by 9 high? The ACK manual says that the viewport should be 11x11, but this may be a typo as the U4PART2 and other games I have looked at all have an 11x9 viewport.

ALSO: Since the world map viewport is 11 squares across, and mosaics are drawn at 16 wide by 11 high, does that mean that if you draw a mosaic with TMOSAIC, there is no way to get it to align properly with the view you are looking at on the world map?
Looking at the source, the answers to these two questions appear to be:

1) No, you can't change the size of the worldmap viewport, at least not without major changes to the code. The values that determine how wide/tall the display is for worldmap regions are hardcoded in *lots* of places, so this is probably not happening anytime soon.

2) No, TMOSAIC probably won't work correctly on worldmap regions if you are trying to line up the tiles with the map display tiles. This is the same problem that you would have in room-type regions for rooms that are an odd number of tiles wide (and not an even number wide), because the map is centered in the display area. There might be a way to work around this by adding a feature to allow TMOSAIC tiles to be offset by half a tile.

A better way would be an option that allowed mosaics to be aligned to the upper-left corner of the room/map on the screen, regardless of size, but this would be more complicated to implement.

rld
Posts: 223
Joined: Sun Jan 25, 2009 2:17 am
Location: Dallas, TX

Post by rld »

Interesting side note here that I discovered while tinkering around with the Ultima II remake game:

The size of the viewport in worldmap regions limits the actions of creatures to those that are visible to the player. For instance, if you have a stationary enemy creature shooting at you, and you move away from it so that it is one tile 'offscreen', it will not continue to fire at the player. Only creatures within the 11x9 window are activated each turn, so once a creature goes offscreen, it is frozen until the player moves within visible range of it again.

However, the player is not necessarily so limited. If you are using a 'cone' or 'stream' distance weapon, the effects of this weapon are not limited to the 11x9 viewport. If you set the weapon range to a large enough number (16 is the max), it is perfectly possible for the player to 'blast' offscreen enemies, sight unseen, simply by pointing the weapon in the right direction.

Garth Lurking

Post by Garth Lurking »

HAAX!!! :D Good info rld. Could set up an enemy that can only be defeated by using this tactic. >:D

Garth Frustrated

Post by Garth Frustrated »

That problem you mentioned with world map viewer size is causing me major headaches while trying to copy this mega huge map from Photoshop tile by tile. I can only see that tiny 11x11 or whatever view in the editor and when i move on an empty map there is no way of telling where the edges of each cell are, especially since they are beyond the edges of the view.

Fill would have been handy for that, just fill the viewable area with some filler tile like a generic grey tile made just for that purpose to mark the boundaries of a cell, but that doesn't work because of the different sized viewer.

On top of that i found some screwy behavior with the map editor on custom maps. When I try to set up a checkerboard pattern of cells using two different colored tiles [i.e. 1 16x16 cell gets covered with light grey, the next one dark grey, and so on] it shows the pattern beyond where i placed them even when there are no numbered cells there and no endless terrain set. Sometimes it will disappear if i move the view one direction and it comes back when i move back.

I made sure i found the true edges of the cell i was filling by adding a four by four cell area occupied by copies of the same cell so that when i edited one they all changed [takes forever for the change to take effect though which is pretty annoying to work with too, and im not working with set later tiles here either].

Oh by the way, this is just an empty game with nothing in it defined or imported at all, I created for map test purposes. Anything i need for mapping I just create it on the fly in the tile and object editors. So right now all the tiles I plan to use to build my initial map are just basic solid colors that match a legend on my actual prerendered map in Photoshop.

The colors represent biomes and the map resized and warped to fit within the constraints of 255 cells that are 256x256 pixels each and the grid in PS is showing 256x256 cells as well. I also used a PS action in conjuction with my numberpad to quickly create a numbering scheme to overlay the entire map. So every cell with any land in it was already numbered before i ever entered the ACK map editor.

Initializing the cells in the custom map editor was the easy part since i already had a visible map with grid and numbers right beside the ACK editor to follow.

Garth Maptastic!

Post by Garth Maptastic! »

Well, i figured out part of my problem. Having undefined cells between some of my defined cells was producing some unexpected behaviour. When i entered a defined cell and panned in the direction of an undefined cell expecting to to see a black area i would see instead the cell i defined further away beyond the undefined one. So in the editor it skips right over undefined cells and acts as if they are adjacent. Is that a bug, doesn't seem like it should be doing that. i mean if i wanted them adjacent i would have made them that way. Anyway i set my endless terrain to water to fix that.

Garth the Cartographer

Post by Garth the Cartographer »

I made 2 macros with AutoHotKey [excellent opensource tool by the way]. One to draw a lightgrey 16x16 tile outline in the proper place when it is run from the custom map screen where all the cell numbers are shown. And another one to draw a dark grey outline in the same manner. So all i had to do was start at cell 1 and keep hitting arrow key then macro hotkey1, arrow key, then macro hotkey2, rinse, repeat. Using this method i was able to get a cell grid to cover the entire 255 cell world map as a nice little visual aid while trying to find and keep my place on the map while drawing it. :D

Doctor HAAX

Post by Doctor HAAX »

HAAX!

*hurls monitor at Garth*

Garth be Nimble

Post by Garth be Nimble »

*Garth dodges the cathode ray tube missile allowing it to continue its trajectory to whichever unlucky fellow happened to be standing behind him...*

Post Reply