scrollable map screen ??

General discussions about the games by Egosoft including X-BTF, XT, X², X³: Reunion, X³: Terran Conflict and X³: Albion Prelude.

Moderator: Moderators for English X Forum

Post Reply
Cursed Ghost
Posts: 652
Joined: Sat, 2. Oct 04, 22:44
x3tc

scrollable map screen ??

Post by Cursed Ghost »

Hi all

Don’t know if anyone ever thought to try this or if it's even possible but I was wondering if there is any way to make the map screen scrollable? because at the moment if you want to see stuff that’s off screen you need to zoom but having the ability to both scroll and zoom the map screen would make for a better user experience. Some how I suspect this is not possible, well not without access to the source code anyway because if it was I'm sure someone would have already written a mod for it, but it doesn't hurt to ask I guess.

To be honest I'm surprised Ego never though to implement this because its not like it's hard to do.
linolafett
EGOSOFT
EGOSOFT
Posts: 3478
Joined: Mon, 26. Mar 12, 14:57
x4

Re: scrollable map screen ??

Post by linolafett »

What do you exactly mean with scrollable?
Click+drag with your left mouse button allows you to "pan" along the map without needing to zoom out and in to get to nearby locations.
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25051
Joined: Sun, 2. Apr 06, 16:38
x4

Re: scrollable map screen ??

Post by X2-Illuminatus »

Which game is this about? In the X3 games (possibly earlier games, too), you can already scroll the map by using the numpad keys. Additional, having an object selected and pressing "Pos 1" that very object is centred on the map.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
Cursed Ghost
Posts: 652
Joined: Sat, 2. Oct 04, 22:44
x3tc

Re: scrollable map screen ??

Post by Cursed Ghost »

Which game is this about? In the X3 games (possibly earlier games, too), you can already scroll the map by using the numpad keys. Additional, having an object selected and pressing "Pos 1" that very object is centred on the map.
The thing you call scrolling isn’t scrolling when I say scrolling I mean scrolling like in a browser

aka I tap on the arrow keys on the number pad and when the cursor gets to the edge of the viewport instead of going off the screen the map screen would scroll in the direction I'm tapping so in the case of orebelt for example if I tap up then when the cursor gets to the top of the screen the display would scroll up no zooming necessary.

For example see this screen shot of orebelt taken from the interactive map I've been building

https://i.ibb.co/LrRBQj5/screen-shot.png

As you can see I've scrolled the screen up a bit this is what I meant when I say scrolling. I ask because in the later games when you have very large sectors it can be difficult to figure out where stuff is because the only way as far as I'm aware to be able to view stuff that is off screen is to zoom but there are some sectors where it's still not possible to see everything even when you fully zoom the map out Maelstrom in TC is a good example of this even when you fully zoom the map out its still not possible to see where the west gate is in relation to where my ship is because it remains off screen, and there are also any number of sectors through out the various games in the series where you get a whole bunch of stuff that is off screen Ore Belt being one example and T'kr's Deprivation is another.

The Terran sectors in TC and AP are a particularly aggravating nuisance to because the default zoom level for those sectors is to small and its zoomed in way to much, that's something else as well it would be nice to have more fine-grained control over the zoom level rather then just predetermined jumps for example you zoom in once and the zoom level automatically goes to 200% but what if I don't want to zoom to 200% what if I only want to zoom to 150% or what if for very big sectors instead of zooming to 50% which is currently the most you can see the map out I want to be able to zoom to 10%

In my opinion being able to scroll the screen like that and having more fine-grained control over the zoom level would make for a better user experience. Now I don't know if its possible to do either of these things with mods but some how I suspect not, or in all likelihood someone would have done so already but again I guess it doesn't hurt to ask.
Nanook
Moderator (English)
Moderator (English)
Posts: 28098
Joined: Thu, 15. May 03, 20:57
x4

Re: scrollable map screen ??

Post by Nanook »

Cursed Ghost wrote: Wed, 23. Oct 24, 23:17....

In my opinion being able to scroll the screen like that ... would make for a better user experience. ...
I respectfully disagree. Panning with the mouse is much easier and quicker to get to another spot on the map. Consider with scrolling you need two scroll bars, one horizontal and one vertical. To get to another spot on the map, you have to first move the mouse to each bar and then adjust each individually, sometimes multiple times, until you get to the desired location. With panning, it's just a simple matter of clicking and dragging the mouse in the appropriate direction, a single action.
Have a great idea for the current or a future game? You can post it in the [L3+] Ideas forum.

X4 is a journey, not a destination. Have fun on your travels.
Cursed Ghost
Posts: 652
Joined: Sat, 2. Oct 04, 22:44
x3tc

Re: scrollable map screen ??

Post by Cursed Ghost »

