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.

Newcomers DBPro Corner / Faster way to put one image on the screen (interface)

Author
Message
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 27th May 2006 15:30 Edited at: 27th May 2006 15:31
Hi ,

Now I am working in the DarkBASIC version of Future Networks.

And I have one little problem.

I use paste image to put my Hud Image on the screen and my
FPS drops down to 10 fps only.

Is there any other usefull way to put my Hud on the screen
without my fps descent to 8-10 frames only?


I have all of my source code and my media attached.

Thank you.

Attachments

Login to view attachments
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 27th May 2006 16:54
I found the problem but I didn't solved.

My problem is: I put my fonts on the screen and some text I want
to make it in Digital and other text with normal text font.


But when change my document in these kind of fonts my game descent
to 10 frames per second only.


Could you have some Idea?
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 27th May 2006 17:14
I thing the problem is , DarkBASIC PRO text are very slow.

Is there any text dll faster than built in?


Changing fonts allways in runtime , makes program to slow.
Hmm.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 27th May 2006 18:34
Text won't slow down your game to 10fps. If that's the case, I'd say you computer is either 10 years old or has some serious issues.

"Using Unix is the computing equivalent of listening only to music by David Cassidy" - Rob Pike
Represent
20
Years of Service
User Offline
Joined: 24th Dec 2003
Location:
Posted: 27th May 2006 18:42
Yea DBP text isnt slow AT all. Its just impossible unless you are running a .00000000001 byte GFX card or something.

Formerly: xTransworldx & Modest Mouse
Support RPGTK!http://www.toolkitzone.com
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 27th May 2006 18:51
Ok, i tried your program and I got 7fps.
It could be the hud image, but I dont see how it could possible kill the frame rate that much. I can't edit your code really, "open file block" isn't a command according to my DB

"Using Unix is the computing equivalent of listening only to music by David Cassidy" - Rob Pike
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 27th May 2006 20:37
Lock a plain to the screen for the hud.

Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 27th May 2006 21:52 Edited at: 28th May 2006 02:04
Quote: "
Text won't slow down your game to 10fps. If that's the case, I'd say you computer is either 10 years old or has some serious issues.
"


My computer is an Athlon 64 in 3500+
My Graphics card is NX 6600 256MB.

My RAM is 1G

My Windows are updated with newest direct X. SP2
My Language is fresh installed and everything are fresh installed
from Format.


If I want to use different kind of fonts many times
programm become slow.

I found one library with name 3D3 Func.I found it from here.

http://forum.thegamecreators.com/?m=forum_view&b=5&t=69221&p=0

I saw some improvements and I am learning how is working.


I have uploaded newer version for who does not have enhancement
pack plugins to see the difference if I don't put drawmoney
function in my main loop , I have better fps.


I put one function in the main loop of my program to update money
for my game.
If I don't put this function I have better resaults.

I upload only exe and media file to see the difference.

Quote: "
Ok, i tried your program and I got 7fps.
It could be the hud image, but I dont see how it could possible kill the frame rate that much. I can't edit your code really, "open file block" isn't a command according to my DB.
"


File Blocks are Enhancements.


Quote: "
Lock a plain to the screen for the hud.
"



How do I make this?

Thank you very much.



Is there some Idea

Attachments

Login to view attachments
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 27th May 2006 22:37
I used this new library and I have better resaults I fix the problem with this library.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 28th May 2006 00:20
The reason your initial code was so slow is because you changing font in main loop is really badly handled in DBPro. It reloads font every every time and you are doing even worse by swapping between multiple fonts. Also changing text size or format in loop really slows things down aswell.

There was talk that TGC would improve loading of fonts, so at least they weould be cached if needed again in same program, but nothing ever happened.

As you have found Cloggys text dll, that is by far the best solution and it does funky anti-aliased text to boot.

Boo!
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 30th May 2006 04:03
I fixed my problem with Text DLL plugin.

Soon I will post some early view of my Game Interface.

Thank you very much.

Login to post a reply

Server time is: 2024-11-27 18:39:28
Your offset time is: 2024-11-27 18:39:28