Game Development Community

Looking for Warcraft style navigation in a TGB game

by Darian Hickman · in General Discussion · 12/22/2006 (4:05 am) · 3 replies

We're making a game inside TGB with Warcraft II style map scrolling and running into some problems. Does anybody know of other games with map scrolling like Warcraft II built on TGB?

Basically we have to solve issues with the map not responding to the mouse pointer if you push all the way to the edge like the mouse pointer "fell off the edge of the map" even though the game is in full screen mode.

#1
12/22/2006 (5:46 am)
Hey there,

i have implemented a function to my engine that makes this possible
not sure if its the baest way to do or not but it works well.

what i did was the following:

i went to the RTSCtrlgui and looked for the panning funktion that is provided by that control

then i added a callback function that sends a message to the client when the mouse is not on an edge of the screen

now all you have to do in script is check if the mouse is on an edge or not and pan acordingly

i hope this helps

i am not at home and have no code here but if you need any more infos just let me know
#2
12/22/2006 (6:19 am)
This should be on the TGB forums.
#3
12/24/2006 (4:25 pm)
This was an issue with the game window not taking up the whole screen, rather only a portion while surrounded by gui. I didn't realise that I could get mouse position from the game window outside of the actual window, but I discovered that I could and used that for scrolling. Thanks for the advice up there Wolfgang. It was an easy solution once I discovered the nature of windows in TGB. I thought the mouse events were isolated to the window area itself.