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! / Major Slowdown

Author
Message
Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 27th Oct 2002 20:01
In a game I made (on DB1.1) I have two sprites. When they overlap, it slows down loads. Is this DB's fault, or is this code slowing it:



note that held(,) and points() are arrays and hit() is a function to see if a button is pressed.
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 28th Oct 2002 03:18
well... array points which hold the number of objects to be created tend to slow things, however in this case it's DB
2d is just slow, but also i'd revise having code like that within a for...next statement

Anata aru kowagaru no watashi!
Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 30th Oct 2002 17:09
ok. thanks. Will this problem go away when I get DBP?
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 1st Nov 2002 09:31
well should increase the speed atleast 4x

Anata aru kowagaru no watashi!
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 2nd Nov 2002 04:23
instead of relying on the sprite collision

set up a distance check in 2d

check to see if the object 1 over laps its distance and then perform the DB collision if u must,

You can work around the collision slow downs by imagining ways to stop it being performed each cycle of the main loop.

indi is part of Team Lunarpixel
multimedia logisitics and interactive media
Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 15th Dec 2002 21:20
I think the built in collision (2D and 3D) should probably be avoided wherever possible.
Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 15th Dec 2002 21:24
Hey that code I posted doesn't make sense. Anyways here is my full code:




by full I mean that's how far I got before I got bored.

Login to post a reply

Server time is: 2024-04-20 15:01:53
Your offset time is: 2024-04-20 15:01:53