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 / Why am I fast when I am not?

Author
Message
Easily Confused
23
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 13th Oct 2003 03:00
I'm mucking around with a rotating ellipse snippet I had posted sometime earlier: http://www.thegamecreators.com/?m=forum_view&t=17979&b=6 when I came across a bit of a puzzle.



It's not bad, fairly nippy but I thought I could make it go faster by adding my own line drawing routine in there. Go to line 58 and rem out the Line and unrem the MyLine() call on line 59.

It runs 3-4 times faster for me. How about you?
If it is running faster, then why does the following say it does not?



Or have I completly overlooked the obvious?

Well I do have a cold and a headache and I'm not thinking straight so I'm not sure.

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
Easily Confused
23
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 13th Oct 2003 08:00
Jeez! That's a lousy title for a thread, Master Yoda could not have said that any worse. Bloody cold keeping me up all night messing with my brain.

Put basically, why in the first snippet (after changing line 58 for 59) does using the MyLine() function appear to be faster than the Line commmand, But in the second snippet it's slower?

Or, as I said, have I overlooked the obvious?

There, I think that's a better question (I hope). If you can give some sort of an explanation then I promise not to sneeze and dribble on you

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 13th Oct 2003 08:30
dunno... would go even faster if you used the dot with locked-unlocked pixels

Easily Confused
23
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 13th Oct 2003 09:07 Edited at: 13th Oct 2003 09:09
You are of course right Raven, I knew my feeble brain was missing something

Buy using Lock/Unlock Pixels the second snippet is now fast.



Thanks for that, I promise not to make fun of Marmite again

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.

Login to post a reply

Server time is: 2026-07-26 04:27:04
Your offset time is: 2026-07-26 04:27:04