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 / need help with using sprites in arrays as number displays

Author
Message
Guruchild
23
Years of Service
User Offline
Joined: 13th May 2003
Location: United States
Posted: 23rd Jun 2003 06:23
I have made some code that takes the numbers 0-9 and makes them into sprites. What I need is a way to effectively utilize them with my game so they are displayed on screen in realtime along with the 3d world that makes up the game. Most of the game is done but then I got stuck on this little annoying finishing touch.

RPG Gamer, I remember you saying you had a snippet that does this. If you see this please post it if you would be so kind and if it's available. If not no problem just please send me in the right direction

By the way, if you really want to see what I am going to use this for and how my game is set up feel free to download an earlier dev release of the game at http://www.handicrapped.com/souldef-089.zip

I've made progress since then but haven't managed to pack it up and offer a newer one for d/l yet.

Or, see a screen shot at http://www.handicrapped.com/souldefender4.jpg
Guruchild
23
Years of Service
User Offline
Joined: 13th May 2003
Location: United States
Posted: 23rd Jun 2003 08:20
Anyone?

MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 23rd Jun 2003 12:33 Edited at: 23rd Jun 2003 12:36
Yes, the easiest way would be to do something along the lines of :



Change the 43 to the image/sprite horizontal size.
Change the two 100 to reposition horiozontally and/or vertically
SPRITE_NUM is a value that holds the first sprite that holds the first number. The next sprite would be SPRITE_NUM+1, the next SPRITE_NUM+2 etc
IMAGE_NUM is a value that holds the numbers from 0 to 9 (in that order). IMAGE_NUM holds the graphic for 0, IMAGE_NUM holds the graphic for 1 etc

If you want further examples, see my F-Eight code from my web site.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!

Login to post a reply

Server time is: 2026-07-17 19:34:00
Your offset time is: 2026-07-17 19:34:00