Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

You ALMOST had it perfect - 2 displays

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Gary Grigsby's War in the East 2 >> You ALMOST had it perfect - 2 displays Page: [1]
Login
Message << Older Topic   Newer Topic >>
You ALMOST had it perfect - 2 displays - 6/16/2021 8:09:04 PM   
MarkShot

 

Posts: 7089
Joined: 3/29/2003
Status: offline
Running the game in a window on one display, and the manual on the other display (see below).

What's the makes this less than perfect? You failed to implement an option for MOUSE MAP DRAG (like a held MMB).

What goes wrong it that precise scrolling one edge that corresponds to the other display is very twitchy thing. You could have made that a none problem with the above options.



Attachment (1)

_____________________________

(於 11/13/21 台北,台灣,中國退休)
Post #: 1
RE: You ALMOST had it perfect - 2 displays - 6/16/2021 8:15:13 PM   
MarkShot

 

Posts: 7089
Joined: 3/29/2003
Status: offline
Let me know if you intend to fix this.

If not, I can implement a mouse guard via like Auto Hot Key to fix it for you when the game is the active window.

This will get rid of the twitching behavior. All I need to do is select the PDF display, since my mouse guard will disable when your window loses focus. I don't know if you are familiar with www.autohotkey.com I might implement a community utility to this which allows the user to put the game on either the left or right monitor. I am on the left which is the TV.

_____________________________

(於 11/13/21 台北,台灣,中國退休)

(in reply to MarkShot)
Post #: 2
RE: You ALMOST had it perfect - 2 displays - 6/16/2021 8:40:19 PM   
MarkShot

 

Posts: 7089
Joined: 3/29/2003
Status: offline
There is another way you can fix this without a map drag button.

You could have a single UI button or hotkey function as mouse release function. (Of course, you make this a preference option.)

In essence, when the user activates your window, you capture the mouse. It cannot leave. It is like running in full screen mode. But if the user clicks the release UI button or hits the hot key (maybe MMB), the mouse is released to go anywhere and your window loses focus.

I cannot take credit for this idea. This is how DOSBOX handles running games in a Window.

But this behavior, I cannot code in AHK.

_____________________________

(於 11/13/21 台北,台灣,中國退休)

(in reply to MarkShot)
Post #: 3
RE: You ALMOST had it perfect - 2 displays - 6/17/2021 12:40:50 AM   
Joel Billings


Posts: 32265
Joined: 9/20/2000
From: Santa Rosa, CA
Status: offline
I suspect that only Pavel knows the answer to your question. He's the programmer that has been managing to squeeze new functionality out of the engine, and finding ways to improve the interface. I'll forward this to him, but I don't know if he will be in a position to provide a quick answer.

BTW, glad you are enjoying the manual. It's been nice to see the overall response to it. I can't say enough about the great work that Roger, John, Matrix and the team did to make it come out like it did. As the original WitE was an ode to the original SPI board game of the same name, the manual was an ode to the old wargame manuals that so many of us loved to read.

_____________________________

All understanding comes after the fact.
-- Soren Kierkegaard

(in reply to MarkShot)
Post #: 4
RE: You ALMOST had it perfect - 2 displays - 6/17/2021 4:58:56 AM   
MarkShot

 

Posts: 7089
Joined: 3/29/2003
Status: offline
Joel,

I will be working on it today, by setting a MouseGuard in AHK. When the game is active, and it senses the mouse has left primary display, it just sends it back to the edge. Maybe a check every 200 milliseconds.

If I come up with something generic; meaning any number of displays and any resolutions. Then, I will pass it to Matrix. It can be used as a little EXE; compiled or as a script of you are worried about what it is doing, but they must install AHK. It's neither a patch, nor a mod, in computer speak we would say coresident utility. I've done such utilities for Matrix games in the past (Pre-Slitherine).

I will let you know. Thanks.

PS: With only some slight coding changes, it could be made to work with any GG game (you just need to create a hooked group as opposed to a single EXE)

< Message edited by MarkShot -- 6/17/2021 5:00:15 AM >


_____________________________

(於 11/13/21 台北,台灣,中國退休)

(in reply to Joel Billings)
Post #: 5
RE: You ALMOST had it perfect - 2 displays - 6/17/2021 7:56:43 AM   
MarkShot

 