I think you misunderstand what I mean when I say scrollable like in a browser first off I'm not suggesting adding scroll bars, when I say scroll like in a browser I'm referring to the ability to move the the map around inside the window so that the player can see stuff that is not normally displayed in the window.

about the best way I can think of to describe it is this imaging you have your browser open and imagine on the page there is a box that is set to overflow hidden without scroll bars or the ability to move the content of the box around its not possible to see the parts that are cut off, so how do you deal with this without adding scrollbars easy you can make the content scrollable programmatically via scripting so you just press and hold the mouse button and then when you move the cursor around the content move along with it.

here I whipped up a little demo that should better explain just copy the code paste it in to notepad and save as a html file and make sure that you have an image that is bigger then 513px by 513px and then if you click on the image hold the mouse button and move the mouse around you will see that the image moves and this is what I'm suggesting when say make the map screen scrollable.

now you could make the map scrollable by just clicking and dragging with the mouse as I've done here or you could make it scrollable with the mouse wheel as I've also demonstrated in the demo by default the mouse wheel will scroll up and down but if you hold shift it will scroll left and right instead it would also be possible to make this work by just pressing the arrow keys on the number pad which is what id recommend as this would seamlessly integrate with the excising set-up

now at the moment when the cursor gets the the edge of the map window it just vanishes off the screen but with something like this implemented then the map would start to scroll once the cursor hits the edge of the window this I think would make for a better user experience I mean something like this would certainly be better than what is implemented now.

Code: Select all

<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<style>

div#frame
{
width:513px;
height:513px;
overflow:hidden;
}

</style>

</head>

<body>

<div id="frame">

<img src="image.png" alt="">

</div>

<script>

var element = document.querySelector("#frame");

var startY;
var scrollTop;

var startX;
var scrollLeft;

element.onmouseover = cursor;
element.onmousedown = mouse_down;

function mouse_down(event)
{
  event.preventDefault();

  startY = event.pageY - element.offsetTop;
  scrollTop = element.scrollTop;

  startX = event.pageX - element.offsetLeft;
  scrollLeft = element.scrollLeft;

  document.onmouseup = mouse_up;
  element.onmousemove = mouse_move;

  cursor(event);
}

function mouse_move(event)
{
  event.preventDefault();

  var y = event.pageY - element.offsetTop - startY ;
  element.scrollTop = scrollTop + y;

  var x = event.pageX - element.offsetLeft - startX;
  element.scrollLeft = scrollLeft + x;

  cursor(event);
}

function mouse_up(event)
{
  document.onmouseup = null;
  element.onmousemove = null;

  cursor(event);
}

element.onmouseout = cursor

function cursor(event)
{
  if(event.type == "mouseover" || event.type == "mouseup")
  {
    element.style.cursor = "grab";
  }

  if(event.type == "mousedown" || event.type == "mousemove")
  {
    element.style.cursor = "grabbing";
  }

  if(event.type == "mouseout" || event.type == "load")
  {
    element.removeAttribute("style");
  }
}

element.onwheel = mouse_wheel

function mouse_wheel(event)
{
  event.preventDefault();

  var step = 48; // How many pixels to scroll

  if (event.deltaY > 0 && event.shiftKey == false)
  {
    // Scroll down when shift key isn't pressed
    element.scrollTop += step;
  }

  if (event.deltaY < 0 && event.shiftKey == false)
  {
    // Scroll up when shift key isn't pressed
    element.scrollTop -= step;
  }

  if (event.deltaY > 0 && event.shiftKey == true)
  {
    // Scroll right when shift key is pressed
    element.scrollLeft += step;
  }

  if (event.deltaY < 0 && event.shiftKey == true)
  {
    // Scroll left when shift key is pressed
    element.scrollLeft -= step;
  }
}

</script>

</body>
</html>
Nanook
Moderator (English)
Moderator (English)
Posts: 28098
Joined: Thu, 15. May 03, 20:57
x4

Re: scrollable map screen ??

Post by Nanook »

Cursed Ghost wrote: Sun, 10. Nov 24, 19:36...

now you could make the map scrollable by just clicking and dragging with the mouse...
Which is how it works now. In addition, if you want to go further, just let up on the mouse button while the map is still in motion, and it will continue in that direction for a ways depending on how fast you were moving the mouse. Once you've trained yourself, you can effectively move the map several sectors, depending on your current zoom level, with just that one motion. I find this more than adequate for my needs to efficiently navigate the map. YMMV. :wink:
Have a great idea for the current or a future game? You can post it in the [L3+] Ideas forum.

X4 is a journey, not a destination. Have fun on your travels.
Cursed Ghost
Posts: 652
Joined: Sat, 2. Oct 04, 22:44
x3tc

Re: scrollable map screen ??

Post by Cursed Ghost »

Which is how it works now.
err since when ?? because it most certainly does not work like that in xbtf, xten, x2, x3r, x3tc or x3ap

