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.

Newcomers DBPro Corner / 2D sprites will not display

Author
Message
SkyeFyre
20
Years of Service
User Offline
Joined: 18th May 2004
Location: Ontario, Canada
Posted: 25th May 2004 21:24 Edited at: 25th May 2004 21:31
I am using DarkBasic Pro, and whenever I try to get sprites to work all I get is a black screen. This is the code I used.


And I've also tried

... as the stupid Premier's beginner's guide to DarkBasic game programming says and it wont work either. Something I'm doing wrong or is my program acting up again? I've had problems with DBP before where it wouldn't show my code as I typed it, and it wouldn't come back till I reinstalled it and another problem that had me reinstalling it was that any .exe I would make would simply freeze up on my desktop and not work... That seemed to happen whenever I messed with the project manager...

So yeah, any help would be great, I don't know if it's me or the program... I'm just about to throw this thing out the window, lol.

EDIT: Oh yeah, and I've tried putting it in the same directory as the image and gotten rid of the C:db as well and that didn't work either
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 25th May 2004 21:38
At least in DBC you would have to do this instead:

Otherwise the bitmap doesn't show.
Alternatively:

Hope that helps.

Current Projects: Dark_Worlds_Map_Editor version0.1 aneale5@orange.esinet.org.uk
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 25th May 2004 21:47 Edited at: 25th May 2004 21:48
I've never read that book but there are quite a lot of people that post here requesting help to fix broken code they got from the book.

If you want to use an image for a sprite and don't need to break it up into more than one image just use load image to load it. Since you are using the image for a sprite you will want to use the texture flag, add an extra ,1 to the end of the load image command, eg.
LOAD IMAGE "C:dbcircle.bmp",1,1
This tells dbpro not to scale or filter the image.

If you need to load the image to a bitmap so you can break it up with get image then use this.


he told me that he loved me and then he kicked me in the chest
SkyeFyre
20
Years of Service
User Offline
Joined: 18th May 2004
Location: Ontario, Canada
Posted: 25th May 2004 23:04
Ok... now I can get the sprites displaying with the LOAD IMAGE... but now I have another question.

Why does it have the 3D mode blue background? is it in a 3D mode? and if so how do I make it 2D cause I'm simply trying to make a 2D game.

Thank you guys for helping me out here... lol I had been pulling my hair out on that matter for like a week now

Login to post a reply

Server time is: 2024-11-26 18:45:29
Your offset time is: 2024-11-26 18:45:29