bugLordsAWar! - Bugs: bug #27673, Add Capability to Load an Image in...


bug #27673: Add Capability to Load an Image in the Background

Submitted by:  Frans de Jonge <frenzie>
Submitted on:  Sun Oct 11 21:02:00 2009  
Category: scenario editorSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Sun Jul 25 08:59:10 2010, comment #13:

The next problem I'm considering here is the background image's relationship to a saved map.

The idea here is that we've started the process of creating a new map from an image, and now we want to save our work and come back to it later.

We can save the background image and the settings (top/left/scale) in the map file.

The alternative is to expect the user to load the background image with the same settings next time.

One restraining factor here is that we don't have save-files for the editor, and save-files for games. They are the same, except the saved-game files contain more information. The background image stuff is intended specifically for the scenario editor as a tool for setting tiles on the map.

Now imagine that the background image isn't just used as a background image for editing purposes, it is the map to be displayed underneath tiles during a game. This allows for large finely drawn maps in the game (e.g. remember the transparent cities from an earlier post.)

If we go with that feature, it means that the background image should be part of the saved map, and drawn before any of the tiles are drawn.

A side effect of this approach is that the background image is retained in the saved game file, even if it is completely covered by tiles.

Ben Asselstine <benasselstine>
Project Administrator
Sun Jul 25 08:05:37 2010, comment #12:

I've added top/left offsets, and also added two new buttons: fit and center.

It's not perfect but I guess it works.


Ben Asselstine <benasselstine>
Project Administrator
Sat Jul 24 16:13:24 2010, comment #11:

Perhaps. And after that it would be easier to make the picture box draggable. And after that, the mouse wheel could be attached to the scale button.

Isn't it reasonable to presume that the user has a picture of a map that they're comfortable with?

Other parts of the scenario editor presume the user has basic command of an image editor.

On the other hand I can imagine an average user bringing in a horizontally rectangular image, and then expecting to get the center of it on a vertically rectangular map. I would guess that most map images are horizontally rectangular or are square.

Ben Asselstine <benasselstine>
Project Administrator
Sat Jul 24 15:12:21 2010, comment #10:

Looks very good to me. Perhaps it needs some means to specify top and left offsets?

Frans de Jonge <frenzie>
Project Member
Sat Jul 24 14:45:55 2010, comment #9:

I've hacked something up for the "new map" portion of this task.

What do you think?

Ben Asselstine <benasselstine>
Project Administrator
Fri Jul 23 16:25:32 2010, comment #8:

Well, that's essentially the same thing. :P

Frans de Jonge <frenzie>
Project Member
Fri Jul 23 15:43:07 2010, comment #7:

I had the gimp's resize canvas dialog in mind.

I'm not going to make it as interactive though. e.g. no clicking and dragging on the overlapping boxes.

Ben Asselstine <benasselstine>
Project Administrator
Fri Jul 23 14:38:45 2010, comment #6:

That sounds perfect to me.

What you're saying about what part of the image is on the map reminds me of how you can drag and resize layers outside the viewport in Photoshop. I'll look into making a video of it if you don't know what I'm talking about.

Frans de Jonge <frenzie>
Project Member
Fri Jul 23 13:21:35 2010, comment #5:

I'm imagining a dialog where you give it the background image, and then it automatically guesses the tile dimensions and image scale.

It should be able to change the tile dimensions to anything you want. Also it should be able to change the dimensions to the "normal" size, the "small" size, or the "tiny" map size.

It should also be able to change the scale of the background image.

The relationship of the background image to the map size should be displayed in a way that makes it clear which part of the background image is on the map, and which isn't.

Ben Asselstine <benasselstine>
Project Administrator
Fri Jul 23 10:35:19 2010, comment #4:

Some stretching could be useful, but beyond making it fit to a certain number of tiles (i.e. no half-tiles on one or more sides) that would probably cause visible distortion. Or even that little bit of stretching might have strange consequences depending on the specifics of the image, in which case having some half-filled tiles at the edge of the map wouldn't be the biggest problem.

I think it might make sense to automatically have a certain number of tiles based on the dimensions of the image, or at least a certain ratio of them.

I'm not sure if that helps you?

Frans de Jonge <frenzie>
Project Member
Fri Jul 23 09:42:52 2010, comment #3:


Would the background image be stretched to fit the map?

I expect your answer to that is no.

Maybe it would make more sense to add it to new map somehow. This would allow the miniature map can have the right number of tiles.

What do you think?

Ben Asselstine <benasselstine>
Project Administrator
Mon Oct 12 08:46:24 2009, comment #2:

Sorry, I wasn't clear enough. What you said would be really sweet, but I was just referring to making it easy to copy a map. You could just have the map/image in the background and then it's easy to copy the coastline, add the cities in the right places etc. It would purely be a feature in the editor. Combined with "smooth map" I think that could really make it easy to make maps based on, um well, maps.

Frans de Jonge <frenzie>
Project Member
Mon Oct 12 08:28:26 2009, comment #1:

I have also thought of this feature, but I haven't implemented it yet.

I want to add: "File->Import Background" to the scenario editor. It would scale the image to be the right size, and then cut it up into tilesized pieces.

Three reasons I haven't done this already are:
1. Because it would grow the tarball by a lot,
2. I don't have an appropriately licensed background image,
3. WL2 didn't let you do this.

You could even have blank city images, and rely on the background image to give you different looking cities. Or perhaps other than blank, you could have a few player-coloured flags sticking up out of the ground. And for razed cities the raze image would just be some localized fires.

Ben Asselstine <benasselstine>
Project Administrator
Sun Oct 11 21:02:00 2009, original submission:

I was thinking along these lines. It would make it a lot easier to implement real world maps, LOTR and anything else that comes with maps. I recall there were several the Shire, Middle Earth and such scenarios for W2, mostly reusing a lot of the Erythea army sets.

Frans de Jonge <frenzie>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by benasselstine (Posted a comment)
  • -unavailable- added by frenzie (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Oct 11 21:02:00 2009frenzieAttached File-=>Added LordsAWar! Scenario Editor Idea.png, #18860

    Back to the top

    Powered by Savane 3.1-cleanup