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 / 3d animations playing behind sprites?

Author
Message
Zombie 20
18
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 25th Oct 2008 00:07
Okay, so this can use a little explination. I was at work last night and was thinking out of nowhere could I create a 2d box as a button (ie: a menu) and behind it could be perhaps a scrolling background with something flowing in the background.

My question is not if it is possible (I'm sure it is) but instead of how slow this would run, would a considerable amount of optimisation be needed?


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!
Robert The Robot
18
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 25th Oct 2008 17:12 Edited at: 25th Oct 2008 17:13
How fast it would run depends on how you create your menu button. If you're using a sprite as your 2d image (as you say in the thread title) you can probably draw about a hundred each sync with no ill effects. I tried 1000 once (by accident) and the screen went incredibly jerky, but I have had at most 60 sprites running successfully with the Fps remaining a steady 55-60 (with Sync 0).

If (as your post suggests) you use the "Box" command, then you'll get a noticeable frame drop after just five calls. Your best bet is to stick with sprites - 2s in 3d is quite fast in computer.

Of course, it you want menu buttons on a 3d backdrop, couldn't you just use 3d plains and "Lock Object On"?

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
BlobVanDam
16
Years of Service
User Offline
Joined: 26th Jul 2008
Location: one of Cybertrons moons
Posted: 25th Oct 2008 18:51
Yeah, I also suggest just texturing iages onto 3D planes instead. Would run faster than drawing 2D over 3D, Plus it's independant of resolution.

Login to post a reply

Server time is: 2025-06-07 08:26:52
Your offset time is: 2025-06-07 08:26:52