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 / Switch from 3D to 2D - not clearing screen

Author
Message
Zappo
Valued Member
20
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 27th Oct 2004 08:09
You will probably think I am dumb , and its probobly something simple I have missed, but here goes my question...

I have a game. It displays a title screen sequence which uses 2D sprites only and works great. The screen clears and it then uses 3D graphics when you play - also works great. I want it to go back to the 2D title screen when its finished.
I have tried deleting all the objects and meshes, but no matter what I do, I still get the remains of my 3D stuff in the background and CLS just doesn't clear the screen.
Any thought would be VERY greatfully received.
Zappo
Valued Member
20
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 27th Oct 2004 19:10
I may be able to answer my own problem here...
I think it is the camera view which is staying on the screen messing things up. I can put sprites in front of it, but cannot paste anything onto the screen. I think it can be fixed by making the camera view tiny while the title screen is on:
set camera view 0,0,1,1
then big again when I want to play 3D:
set camera view 0,0,800,600

I haven't tried this yet but does it sound about right to you guys? Or can I turn the camera off completely?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 27th Oct 2004 20:01
Zappo,

You could do that, although, I doubt it would work very well.

What you're looking for is the BackDrop Off command.
When any 3D is created ( an object is made, or you load one in yourself ), the "BackDrop" is turned on. This is the 3D scene.
If you want to do 2D, with no 3D, then you want to turn off the 3D completely, and do so, you use the BackDrop Off command.

Jess.

PS. don't forget to use the BackDrop On command again to turn 3D back on


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 27th Oct 2004 22:40
JessTicular if i ever see you i am gonna give u a big hug man! thats just fixed a problem that has been ripping my hair out for ages now!!!!

Daedalus
Zappo
Valued Member
20
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 28th Oct 2004 07:00
Many thanks JessTicular!

I had played with the 'Backdrop' command as the help suggested it would do the trick, but stuck it in the wrong place (not normally a problem for me!).
Anyway it works a treat now. Cheers.
If anyone else is having this problem, you also need to do a sync straight after it for it to work properly (or you can end up with a terrible flickering effect).

Login to post a reply

Server time is: 2025-05-24 17:00:26
Your offset time is: 2025-05-24 17:00:26