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 / Dynamic text on sprite

Author
Message
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 28th Jul 2010 05:08
Hi everybody, I need some conceptual advice. I'm currently making a little RTS, and I'm coding a GUI for it(Age of Empires style) but i'm not sure how to display the selected unit's statistics dynamically without using an off screen bitmap and get image. I've used get image before and I don't want to cut that much fps at this point.

Does anyone have any other suggestions/methods?


HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 28th Jul 2010 10:48
you might of read about the paste sprite then sync then write the text, might work.

Dark Physics makes any hot drink go cold.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 28th Jul 2010 12:13
Have you tried using the D3D plugin? It works faster than the native commands and can write over sprites (I think...)

Anyway it's useful for lots of other stuff anyway and is free:
http://forum.thegamecreators.com/?m=forum_view&t=69221&b=5

Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 28th Jul 2010 14:43
Quote: "Have you tried using the D3D plugin? It works faster than the native commands and can write over sprites (I think...)"

Just tried that, no luck.


=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 28th Jul 2010 15:01
Instead of positioning the sprite on screen, Hide the sprite, and then paste the sprite to where you need it to be.

Then Draw some text

then sync

Hey presto

(Just like HowDo suggested...)

Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 28th Jul 2010 15:08
Quote: "Instead of positioning the sprite on screen, Hide the sprite, and then paste the sprite to where you need it to be.

Then Draw some text"

That worked, thanks =Prof= and HowDo!


IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Jul 2010 15:14
Make an image, draw to it, set up a sprite.

You can do this using a camera to an image and then treating it as a bitmap, but it's a lot easier using one of my plug-ins - http://www.matrix1.demon.co.uk/Matrix1Utils_Help/Matrix1Util_33_index.html

Login to post a reply

Server time is: 2026-07-25 08:29:06
Your offset time is: 2026-07-25 08:29:06