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 / Animated Sprite Problem

Author
Message
Frank C
16
Years of Service
User Offline
Joined: 3rd Jul 2010
Location: Houston TX
Posted: 21st Jul 2010 18:11
I am trying to display some animated Dice on a board, the dice code works fine in a separate app and it runs in my code partially. What it doesn't do is display the dice initially, it will not show up till I hit the key to stop it from rolling and then it will work from there on, also if I move the window on the screen it will disappear again. I have the code below if someone can tell me what I'm missing it would be appreciated.

LBFN
19
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 21st Jul 2010 19:49
Maybe a SYNC at the end of your REPEAT - UNTIL loop in _RollDice.

So many games to code.......so little time.
Frank C
16
Years of Service
User Offline
Joined: 3rd Jul 2010
Location: Houston TX
Posted: 21st Jul 2010 23:20
Tried that, if I put the Sync just before the RETURN statement or just before the end of the outside repeat loop it functions just as before, if I put it inside the inner repeat loop I get the dice but not my board (the boxes).

The Dice seem to show up under the board, I do not know the command to have them display on top, could it be a transparency issue?
LBFN
19
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 22nd Jul 2010 14:45 Edited at: 23rd Jul 2010 20:49
Your repeat - until loop at _RollDice should look like this:



Quote: "The Dice seem to show up under the board, I do not know the command to have them display on top, could it be a transparency issue?"


I see you are using the backdrop, yet you are not using any 3D objects. You could try turning the backdrop off.

So many games to code.......so little time.
Frank C
16
Years of Service
User Offline
Joined: 3rd Jul 2010
Location: Houston TX
Posted: 23rd Jul 2010 19:06
The problem was the transparency on the Sprites, I changed the code in the repeat to loop to this and it worked:


Login to post a reply

Server time is: 2026-07-25 05:32:47
Your offset time is: 2026-07-25 05:32:47