Posts: 7089
Joined: 3/29/2003
Status: offline
Matrix contact me

I have complete implementation which with a little work could work for all GG games.

I have worked together with Erik in the past.

I will post the code after one final test.


_____________________________

(於 11/13/21 台北,台灣,中國退休)

(in reply to MarkShot)
Post #: 6
RE: You ALMOST had it perfect - 2 displays - 6/17/2021 7:57:30 AM   
Helpless


Posts: 15793
Joined: 8/27/2004
Status: offline
I'd wish to implement map mouse dragging, but it would conflicts with many existing map click handlers.

You can alt-tab between apps (game/manual). Map screen scrolling is inactive when app is not on foreground.


_____________________________

Pavel Zagzin
WITE/WITW/WITE-2 Development

(in reply to MarkShot)
Post #: 7
RE: You ALMOST had it perfect - 2 displays - 6/17/2021 8:00:01 AM   
MarkShot

 

Posts: 7089
Joined: 3/29/2003
Status: offline
; Mark Kratzer - 06/17/21 (revised 06/17/21)
;
; This is Window Guard program.
; NOTE: It is not a mod.
; NOTE: It is not a patch.
; It is intended to run along side the game and alter the game's mouse
; behavior so that you can comfortably take advantage of two displays.
; If you only have a single display, it will unload itself automatically.
; If you exit the game it will rapidly unload itself.
;
; This program provides multi-monitor mouse support, RIGHT NOW only for WITE2.
; However this code could easily be adapted to support all such games.
;
; When the game is the active window, the mouse behavior on the primary display
; is exactly the same as full screen.
;
; You may wish to run the manual along side on a secondary monitor. To switch to
; the manual click on your PDF Reader in the Windows Task Bar. This will deactivate
; the mouse guard functionality.
;
; This is written in www.autohotkey.com
;
; You can either run a compiled version EXE or install AHK and run the script.
;
; If you launch this before the game, then you have 30 seconds to run the launch the
; game before this unloads. Or you can launch this after the game.
;
; THIS IS PROVIDED AS IS WHICH MEANS I TAKE NO RESPONSABILITY FOR YOUR GAME, YOUR PC, OR
; YOUR HEALTH.
;
; You are welcome to modify the code redistribute. Please credit all who may have worked
; on the code.
;
; Enjoy - Thankyou.
;
; PS1: Thank you, Gary Grigsby and Team for a superb manual and game which inspired me
; to write this.
;
; PS2: This has been tested and does what it says on the tin. I am leaving this to
; Matrix to compile and make it download for the community. Matrix, contact me
; if you have any questions. If have worked with Erik in the past.

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
#Persistent
#NoTrayIcon

Game01 = War in the East 2 v

TimerInterval = 200

SetTitleMatchMode 1
CoordMode, Mouse, Screen

Sleep, 30000
SysGet, MonCnt, MonitorCount
If MonCnt==1
ExitApp
SetTimer, ScriptDone, %TimerInterval%
SetTimer, WatchCursor, %TimerInterval%
return

ScriptDone:

IfWinNotExist,%Game01%,
ExitApp

Return

WatchCursor:

IfWinActive, %Game01%
{
SysGet, Screen, Monitor,
MouseGetPos, XPos, YPos
If (XPos > ScreenRight)
{
MouseMove, ScreenRight+5, %YPos%
}
If (XPos < ScreenLeft)
{
MouseMove, ScreenLeft-5, %YPos%
}
}
return

; This is reserved for future key binds - hard coded name is needed here
; for games. If you know how AHK works, then you can remap the game's
; hot keys here.

#IfWinActive, War in the East 2 v,


_____________________________

(於 11/13/21 台北,台灣,中國退休)

(in reply to MarkShot)
Post #: 8
RE: You ALMOST had it perfect - 2 displays - 6/17/2021 8:01:51 AM   
MarkShot

 

Posts: 7089
Joined: 3/29/2003
Status: offline
Pavel, all coded and tested for you. 30 minutes works will make it work for all games in the series. I leave to you to compile and make available.

_____________________________

(於 11/13/21 台北,台灣,中國退休)

(in reply to MarkShot)
Post #: 9
RE: You ALMOST had it perfect - 2 displays - 6/17/2021 8:11:51 AM   
MarkShot

 

