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.

2D All the way! / massive fps drop

Author
Message
Raver
21
Years of Service
User Offline
Joined: 7th Dec 2003
Location: leeds
Posted: 16th Jul 2004 00:06
What am i doing wrong here(see code)
I am only creating 247 sprites onscreen by placing each 1 with control key,when i have all possible sprites placed the screen fps drops to 7!it started as 63 with just 1 sprite(the cursor) onscreen!! How can I make this faster? I have tried setting sync rate to various things and also dropped the screen resolution!

djwheeler
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Jul 2004 02:28
Insert the following line after your first SET SPRITE PRIORITY command:

set sprite 600,0,1

This disables the backsave for sprites. You will also need to add a CLS at the top of your DO loop to remove the last set of displayed details.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Raver
21
Years of Service
User Offline
Joined: 7th Dec 2003
Location: leeds
Posted: 16th Jul 2004 08:51 Edited at: 16th Jul 2004 08:57
how much will that speed it up?!hmmm..man it is bad though innit.I thought they had resolved the sprite speed issues from DB classic?!
I mean a couple of hundred sprites isnt alot..I cannot paste them as its for a arknoid level editor!So either way there will be a couple of hundred..in the main engine after loading saved levels!

djwheeler
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 16th Jul 2004 09:00
It's possible to make Arknoid in DBClassic so it should be easy in DBPro. You can paste the sprites if you want, or use plains. I have a couple of hundred of plains with no slow down in DBClassic. You need to know how to code it without all of the Sprite slowdown.

Raver
21
Years of Service
User Offline
Joined: 7th Dec 2003
Location: leeds
Posted: 17th Jul 2004 07:18
Yeh,i saw an example with code..called 91_breakout by phaelix!
I see he used plains also! So it must be done in 3d then huh..due to speed limits!!

djwheeler
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 17th Jul 2004 21:58
2D is faster in DB Classic, I also made a 2D version which was faster than the 3D version, but I couldn't have transparent explosions, so I continued with the 3D version instead.

Raver
21
Years of Service
User Offline
Joined: 7th Dec 2003
Location: leeds
Posted: 22nd Jul 2004 20:26 Edited at: 22nd Jul 2004 20:27
ok,see code,your brick bitmap and cursor bitmap should be 32x16 in dimension for this!this is how my original code was!!play with the numdown var between values of 2 and 30,paste loads of sprites and watch the fps drop when the numdown is high!you can have 19 tiles going across now so of course we + and minus 19 when pressing down or up respectively

djwheeler
Raver
21
Years of Service
User Offline
Joined: 7th Dec 2003
Location: leeds
Posted: 22nd Jul 2004 20:35 Edited at: 22nd Jul 2004 20:38
ok,lets make it abit more flexible,we introduce a numacross var now,to make the code cleaner..mess with this number to adjust the tiles across..dont go over 19 of course because the array is set to not handle this!so if we set numacross to 13 and numdown to 15,we have what should be the playing area of arknoid..

djwheeler

Login to post a reply

Server time is: 2025-05-15 16:22:03
Your offset time is: 2025-05-15 16:22:03