Horizontal Compass
by Chris "C2" Byars · in Torque Game Engine · 05/04/2005 (3:35 am) · 23 replies
Thread continued from: www.garagegames.com/mg/forums/result.thread.php?qt=5578
Using the Horizontal Compass code bit: tork.beffy.de/modules.php?op=modload&name=Downloads&file=index&req=getit&lid=11.
The Horizontal Compass, as seen in other Torque based games, was designed so that a smaller bitmap (border) could be placed around a 630px length North East South West image, and the image scrolls according to the direction your character is facing. The code was designed so that the 630px bitmap appeared to repeat when the bar scrolled and such. It does, however the only way to get this to function for some reason is if the border bitmap is the same size as the N E S W bitmap. 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, because normally the "border" bitmap would prevent the user from viewing the rest of the bar not within however many pixels wide the border was. If you take a look at this resource's example game, coded in Torque 1.2, if functions correctly:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6165
So there must be something wrong with the .cc or .h files for them to not function as they did in Torque 1.2, in 1.3. Or maybe it's my fault. I don't know, that's why I'm posting for help here.
Thanks.
Using the Horizontal Compass code bit: tork.beffy.de/modules.php?op=modload&name=Downloads&file=index&req=getit&lid=11.
The Horizontal Compass, as seen in other Torque based games, was designed so that a smaller bitmap (border) could be placed around a 630px length North East South West image, and the image scrolls according to the direction your character is facing. The code was designed so that the 630px bitmap appeared to repeat when the bar scrolled and such. It does, however the only way to get this to function for some reason is if the border bitmap is the same size as the N E S W bitmap. 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, because normally the "border" bitmap would prevent the user from viewing the rest of the bar not within however many pixels wide the border was. If you take a look at this resource's example game, coded in Torque 1.2, if functions correctly:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6165
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 must 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.
So there must be something wrong with the .cc or .h files for them to not function as they did in Torque 1.2, in 1.3. Or maybe it's my fault. I don't know, that's why I'm posting for help here.
Thanks.
#22
But all you have to change for TGE 1.4 should be the path to guiBitmapCtrl:
06/19/2006 (3:16 am)
Man, that's really old now... :PBut all you have to change for TGE 1.4 should be the path to guiBitmapCtrl:
#ifndef _GUIBITMAPCTRL_H_ #include "gui/controls/guiBitmapCtrl.h" #endif
#23
06/19/2006 (7:26 pm)
Tested this for TLK 1.4 today work like charm. Put the two files in engine/game/fps, if not you will get error. Do the change Stefan said? I was having problem with the backgroundcompass line up so I made it separate GuiBitmapCtrl.
Torque Owner Charles Andrew
i mean this resource btw tork.beffy.de/modules.php?op=modload&name=Downloads&file=index&req=getit&lid=11
what changes do i need to make?