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 Professional Discussion / starfield scroller

Author
Message
Flashing Blade
23
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 29th Sep 2003 15:21
I used the starfield scroller demo in a game I was making.
Now I compiled my game with patch5 and it goes like a snail.
FPS before patch5 = about 90ish
FPS with patch5 = about 22
so I tried the memblock tutorial. Now I don't know FPS on my system prior to patch5, but after patch5 it's about 28.

my system is quite low spec but its the same system that got 90 fps prior to patch5. (actualy my game was only ever compiled with patch3 so patch4 might be problem)


.
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 29th Sep 2003 15:38
Hmmmm....

Could be that your using a beta patch, which means extra debug baggage and the possibility of slower .exe's. What resolution and video mode are you running it in - I always find windowed fullscreen to be the fastest on my GF2, Fullscreen Exclusive is painfully slow on my setup for some reason. Perhaps there's another way to get the starfield working - 4 or 5 textured plains would make a nice scrolling effect, I used a speed independant starfield in the VSD Tracker help files, basically the faster the PC, the more stars you get - would that be at all useful to you? - just uses the dot command though.


Van-B


Van-B

My cats breath smells of cat food.
Flashing Blade
23
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 29th Sep 2003 16:16
tried at all sorts of resolutions and settings.

I gonna go with textured planes.

reducing no of stars don't make any difference either. With the memblock starfield tutorial the origional program has 3000 stars and 5 layers. I changed to 300 stars and 3 layers - made no difference to fps.

But on the plus side - when i turn the starfield off my program goes very fast (much much much faster than patch3 program). So I feel I've lost a pond and found a fiver

.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 29th Sep 2003 23:30
Have a look at the even-faster starfield code I posted in Codebase

It may not make a difference though, depending on what else you are doing in your code ...
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 29th Sep 2003 23:38
Dont forget you only need one SYNC per loop - any more and it slows down.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Flashing Blade
23
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 30th Sep 2003 00:37
my codes like this
do

stuff
stuff
starfield loop

SYNC

loop

just 1 sync. It runs at below 30fps - the exact same program did 90+fps in patch 3.

It aint a big problem - and I'd much rather have the patch5 3D/sprite speed than the patch 3 dot speed.

.
swdave
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United States
Posted: 30th Sep 2003 05:38
Don`t call fps() more then once in your loop. I think it doubles but it might be causing your problem. Save the value FPS$ = fps() before using it.
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 30th Sep 2003 23:18
No, you cant save the screen fps into a string...


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
swdave
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United States
Posted: 1st Oct 2003 06:32
im sorry

Login to post a reply

Server time is: 2026-07-25 09:59:20
Your offset time is: 2026-07-25 09:59:20