Newb question - 2D GUI in Blitz3D

Blitz3D Forums/Blitz3D Beginners Area/Newb question - 2D GUI in Blitz3D

EddieRay(Posted 2004) [#1]
I've tried out several of the GUIs for Blitz3D - there are many that are pretty impressive. I was wondering... what is the principle these use to improve speed and avoid the slower 2D-directly-to-screen method? What key commands are typically used? Are there several approaches for doing this?

Thanks,

Ed


semar(Posted 2004) [#2]
IMO one of the most advantages is the use of sprites, which are 3D entities and can be easily scaled, rotated and changed in transparency.

Try to check out all the sprite commands, as well as EntityAlpha for transparency, EntityBlend for blending effects, and the like.

There's also an interesting 3D sprite library written by a Blitz coder, you have to search it at www.blitzcoder.com

Sergio.


sswift(Posted 2004) [#3]
Basically, they make a 3d mesh and stick it in front of a camera.

Those that do pixel perfect stuff but change size in different resolutions do so by carefully positioning the meshes so that the center of each texel falls in the center of a pixel.

And that's basically it. You can use sprites, or use meshes... I use meshes in my system because it allows me to use a single mesh with a single texture to position many different letters on the screen at once. Most systems probablt use meshes and not sprites because of this. You don't want hundreds of sprites onscreen at once because each sprite has one surface and surfaces slow your game down a lot. You can't have more than around 200-400 surfaces in view at one time and maintain a good framerate.


EddieRay(Posted 2004) [#4]
<quote> Those that do pixel perfect stuff but change size in different resolutions do so by carefully positioning the meshes so that the center of each texel falls in the center of a pixel.</quote>

Is that difficult to do? What's the trick to making that work out - projection mode = orthographic, and then doing the for the camera viewport? Or is there a better way?

I checked out your GUI system sswift, it looks really nice for a game GUI system... unfortunately, I'm looking for more of an "3D app" GUI system, with tree-lists, scrollable stuff, etc. Although, I must say, I think the *style* of your GUI would work well for a 3D app, with it's blazing fast speed, and my brain-wheels are turning with ideas for getting away from the age-old, standard-look GUI...

Does anyone know what 2D-on-3D method BlitzUI uses?


sswift(Posted 2004) [#5]
"projection mode = orthographic, and then doing the for the camera viewport?"

No, they just position them at a fixed distance from the camera, and then scale them to the right size so each texel falls under one pixel.


"I checked out your GUI system sswift, it looks really nice for a game GUI system... unfortunately, I'm looking for more of an "3D app" GUI system, with tree-lists, scrollable stuff, etc."

Well my GUI system is designed for making your basic game menus and stuff. I don't want my games to look like windows apps. :-) Scrollable stuff I've considered adding a few times, but it would make the system harder to use. But it could be done using more cameras.

If you want a windows style GUI there's several to choose from. Just look in the tools section of the website. Eole is one I've considered using.


EddieRay(Posted 2004) [#6]
I don't see "Eole" in Toolbox->GUI Libs... am I looking in the wrong place?