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 / another problem-screen objs "dbc"

Author
Message
Nic
20
Years of Service
User Offline
Joined: 26th Jun 2004
Location:
Posted: 19th Jan 2005 20:51
i have made a 2d panel for my game(a doom style panel). of course when i use it as a sprite my FPS drops from 65-22. i have read that the best way to achieve this is to map my sprite onto a plain. ok i can easily texture a plain, but how do i get it to stay at the same point on the screen and appear like a 2d menu? (just picture doom or diablo)? please dnt just say "lock object on". help would be much appreciated, Nic
Wolfee
21
Years of Service
User Offline
Joined: 14th May 2004
Location:
Posted: 19th Jan 2005 21:03
you can use sprite without FPS reducation, but you need to put this line the end of code

with backdrop and sync itt will work properly

Wolfee from Hungary
Nic
20
Years of Service
User Offline
Joined: 26th Jun 2004
Location:
Posted: 19th Jan 2005 21:05 Edited at: 19th Jan 2005 21:08
YES BRILLIANT. what does it do?! its good tho so im not complaining
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 20th Jan 2005 08:39 Edited at: 20th Jan 2005 08:40
Basically, every time your sprite is drawn, the pixels behind it are saved so when you move your sprite, everything behind is left intact. 'set sprite' allows you to turn off that backsave feature, meaning it takes less time to draw a sprite. Of course, using a sprite in this way would be much like calling 'paste image' every update, which works too.

CURRENT PROJECT: Chaos Hizzle Demo
STATUS: Release of BETA imminent!
Nic
20
Years of Service
User Offline
Joined: 26th Jun 2004
Location:
Posted: 20th Jan 2005 13:12
the only problem now, is i have text but i want it to appear OVER my sprite is there any way to decide which 2d element appears over another? baring in mind im using DBC
Jake Blues
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location: United States
Posted: 28th Jan 2005 09:26
I have had this same problem. The only way to do this is before loading it as a sprite, paste your image on the screen and place the text in the right position and save the bitmap. Then load the new bitmap as a sprite. That is the only way I know.

Don't let life get you down, it will only get better.
Nic
20
Years of Service
User Offline
Joined: 26th Jun 2004
Location:
Posted: 30th Jan 2005 13:48
man thats good but im using a a diablo baldurs gate style HUD and thats gonna get tiring after a while , maybe theres an easier way, i made part of my sprite transparent and had the text behind that bit of the sprite but it looks LAME!

Login to post a reply

Server time is: 2025-05-24 03:25:08
Your offset time is: 2025-05-24 03:25:08