Posts: 7089
Joined: 3/29/2003
Status: offline
Pavel, you miss the point. With two displays, the user will general overshot the scroll landing zone for the mouse unlike the 3 sides of the display. That is why this is a "mouse guard". It halts the mouse's movement, and returns behavior back to full screen or single monitor window use. Hook up a PC with two displays, and give it a try with the game. Far more ergonomic.

_____________________________

(於 11/13/21 台北,台灣,中國退休)

(in reply to MarkShot)
Post #: 10
RE: You ALMOST had it perfect - 2 displays - 6/17/2021 8:48:40 AM   
Helpless


Posts: 15793
Joined: 8/27/2004
Status: offline
Mark, I'll take a look at it next week when I get back from the trip. Thanks.

_____________________________

Pavel Zagzin
WITE/WITW/WITE-2 Development

(in reply to MarkShot)
Post #: 11
RE: You ALMOST had it perfect - 2 displays - 6/17/2021 2:39:51 PM   
dray67

 

Posts: 6
Joined: 1/25/2020
Status: offline
I'd like something similar tbh, usually I just use alt-tab to avoid the map scrolling while I look at the manual, it's not a major thing I know, but it is incredibly annoying in it's own way.

(in reply to Helpless)
Post #: 12
RE: You ALMOST had it perfect - 2 displays - 6/17/2021 2:45:19 PM   
MarkShot

 

Posts: 7089
Joined: 3/29/2003
Status: offline
Are your working with two monitors?

I can put up the EXE I created some place for you to download. You cannot normally email EXEs; that's also why I would like Matrix to just include this as official utility. I only have one title, but it would be easy to make it work for all titles.

_____________________________

(於 11/13/21 台北,台灣,中國退休)

(in reply to dray67)
Post #: 13
RE: You ALMOST had it perfect - 2 displays - 6/17/2021 4:59:10 PM   
nukkxx5058


Posts: 2932
Joined: 2/3/2005
From: France
Status: offline

quote:

ORIGINAL: MarkShot

Running the game in a window on one display, and the manual on the other display (see below).

What's the makes this less than perfect? You failed to implement an option for MOUSE MAP DRAG (like a held MMB).

What goes wrong it that precise scrolling one edge that corresponds to the other display is very twitchy thing. You could have made that a none problem with the above options.




Why don't you just alt-tab ?

Or, other fix, play WITE2 in a window.

(in reply to MarkShot)
Post #: 14
RE: You ALMOST had it perfect - 2 displays - 6/17/2021 6:23:12 PM   
overkill01

 

Posts: 223
Joined: 12/31/2015
Status: offline
Anoying indeed.
There's free software out there that let you customize the mousebehavior in dual screens.
For example "Dual monitor tools"
You can configure a deadzone on the edge of you're display in wich the mouse doesn't jump screen untill you go over it.
Or a hotkey to switch.

< Message edited by overkill01 -- 6/17/2021 6:27:50 PM >

(in reply to nukkxx5058)
Post #: 15
RE: You ALMOST had it perfect - 2 displays - 6/17/2021 6:57:59 PM   
overkill01

 

Posts: 223
Joined: 12/31/2015
Status: offline

quote:

ORIGINAL: overkill01

Anoying indeed.
There's free software out there that let you customize the mousebehavior in dual screens.
For example "Dual monitor tools"
You can configure a deadzone on the edge of you're display in wich the mouse doesn't jump screen untill you go over it.
Or a hotkey to switch.



Or not, tried it myself just now and for some reason it doesn't work with wite2 :s

(in reply to overkill01)
Post #: 16
RE: You ALMOST had it perfect - 2 displays - 6/18/2021 3:07:18 AM   
MarkShot

 

Posts: 7089
Joined: 3/29/2003
Status: offline
What I wrote works perfectly for running in a window and having multiple monitors. It will most likely work with any other GG title, but I don't have other titles for further testing.

I am using it, and decided to share. But I don't want to distribute and host. Around 2000, I signed a beta agreement with "old" Matrix games. Legally, it is still binding, and I have offered it to the new owners. Either way, my problem is solved. It is simply a question of whether they want to get more mileage of the excellent GG manuals by making it easy for those with 2 or more displays.

I don't have a Patreon or Paypal account ... I have nothing to gain here. I just don't want to host and distribute.