maybe this is something that was implemented in x4 onwards but I wasn't asking about x4 or later, if I was I would have posted this on the x4 board as far as I'm aware the only way to see stuff that is off screen in xten, x2, x3r, x3tc or x3ap is to zoom hence the question about making the map screen scrollable so if I have the screen for say ore belt open and I want to see everything above the north gate right now my only option is to zoom I'd like to be able to scroll the window up rather then zooming the screen out or selecting an object from the list and then zooming in don't get me wrong being able to zoom is handy but on its own its insufficient.

because much like the situation I described above where you have an overflow container that is set to hide the overflow you need some kind of ability to move the content of the container around or its not possible to see the parts that are normally hidden, and the same applies here with sectors like ore belt where a lot of the content is not visible in the window by default, ideally players should have the ability to scroll the window allowing them to see the parts that are normally hidden without zooming.

Of course there are any number of ways that such functionality can be implemented, by clicking and dragging with the mouse, by scrolling with the mouse wheel, by tapping keys on the keyboard etc so its not an either or proposition just depends on how may options you want to give players.

now somehow I suspect that this is not possible via a mod because if it was I'm sure someone would have done it already, although if it is possible via a mod I can't say that I've managed to find any, and if as I suspect its not possible via a mod the question becomes is there any chance of getting said functionality added, some how I suspect the answer is no but I guess it doesn't hurt to ask.

While your at it maybe you can make the ui rescale when playing in higher resolutions and give players more fine grain control over the zoom level, along with fixing issues that brake the plot such as destroying the xenon power station / M0 before getting to the relevant part of the plot in xbtf which then results in having to start the game from the beginning again unless you have a save before you destroyed the xenon power plans / M0.

Oh and lets not forget about the issues with you personal account and your station accounts overflowing if you have to many credits which results in your stations becoming bugged and useless and yes I've had this happen to me in xten or your personal account overflowing which results in the whole game becoming bugged and unplayable, since in xbtf for example the max credits you can have in your personal account is 20 million which doesn't take very long to reach if you have a lot of stations which most players if there smart will because its the fastest and easiest way to make credits since trading is a none starter since your cargo hold is to small and costs to much to upgrade and you get little if any return from combat.
jlehtone
Posts: 22201
Joined: Sat, 23. Apr 05, 21:42
x4

Re: scrollable map screen ??

Post by jlehtone »

I did just load X3R and X3TC. No "drag with mouse" on sector map.

However, the "cursor" can be moved on the map with Numpad keys (8, 6, 2, 4) and snapped on object with Numpad 5.
On X3TC the "viewport" pans with cursor movement -- keeps the cursor visible.
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.
Nanook
Moderator (English)
Moderator (English)
Posts: 28098
Joined: Thu, 15. May 03, 20:57
x4

Re: scrollable map screen ??

Post by Nanook »

Cursed Ghost wrote: Mon, 18. Nov 24, 16:25
Which is how it works now.
err since when ?? because it most certainly does not work like that in xbtf, xten, x2, x3r, x3tc or x3ap...
Oops, you're right. :doh: I was bouncing around the forums and forgot which one I was posting in. Sorry about that.
Have a great idea for the current or a future game? You can post it in the [L3+] Ideas forum.

X4 is a journey, not a destination. Have fun on your travels.
Cursed Ghost
Posts: 652
Joined: Sat, 2. Oct 04, 22:44
x3tc

Re: scrollable map screen ??

Post by Cursed Ghost »

On X3TC the "viewport" pans with cursor movement -- keeps the cursor visible.
Really ?? well that’s odd because I have the CD version of TC updated to 3.4 and when I open the sector map for say Ore Belt and hit the up arrow key on the number pad the cursor just vanishes off the screen and the windows doesn't scroll.
Oops, you're right. :doh: I was bouncing around the forums and forgot which one I was posting in. Sorry about that.
Ok so after playing around some more it turns out that we where both right and both wrong, that is to say it is possible to scroll the sector map from x2 onwards but only when the window is zoomed in, that is to say the zoom level is at least 200%, if you try to scroll the window when at the default zoom level of 100% or when zoomed out scrolling doesn’t work, the cursor just vanishes off the screen. Certainly this explains why I've been having issues because I've been trying to scroll the screen at the default zoom level of 100%, which is why I didn't think scrolling was possible at all since I don't really use zoom and therefore tend to keep the zoom level at it's default value of 100%.

So the question is why does the scrolling of the sector map only work when the window is zoomed in when players would rightly expect as I did for it to work regardless of the current zoom level?

Also is there any chance of getting this fixed and getting scrolling decoupled from zoom so that the player can scroll/pan the sector map regardless of the zoom level? Which in my opinion is how it should have been implemented in the first place.
Post Reply

Return to “X Trilogy Universe”