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 / Render Mode Problem

Author
Message
Brick Break
User Banned
Posted: 17th Jul 2009 22:10
Well, I'm making a small engine for the guys over at yourewinner.com, and I've implemented a menu system. Now, initially, on the main menu, everything's just fine. No 3D is being rendered, and everything is nice and smooth. Then comes the vehicle select screen. As you might expect, it slows down because there are 4 medium-poly models on the screen. But then, the track select screen comes up and it's still slow and rendering in 3D mode! I know that once 3D is drawn for the first time, DarkBASIC switches over to the graphics card. But once you're done with 3D, what do you do?

WINNER list:
Latch, Lee Bamber, TDK
Thanks for the help!
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Jul 2009 22:49 Edited at: 17th Jul 2009 22:50
Well, you switch back to 2d mode. When running DarkBasic with nothing typed in the editor, the default screen settings are the following:

sync off
backdrop off
show mouse
always active off
autocam on
fog off

I'm not sure if this does switch back to 2D mode, but try it out. Also, I recommend not to use sprites or paste image commands, because DirectX doesn't support them since version 6, I think. Try to use plain objects, they are much better. Here is a quick conversion from 2D to 3D:



Hope this helps!

TheComet


Make the path of your enemies easier with Waypoint Pro!
Brick Break
User Banned
Posted: 17th Jul 2009 23:12
Quote: "Well, you switch back to 2d mode."

Ah, wouldn't that be nice.
Quote: "DirectX doesn't support them since version 6"

That's what retained mode is for.
Quote: "Hope this helps!"

Nope, I appreciate your effort though.

WINNER list:
Latch, Lee Bamber, TDK
Thanks for the help!
That1Smart Guy
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 17th Jul 2009 23:32
there is a special code that could be useful here

set camera view x1,y1,x2,y2

this commands sets the area of the screen you want to be in 3d, the rest of the screen (if any) becomes 2d

so if you use:

set camera view 0,0,1,1

the 3d section will be displayed only in the top left pixel (un-noticeable ussually) and the rest of the screen would be 2d

then to change it back use

set camera view 0,0,screen width(), screen height()

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Jul 2009 23:37
Sorry I couldn't help, BB... Why do you want it to go back to 2D mode?


Make the path of your enemies easier with Waypoint Pro!
Brick Break
User Banned
Posted: 18th Jul 2009 00:08
@That1Smart Guy- That might work. I'll have to try it.

@TheComet- I'm making mouse-controlled menus.

WINNER list:
Latch, Lee Bamber, TDK
Thanks for the help!
That1Smart Guy
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 18th Jul 2009 00:25
if you just want to leave it in 3d heres what you do:

figure out the proper distance away from a plain of width 640 and height 480 (or 800*600 if thats ur display) so that the plain EXACTLY fills the screen, no more, no less

then when you go into the menu, make a bunch of plains that will act as buttons, then texture em with the image

then just make a small plain 1*1 and hide it, and position it at the mouse coords

then check for collision between the mouse plain and the button plains

Brick Break
User Banned
Posted: 18th Jul 2009 00:41
That's not what I wanted to do. I found that the mouse is much more responsive in DarkBASIC's 2D mode.

WINNER list:
Latch, Lee Bamber, TDK
Thanks for the help!
That1Smart Guy
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 18th Jul 2009 00:42
wouldnt surprise me, then that set camera view command is ur best bet

Login to post a reply

Server time is: 2024-05-20 10:55:16
Your offset time is: 2024-05-20 10:55:16