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 / game speed drops with text

Author
Message
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 5th Jun 2007 22:11
okay, i am starting to make a small 3d shoot em up game. I had my ship, my smoke particles flying out the back, my muzzle flash, my bullets, but when i went in to try and add some text saying "HEALTH" the speed of the game dropped dramaticly. why does this happen, and can any one help me fix it please?

code :



"these shoes are 300 hundred dollars"-Shoes by Kelly http://smallgroupproductions.com/
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 5th Jun 2007 22:16 Edited at: 5th Jun 2007 22:25
text and print commands are slow in DBpro. Good to use in debug window, as indi helped me with recently, but for actual ingame prompts and texts you are better off making a graphical font and pasting them as sprites. It take a bit more work, and some coding on your part.

not sure if there are ways to improve what you have, but perhaps turning sync on, and setting the sync rate. I'll try it to see what I get.

[edit]
okay i see you have sync on ; sync rate 400

i din't know you could use ";" rather than ":"

flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 5th Jun 2007 22:35
lol, i only figured it out when i hit by accedent. i had a argument awhile ago about using that instead of :.
thanks for the sprite tip. so, what, you import 26 images, each one of a dfferent letter and piece them together some how?


"these shoes are 300 hundred dollars"-Shoes by Kelly http://smallgroupproductions.com/
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 5th Jun 2007 22:41 Edited at: 5th Jun 2007 22:43
yep, there are some free ones in the 2d board. I'll look them up for you.

Or for the word health you could draw that to the screen, using the text command. before your main loop and then grab the image. Inside your loop you past that image/ or make it a sprite. for the Dynamic parts like value it holds you will need either seperate images (either by the same method as above), or create a single sprite sheet that you rip from. Then a function that converts the value to the correct sprite/image.

i have some code, I'm just not all organized right now. I reinstallded my os recently, and haven't copied everything over.

zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 5th Jun 2007 22:46 Edited at: 5th Jun 2007 22:52
Scraggle had some and with the code to use them, so it may help you.

Bitmap pack#
1. http://forum.thegamecreators.com/?m=forum_view&t=74431&b=4
2. http://forum.thegamecreators.com/?m=forum_view&t=74430&b=4
3. http://forum.thegamecreators.com/?m=forum_view&t=85440&b=4

just search the 2d all the way board for FONTS or BITMAP FONT

Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 5th Jun 2007 23:34 Edited at: 5th Jun 2007 23:34
Or you could take the commands

out of your do-loop. Put them before "do" and it should run much faster- possibly twice as fast.

zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 5th Jun 2007 23:35
ooh didn't see that. nice find.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Jun 2007 23:46
Quote: "it should run much faster- possibly twice as fast."


Probably much faster than that even

Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 6th Jun 2007 01:14 Edited at: 6th Jun 2007 01:15
Why not use my d3dfunc dll found here

This has ultra fast antialiased text (much faster than the DBPro native commands) plus much much more all for the bargain price of £0.

Cheers,

Cloggy

Login to post a reply

Server time is: 2024-11-25 17:46:34
Your offset time is: 2024-11-25 17:46:34