2d image on a 3d game
Blitz3D Forums/Blitz3D Beginners Area/2d image on a 3d game
| ||
ok, im stuck. I have a 3d first person shooter game, I want to be able to put 2d images on the screen such as a healthbar or a picture of coins for money etc.......... I've even tried simply putting text on the screen and you cant see it. I cant figure out whats going on, wether it's being placed somewhere else in the game or what. So somebody help me! |
| ||
2d graphics commands must be done after RenderWorld and before Flip. |
| ||
if you want to do it with 2d graphics, as octothorpe says, do this:repeat updategame() ;normal game logic stuff in here updateworld renderworld ;draw 2d stuff here, for example it may be worthwhile to have something like this: update2dstuff() ;function containing all calls to the draw/rect/oval commands you want to do flip As a temporary solution 2d graphics used in 3d mode is okay, but it is better to use quads or sprites to do this kind of thing. |
| ||
I will reccomend using SpriteControl. It is a library that mimics 2d graphics over 3d environment. It was recommended to me in this very forum. http://www.blitzbasic.com/codearcs/codearcs.php?code=456 |