Displaying Coords in text on 3D disp?

Blitz3D Forums/Blitz3D Beginners Area/Displaying Coords in text on 3D disp?

StOrM3(Posted 2004) [#1]
Okay,
Here I go again, to try and explaine what I need, I notice the text routines are not working in Blitz3D while in a 3D Graphics mode for some reason. I need to be able to track mouse positioning and display the coords, so I can figure out how to get my mouse working for player control on the screen, for those of you whom remember my prev question about Cubis type movement where you move the bubble around the outside of a set of items like in a row and column setup in the center of the level displayed on the screen, you are kind of looking down at the game board, and I have the random positions working, but I need to know several positions on the screen, so I can tell when to auto-change direction the bubble is pointing as you move the mouse and the bubble rotates around the outside of the objects in the center of the level.

Many thanks to anyone whom can give me some code examples for text displaying, maybe even how to draw a rectangle in 3D mode so I can figure out the exact path to make the mouse follow around the objects as you move the mouse around. Also drawing a mouse cursor on the screen...

I know this is alot to throw at you, but I have been racking my mind trying to figure something out, but can't get it to work right.

Many, many, many thanks in advance,

Ken


LuckyPhil(Posted 2004) [#2]
I've had this problem.

I placed my Text x,y,text$ commands to appear AFTER the RenderWorld, and before the Flip command.

Renderworld appears to clear the screen, erasing any previous text commands.

I could be wrong though


CyBeRGoth(Posted 2004) [#3]
Yup as Lucky Phil sais place your 2d commands after Renderworld() and before Flip and you should be ok, such as:
.
.
Renderworld()
Text 10,10,"Ahoy hoy!"
Flip
.
.
.

Not just text but drawimage, rect, etc can go there too :)


jhocking(Posted 2004) [#4]
That is certainly something to be aware of but it may not be the problem. I never did figure out what the problem was but I've had some people report that text doesn't show up on their system even though it works on mine. A strong argument in favor of bitmap fonts like FONText and sprite-based 2D image systems like SpriteControl.


Ross C(Posted 2004) [#5]
Yeah, the text command really eats into the Fps.


N(Posted 2004) [#6]
You could probably modify the Text_/LoadFont_/InitializeGUI/AlignToCamera functions in Vein (c_panel.bb) to do what you need. You'd also need to just copy UpdateFonts() (c_panel.bb) and tear the Font type out of it (h_panel.bb).

http://s87776868.onlinehome.us/vein/info.html <- Source code links at the top

It's just a matter of rewriting small pieces to use your own player system or a single camera. As Ross said, the Text() instruction really can kill the frames per second.


LuckyPhil(Posted 2004) [#7]
So if the text() command kills your fps, what is another way to display on the screen the true FPS count?