Game Development Community

Horizontal Compass

by Alex "IkoTikashi" Zappe · in General Discussion · 06/04/2002 (3:09 am) · 29 replies

hi there,
i've just been reading the "Ultimate Compass"-codesnippit and i was wondering if there are other compass-codes around, especially like the one in DeusEx. looks something like this

N | | | E | | | S | | | W | | |

and scrolls horizontally. anybody already did this?? i couldn't find anything here...
tia
Page«First 1 2 Next»
#21
04/27/2005 (11:07 pm)
Yup, me moved, new URL is http://tork.beffy.de
#22
04/28/2005 (4:42 pm)
There seems to be a problem with the size of the N E S W bar. When I use an image 108px wide and 24px tall, my image works, however it does not rotate correctly in relation to the geographical world sense of direction. It seems to me that the 630px wide is too large. Anything that is above 108x24 (width and height of the border) causes the compass bar not to show up; only the border. =/
#23
04/28/2005 (5:05 pm)
The compass letters (N E S W) bar must be the exact size of the border bitmap, in my code. Something's not right.

new HorizCompassCtrl() {
         profile = "GuiDefaultProfile";
         horizSizing = "relative";
         vertSizing = "bottom";
         position = "454 40";
         extent = "200 24";
         minExtent = "8 8";
         visible = "1";
         bitmap = "common/ui/compassbar.png";
         OuterRingBitmap = "common/ui/uibackgroundcompass.png";
         FontWidth = "16";
            helpTag = "0";
      };

Even though I make the extent 200 24, the compass resizes itself to the size of the graphics. And they must be the same size (the border and the bar)..

=/
#24
04/29/2005 (3:35 pm)
Meh this is a headache. Obviously something is different in the Torque 1.3 code with this.

The compass "letters" bar of " N E S W " will not appear unless the surrounding border bitmap is the same exact dimensions, which is not how it was intended to function.
#25
04/30/2005 (11:51 pm)
I know absolutely nothing about this, so I'm just throwing out ideas here.

What if you made part of the "letters" image transparent?

EDIT: I mean the border...or whichever one is being drawn on top.
#26
05/01/2005 (6:51 am)
Currently it is. But the entire bar shows up, and it will move erratically if you look at the edges as compared to the smooth flowing as it shows in the center, because the bar was coded to be able to give the illusion that it repeats.

Here's how it should work. 
Here is a 100px border bitmap.
_______________
[______________] 

Here is the 630px x 32px N E S W bar.

___________________________________________________
[___N___E____S_____W_____N______E______S_______W__]

So, it should only show in the border bitmap 100px of that at a time.
But, since with the 1.3 code, it seems that the border bitmap [b]must[/b] be the 630x32 as the bar is. You see that entire NESWNESW bar, and it "jumps" at the edges after a certain amount of scrolling so that the center part of it stays smooth to give the illusion of a perfectly scrolling compass.
#27
05/03/2005 (4:50 pm)
Any of you compass-makers have any suggestions? =P
#28
05/03/2005 (9:52 pm)
If you want to continue this converstaion, move this out of the General section.
#29
12/08/2009 (5:40 pm)
Has anyone solved this? I want to create a compass of this type also.

Thanks!
Page«First 1 2 Next»