_____________________________

(於 11/13/21 台北,台灣,中國退休)

(in reply to overkill01)
Post #: 17
RE: You ALMOST had it perfect - 2 displays - 6/22/2021 3:23:59 PM   
MarkShot

 

Posts: 7089
Joined: 3/29/2003
Status: offline
Given that there is no key remapping; at the bottom script above, I had left an area for doing things like this.

This is read as:

Keyboard -> (maps) -> Game

#IfWinActive, War in the East 2 v,

; PrintScreen Alternate (Snagit)
PrintScreen::!v

Up::PgUp
Down::PgDn
Left::Home
Right::End

End::y
Del::z
Ins::a
Home::t

This is only the simplest of things you can do. You can write a whole macro sequence of keystroke and mouse commands ... it's general purpose programming. But at the simplest, you can map keys any way you like them without access to a gaming keyboard/mouse with programmable keys. (or knowing anything about computers)

< Message edited by MarkShot -- 6/22/2021 3:24:22 PM >


_____________________________

(於 11/13/21 台北,台灣,中國退休)

(in reply to MarkShot)
Post #: 18
RE: You ALMOST had it perfect - 2 displays - 6/22/2021 4:04:08 PM   
MarkShot

 

Posts: 7089
Joined: 3/29/2003
Status: offline
To illustrate more advanced ideas with AHK and customizing WITE2.

Two things to be added with a little programming as PgUp and PgDn are now free.

I think a key which cycles through all highlighted unit possibilities would be nice. As for the clearing, the length between presses can be be measured say with 1 second, meaning toggle=clear. (Implementation tip: Capture the system clock in milliseconds, and just subtract between consecutive presses.)

Another nice cycle can be the soft factors. With no key strokes defined, you just issue mouse move and click commands.

If you really want to program this, how do you know what to emit next? You keep a statefull variable in the script. If you want to be fancy, you write that disk, and read it on start up. This would keep your keys in sync with the game as opposed to have to reset, your selections each session.

< Message edited by MarkShot -- 6/22/2021 4:05:27 PM >


_____________________________

(於 11/13/21 台北,台灣,中國退休)

(in reply to MarkShot)
Post #: 19
RE: You ALMOST had it perfect - 2 displays - 6/23/2021 5:40:09 AM   
MarkShot

 

Posts: 7089
Joined: 3/29/2003
Status: offline
Another example of AHK and what you can do.

An example of how to cycle counter highlighting (for which there is no single) key.

You may say, "Well, I am not a programmer." AHK is freeware and used by many professionals and gamers. It means that Google search will often find many samples of code for game things you want to do.

Another great use is games that put tiny buttons close to the screen edge, and you are always moving the map trying to click the buttons. Define hot keys if the developer didn't which act as quick mouse click on the button and returns the pointer to the current location. For most purposes, it looks just like a hot key.

PgUp::
{
send {Ctrl Down}
Sleep, 100
If Disp = 0
{
Send {0 Down}
Sleep, 100
Send {0 Up}
}
Else If Disp = 1
{
Send {1 Down}
Sleep, 100
Send {1 Up}
}
Else If Disp = 2
{
Send {2 Down}
Sleep, 100
Send {2 Up}
}
Else If Disp = 3
{
Send {3 Down}
Sleep, 100
Send {3 Up}
}
Else If Disp = 4
{
Send {4 Down}
Sleep, 100
Send {4 Up}
}
Else If Disp = 5
{
Send {5 Down}
Sleep, 100
Send {5 Up}
}
Else If Disp = 6
{
Send {6 Down}
Sleep, 100
Send {6 Up}
}
Else If Disp = 7
{
Send {7 Down}
Sleep, 100
Send {7 Up}
}
Else If Disp = 8
{
Send {8 Down}
Sleep, 100
Send {8 Up}
}
Else If Disp = 9
{
Send {9 Down}
Sleep, 100
Send {9 Up}
Disp=-1
}
Sleep, 100
Send {Ctrl Up}
Disp++
return
}


< Message edited by MarkShot -- 6/23/2021 5:41:57 AM >


_____________________________

(於 11/13/21 台北,台灣,中國退休)

(in reply to MarkShot)
Post #: 20
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Gary Grigsby's War in the East 2 >> You ALMOST had it perfect - 2 displays Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.797