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 / How can I 'print' in front of sprites?

Author
Message
Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 22nd May 2010 07:43
Hi Guys,

I am faced with a problem for my HUD; how do I 'print' in front of 2D sprites? It's very annoying! I am trying to make a simple game but it's restricted because I can't print text (or numbers for that matter) in front of the sprites! And I can't use that command that simply displays sprites first, because I have a skysphere and they disappear behind it. Please help!

Thanks,
Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 22nd May 2010 09:30
Hide the sprite and use Paste Sprite. Then you can draw text on top of it.

My signature is NOT a moderator plaything! Stop changing it!
Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 22nd May 2010 09:55
Thanks, Mobiius! Now my game can be continued!

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 22nd May 2010 21:55
You can try this command, call it once in the begining, before main loop:


Where there is a will, there is a way.
I often edit my posts, that`s who i am
Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 26th May 2010 03:01
No, that makes it draw the sprites before even the 3D objects so my skysphere stops the sprites being visible at all.

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.

Login to post a reply

Server time is: 2026-07-25 16:18:19
Your offset time is: 2026-07-25 16:18:19