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

 
 

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

Submitter:  Frans de Jonge <frenzie>
Submitted:  Sun 11 Oct 2009 09:02:00 PM UTC
   
 
Category:  scenario builder Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 25 Jul 2010 08:59:10 AM UTC, 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>
Group administrator
Sun 25 Jul 2010 08:05:37 AM UTC, 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.

http://www.dailymotion.com/video/xe5c1h_lordsawar-making-a-new-map-from-an_videogames

Ben Asselstine <benasselstine>
Group administrator
Sat 24 Jul 2010 04:13:24 PM UTC, 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>
Group administrator
Sat 24 Jul 2010 03:12:21 PM UTC, comment #10: 

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

Frans de Jonge <frenzie>
Group Member
Sat 24 Jul 2010 02:45:55 PM UTC, comment #9: 

I've hacked something up for the "new map" portion of this task.
http://www.dailymotion.com/video/xe547y_lordsawar-making-a-new-map-from-an_videogames

What do you think?

Ben Asselstine <benasselstine>
Group administrator
Fri 23 Jul 2010 04:25:32 PM UTC, comment #8: 

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

Frans de Jonge <frenzie>
Group Member
Fri 23 Jul 2010 03:43:07 PM UTC, 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>
Group administrator
Fri 23 Jul 2010 02:38:45 PM UTC, 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>
Group Member
Fri 23 Jul 2010 01:21:35 PM UTC, 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>
Group administrator
Fri 23 Jul 2010 10:35:19 AM UTC, 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>
Group Member
Fri 23 Jul 2010 09:42:52 AM UTC, comment #3: 

Questions:

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>
Group administrator
Mon 12 Oct 2009 08:46:24 AM UTC, 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>
Group Member
Mon 12 Oct 2009 08:28:26 AM UTC, 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>
Group administrator
Sun 11 Oct 2009 09:02:00 PM UTC, 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>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-10-11 frenzie Attached File- Added LordsAWar! Scenario Editor Idea.png, #18860

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code