In-Game Icons

Blitz3D Forums/Blitz3D Programming/In-Game Icons

Buggy(Posted 2008) [#1]
For 3D games (all 3D, no 2D commands), how do you guys do in-game icons? Do you use sprites? Pixel-perfect sprites? Textured cubes? Render to the same main camera, or render to a separate camera to put over the main scene?

I've been using textured cubes and sometimes sprites with some CameraPick calls, but it seems like it's so complicated that there should be a better way. And please, no suggestions to use other libraries. I'm not only trying to learn, but I take a certian amount of pride in my work and don't like simply using someone else's code if I can help it.


Gabriel(Posted 2008) [#2]
Pixel-perfect sprites, rendered to a separate camera and blitted over the main screen. It is complicated if you just do it randomly. I find it's worth taking the time to write a really good sprite GUI before you start and then you never have to write it again. When I sat down with my current game ( not written in Blitz3D ) the first thing I did was write a really solid GUI system with various gadgets, as well as HUD items, horizontal bars, vertical bars, circular bars, HUD buttons, and HUD Overlays. You probably don't need at least half of that, but it is well worth working what you need and writing a nice reusable system to do it all in my experience.


Buggy(Posted 2008) [#3]
Alright, I'll give it a shot. Umm... how do you blit sprites and such over the main camera? I knew this at one point...

Also, do you use the pixel-perfect sprite code in the archives? That looks pretty dern complicated...

Edit: One more question. Do you guys use CameraPicks, or is there some easy way I'm missing? I guess if the sprites are pixel-perfect, CameraProject would work as well. Which is faster?


Ross C(Posted 2008) [#4]
I used camerapick for my little sprite GUI thingy


boomboom(Posted 2008) [#5]
dude, save yourself the pain and buy http://www.x-pressive.com/SpriteCandy/ :)


MikhailV(Posted 2008) [#6]
FastImage - simpe and flexible solution for 2D graphics (pixel-perfect) in 3D mode - topic http://blitzbasic.com/Community/posts.php?topic=66995 and site http://www.fastlibs.com :P


Buggy(Posted 2008) [#7]
So if I don't want to buy something, the only way to do pixel-perfect sprites is with the code that's in the archives? 'Cause that's a lot of code...


boomboom(Posted 2008) [#8]
well you can do it yourself in a cut down way, but if you want a nice system to handle a lot of sprites then it will take a fair chunk of code.

I think Sprite Candy is around 12,000 lines of code, but you don't hae to see that code at all.

You can put a image on the screen and check for mouse events in 3 lines of code.


Buggy(Posted 2008) [#9]
That's all very well and good, but I'm trying to learn through this, not spend money to use someone else's code.

Don't get me wrong, Sprite Candy looks really good. I watched the demo and it's very polished and powerful. But that's simply not what I'm going for.

So... any easy ways to do pixel-perfect sprites, or just the one in the archives?