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 Discussion / Make a 2d image loader for a 3d game

Author
Message
Julius Caesar
19
Years of Service
User Offline
Joined: 14th Apr 2006
Location:
Posted: 14th Apr 2006 17:17
I am making a 3d, RTS type game, and it's almost finished. I have looked everywhere for loader tips and tricks and all the ones on codebase won't work for what I've tried. I've read through all the posts here and no-one seems to have had this problem before. My problem is that I draw a 2d image on the screen, using LOAD BITMAP, but then when I load the 3d stuff, it just wipes it off the screen!
It's really annoying, can anyone tell me where I'm going wrong?
nojbox87
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: England
Posted: 14th Apr 2006 18:34
could be wrong but you may have to load it as a sprite or something

I am a Christian and I know that God loves me. That is what makes my life so great!
Julius Caesar
19
Years of Service
User Offline
Joined: 14th Apr 2006
Location:
Posted: 14th Apr 2006 18:58
I did that, but thanks anyway! I did put in a code snippet of how I tried it, but for some reason that didn't work. I'll try again!
General Sephiro
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location:
Posted: 14th Apr 2006 19:26 Edited at: 14th Apr 2006 19:26
..... do it 3d style then >.<

Just make a plain object lock it on position it so it's just in screen.

then you can make a box and scale it according to the loading position. For every object loaded for the level you could add 1 more to the variable, and continiously update the scale value of the object.


E.g.


Julius Caesar
19
Years of Service
User Offline
Joined: 14th Apr 2006
Location:
Posted: 14th Apr 2006 19:30
Wow! Thanks, it works like a dream! I never thought of that! Thanks again General Sephiro!
The Wilderbeast
19
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 14th Apr 2006 21:14
or

load bitmap "screen.bmp" : sync

load object blah
blah
blah
blah

do
blah
blah
blah
blah
sync
loop

basicly it displays the bitmap until the main loop is started

OMG It's the Wilderbeast
General Sephiro
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location:
Posted: 14th Apr 2006 21:27
BRAUDE Man, if the image seems dull, or darken'd down try setting the object not to be affected by light / fog etc.., that way it is not affected for being in the 3d Enviroment. (yes i'm talking about the loading screen =P)

master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 19th Apr 2006 05:17

Basically what The Wilderbeast said

eaviii
19
Years of Service
User Offline
Joined: 16th Jan 2006
Location:
Posted: 24th Apr 2006 01:18
You can also simply load the image in as bitmap 0 and sync as above. Unfortunately this will pixel to pixel load starting at the top left corner of the screen (i.e. the picture must be sized to screen resolution). The textured plain locked to screen works better in my opinion as noted above.

Doc

Login to post a reply

Server time is: 2025-05-23 18:53:55
Your offset time is: 2025-05-23 18:53:55