Jump to content
The Dark Mod Forums

In-game map ratio: being stretched


Bikerdude

Recommended Posts

The image is 1024*768 and the map_of def is as follows -

windowDef Desktop
{
    rect      0,0,1024,768
    nocursor 1

    windowDef background_map
    {
        rect      64,48, 768, 1024
        background "guis/assets/game_maps/map_of"
        visible 1
    }
    // Required include for inventory map
    #include "guis/readables/inventory_map.guicode"
}
Link to comment
Share on other sites

Here's what I can gather:

 

 

 
    windowDef Desktop
{
    rect      0,0,640,480
    nocursor 1

    windowDef background_map
    {
        onNamedEvent initBackground_4x3
        {
        set
        rect      64,48, 768, 1024
        background "guis/assets/game_maps/map_of_4x3"
        visible 1
        }
        
        onNamedEvent initBackground_5x4
        {
        set
        rect      64,48, 1024, 1280
        background "guis/assets/game_maps/map_of_5x4"
        visible 1
        }
        
        onNamedEvent initBackground_16x9
        {
        set
        rect      64,48, 720, 1280
        background "guis/assets/game_maps/map_of_16x9"
        visible 1
        }
        
        onNamedEvent initBackground_16x10
        {
        set
        rect      64,48, 900, 1440
        background "guis/assets/game_maps/map_of_16x9"
        visible 1
        }
    }
    // Required include for inventory map
    #include "guis/readables/inventory_map.guicode"
    
    }
 

 

You'll need background images for each screen ratio.

 

The only thing that puzzles me here is that your window is set to 1024x768 while the background map is set to 768x1024.

i kept that reverse convention above but perhaps that is part of the original problem?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Yeah, but you'll need each image:

 

guis/assets/game_maps/map_of_4x3

 

guis/assets/game_maps/map_of_5x4

 

etc.

 

Did you try reversing:

 

rect 64,48, 768, 1024

 

to

 

rect 64,48, 1024, 768

 

?

 

I'll test that tonight if you don't get a chance or you don't use the above spyglass style fix.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

  • 1 month later...

Biker-

 

This problem puzzled me for a while. I ended up adding naturalmatscale 1 to my def.

I also did a bunch of trial and error to get the placement and ratios to work okay in the windowdef. See below

 

My map file are sizes are 2048 x 1536 TGAS. I think its worth the extra cost to get a nicer, more detailed map. However, I've only tested it on 16x9 screens :(

 

Nbohr1more's method seems pretty solid though. Have you had a chance to test it?

 

 

windowDef Desktop

{
rect 0,0,640,480
nocursor 1
naturalmatscale 1
windowDef background_map
{
rect 64, 0, 480,480
background "guis/assets/game_maps/map_of"
visible 1
}
// Required include for inventory map
#include "guis/readables/inventory_map.guicode"
}

 

Link to comment
Share on other sites

Any graphics that are not saved as powers of 2 will be stretched and resized by the engine, which produces blurrier results.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...