Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / bitmap font won't draw in front sprites

Author
Message
AriEf
16
Years of Service
User Offline
Joined: 30th Nov 2009
Location: Indonesia
Posted: 26th Jun 2014 10:32
Hello Everyone, i'm using a bitmap font plugin from here

[href]null[/href]http://forum.thegamecreators.com/?m=forum_view&t=179885&b=8

its an amazing plugin, it is easy to use and fast. But i have a problem with it, the BK Text won't draw in front of my background. Btw my background using Sprite command, so the question is how can i make my bitmap font draw in front of sprite?

Here's My Code (already simplified for forum)


Please help me, i'm using it for HUD and GUI

AI Game Studio
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 26th Jun 2014 11:47
Sprites always draw in front of everything else, but not all hope is lost!

This post by Ian M solves your problem:
http://forum.thegamecreators.com/?m=forum_view&t=178054&b=1&msg=2122521#m2122521

You will need to install Matrix1 Utils to access those commands. Download them here:
http://forum.thegamecreators.com/?m=forum_view&t=85209&b=18

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jun 2014 13:24
Or you could just do this:



Thanks for introducing me to SvenB's plugin. I hadn't seen that before - incredibly easy to use.



Powered by Free Banners
pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 30th Jun 2014 11:19
DrawTextOverSprites



windowsXp
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 30th Jun 2014 12:25
I think you just need the 'Draw sprites first' command.

I am the one who knocks...
AriEf
16
Years of Service
User Offline
Joined: 30th Nov 2009
Location: Indonesia
Posted: 1st Jul 2014 12:04
@TheComet : thanks, i'm using it now! the plugins work perfectly for me! until now i don't know plugins like that is existed lol.

Green Gandalf : Yep it can, it's draw in the front of background, but still draw in the back of the sprite. btw nice idea anyway!

Using "Draw Sprites First" is great, but my sprite appear behind 3d object ._.

AI Game Studio
pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 1st Jul 2014 12:29


windowsXp
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Jul 2014 15:18
paste sprite is a solution, but has the following shortcomings:
1) You have to paste the sprite again every loop for it to be visible. Normal sprites only have to be placed once and DBP will take care of drawing it.
2) All sprite collision commands won't work.

Rain Man
18
Years of Service
User Offline
Joined: 19th Nov 2007
Location:
Posted: 2nd Jul 2014 08:18
I think you need to use the SET SPRITE PRIORITY command. You can use it to specify which sprites are on top of which.

Ten minutes to Wapner.

Login to post a reply

Server time is: 2026-07-06 02:53:05
Your offset time is: 2026-07-06 02:53:05