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.

2D All the way! / sprites

Author
Message
madcaddy
19
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 21st Jan 2003 22:10
hi, ive just transferred a game across to dbpro and have encountered some problems. the following code displays the sprites but the image(7) does not display. I tried it in step-through mode and it seems to appear but disappear straight away. i tried it with the paste image command before the sprite commands but it disappears as soon as the sprites are displayed. This worked fine in db - any ideas?!

Richard Davey
Retired Moderator
20
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 22nd Jan 2003 01:08
Is that the entire code? Without the media I'm not sure what's happening but one thought that occurs is that the load bitmap command has set the current bitmap to 1 and delete bitmap didn't set it back to 0 again, but then if the sprites appear that doesn't totally follow either. Maybe more likely the fact that sprites have put Pro into 3D mode and the image has been lost behind the scene - draw to front should sort that out.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
madcaddy
19
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 22nd Jan 2003 01:34
hey thx for the advice but im not totally sure how to implement the draw to front code - the help file seems to suggest putting it after the paste code.. this is just the very beginning code which loads up a title screen - buttons.bmp contains 6 buttons and title.bmp is just a background.

thx for the help.
Richard Davey
Retired Moderator
20
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 22nd Jan 2003 01:40
Nah "draw to front" would go somewhere at the start of your program, not in the main loop or after paste - it's a little useless by that point! DB needs to know it has to do it before the event, not after it

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
madcaddy
19
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 22nd Jan 2003 01:45
ahh! sorry this is dragging on but it still seems to delete the image as soon as the first sprite is drawn. here is the exact code for the beginning of the program:



i dont hav a clue y its doin this any more ideas!
indi
20
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 22nd Jan 2003 01:49
remove the delete image command as DBP doesnt require u to use it like classics method

replace that with a cls and what ever u do from then on will on a clean screen until u mess it up of course.

madcaddy
19
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 22nd Jan 2003 01:55
thx for all the advice.

i just tried it with manual sync and it works fine now - still cant get it to draw the background without it though..
Richard Davey
Retired Moderator
20
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 22nd Jan 2003 01:59
To be honest you'll find very quickly that you really always want to "manually sync" anyway. You get so much more control that way. I'm not sure any (more advanced) programmers here would code any other way.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming

Login to post a reply

Server time is: 2022-11-29 14:38:59
Your offset time is: 2022-11-29 14:38:59