is Blitz window really that size

Blitz3D Forums/Blitz3D Programming/is Blitz window really that size

Rook Zimbabwe(Posted 2004) [#1]
I created a game that takes a map and makes that the groundmap. I told the game to run in fullscreen 800X600

Then I created a sprite that was exactly 800X600 to use as a HUD (I really just wanted to see if Blitz coud draw that fast enough.

It draws it really fast... no question.

But there is serious clipping at the top and bottom and a little bit of clipping at the sides.

So is B3D really using 800X600??? Or is it how I have the sprite positioned.

-RZ


Mustang(Posted 2004) [#2]
is Blitz window really that size


Yes. Take a screenshot to check it out - theres Blitz screenshot function code in the archives if you don't know how. Whatever you are doing with your sprite causes it to be diffent sized.


Rambus(Posted 2004) [#3]
Perhaps your monitor is out of wack. Try making the view horz/vert smaller.


eBusiness(Posted 2004) [#4]
Let us see your code, if you do it the right way then it should fit.


smilertoo(Posted 2004) [#5]
Arn't sprites square by default? you'd need to scale it to match the screen ratio.


Rook Zimbabwe(Posted 2004) [#6]
I think John hit it... I was looking at the sprite and I realized that the sides were exact it was just the top and bottom that were clipped. 600X600 is my estimation.

So I created a sprite 600X600

Yep... perfect fit.

While the world may be 800X600 the sprite is square. Dang I did not know that.

-RZ

Oh the code... just a simple walk around a terrain created out of a BMP. Map of Mars actually... Looking at the face.


Genexi2(Posted 2004) [#7]
I thought that the resolution of the texture had to be to the power of 2 (aka, 2,4,8,16,32,64,128,256,512,1024,etc) for both height and width...

If the sprite is 600x600, Blitz would resize it up to 1024 (cause its the next ^2'd number above 600x600).....even a check using TextureWidth\TextureHeight will say so :

Graphics3D 800,600,0,2

cam = CreateCamera()

MoveEntity cam,0,0,-5
tex = CreateTexture(600,600) ; 600x600 rez.


SetBuffer TextureBuffer(tex)
Color 255,0,255
Rect 0,0,600,600,1


SetBuffer BackBuffer()

sprite = CreateSprite()
EntityTexture sprite, tex  

Color 255,255,255


While Not KeyHit(1)
Cls



RenderWorld
UpdateWorld

Text 0,0,"TextureWidth  : " +TextureWidth(tex)
Text 0,10,"TextureHeight : " +TextureHeight(tex)

Flip
Wend
End


Also, the texture's dont have to be squared, just as long as both the width & height are to the ^2......though some old voodoo vid-card users might get pizzed.


Rook Zimbabwe(Posted 2004) [#8]
But everyone assumes I passed math.


Mustang(Posted 2004) [#9]
Description:
Creates a sprite entity and returns its handle. Sprites are simple flat (usually textured) rectangles made from two triangles. Unlike other entity objects they don't actually have a mesh that can be manipulated.

The sprite will be positioned at 0,0,0 and extend from 1,-1 to +1,+1.


http://www.blitzbasic.com/b3ddocs/command.php?name=CreateSprite&ref=3d_cat

But of course... forgot that.