Background and grid misaligned when grid larger than window

Post here your questions about the OpenSpace 1.x or notify bugs and suggestions.

Moderators: Lapo, Bax

chrisrta
Posts: 3
Joined: 05 Nov 2009, 18:19

Background and grid misaligned when grid larger than window

Postby chrisrta » 05 Nov 2009, 18:52

I have a map set up where the tile grid is larger than the background image (and larger than the application window) like below:

Image

All my maps like this are misaligned during runtime, however (unfortunately can't screencap as grid is not visible during runtime). The background is shown very slightly offset from the application window, and the walkable area is shifted dramatically up and to the left. If I add a foreground, that is also shifted over - aligning with neither the background nor the tile grid.

I've tested various configurations, and the problem starts showing up when the grid is larger than the app window. Even making the background larger than the grid (and larger than the app window) doesn't fix the problem.

What I want to accomplish is to have just an 800x600 window with a foreground and background image, both also 800x600, that just sit there lined up in the app window. I need the grid to be larger than the window so I can put tiles farther out into the corners of the window than would otherwise be possible.

We are running Openspace in conjunction with Flex.

Thanks!
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 06 Nov 2009, 08:40

Can you please enable the grid at runtime (you have a parameter in the openspace xml config file) and show a screenshot? And a screenshot taken from the Editor, showing how the map should be rendered.
This problem has never been reported before, especially on maps with a background larger than the grid.
Paolo Bax
The SmartFoxServer Team
chrisrta
Posts: 3
Joined: 05 Nov 2009, 18:19

Postby chrisrta » 06 Nov 2009, 18:07

Thanks for the reply. Here is the map in the editor:

Image

...and here it is at runtime:

Image


Now that I see it, it looks like the grid has been scaled down. I did increase the size of the tiles manually in the xml, as described in the documentation. However, I ruled that out as a factor, since the problem still occurred when I made a new map from scratch with the tiles initially defined at the larger size. Also note that I reverted the background back to being smaller than the grid when the experiment of making it larger didn't pan out.

Thanks again for the help.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 07 Nov 2009, 07:05

This is quite strange. It has never been reported before.
Are you able to render the same map in Flash, instead of Flex. I want to make sure it is not a problem related with Flex containers.
Paolo Bax
The SmartFoxServer Team
chrisrta
Posts: 3
Joined: 05 Nov 2009, 18:19

Postby chrisrta » 09 Nov 2009, 21:37

Ok, we were able to figure it out.

It turns out the elements we used in the movie clip to make the wrapper were not the same size as our final app window (it was created before we know what the final requirements would be). Both the document dimensions and the Openspace component were of different sizes. This caused the background and foreground to not line up. Also, this didn't cause a problem until I tried to make the grid larger than the window, so it didn't occur to us to check there at first. Additionally, when I changed the tile size in the map editor file, I neglected to change it in the config file for the project, so it rendered the grid at the smaller size. So, these two unrelated factors combined to make what seemed like a single problem with the display of our map.

Thanks for the help, and for the quick replies.

Return to “OpenSpace v1 discussions and help”

Who is online

Users browsing this forum: No registered users and 33 guests