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.

Work in Progress / community functions plugin

Author
Message
chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 1st Jan 2009 22:53
hi i was a bit bored so i had an idea to compile a dll of community functions , mainly for ease of use but there might be a small speed increase .

anyway here is the beta
http://forum.thegamecreators.com/?m=forum_view&t=142264&b=18

just post there if you have got some functions worth putting in.

thanks chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
bergice
17
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 2nd Jan 2009 00:02
Well, what do you have so far?

You should make a list.

3.19GHz - 7600GT - 1GB - Windows XP
Visit my youtube profile: http://www.youtube.com/user/bergice1
chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 2nd Jan 2009 00:04
a list sorry i posted them in the other thread.



thanks chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Jan 2009 12:56 Edited at: 2nd Jan 2009 12:57
Could you make a dll out of this function:



Please read the comments...

TheComet

Peachy, and the Chaos of the Gems

C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 2nd Jan 2009 14:22
@ TheComet
I read the rems at the start of that function, and that's pretty smart actually, hehe, I'll remember some of that when coding similar things. (Especially the x*x being quicker than x^2)
chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 3rd Jan 2009 12:42
yes i will add it in as soon as .

cool thanks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Jan 2009 17:25
Well, thank you!

I am having some real problems with the speed of the math functions in DBC. Mostly, I am talking about atan(), tan(), sin() and cos().

Is it possible to add these to a DLL? That would be great if it could boost the speed a bit...

And, if you are up for it, it would be really cool if you could add the rest of my object functions to a DLL. And I mean REALLY cool!

http://forum.thegamecreators.com/?m=forum_view&t=129015&b=6

TheComet

Peachy, and the Chaos of the Gems

chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 3rd Jan 2009 21:21 Edited at: 3rd Jan 2009 22:19
i did try your other object functions (prism and capsule) they came out a bit funky don`t know why they migh only work correct in db classic or i`ve done something wrong somewhere .

the maths functions might be in the c++ lib maths.h if they are you will most certainly get a boost and it should work with dbc.

also i don`t think most of these commands will work with dbc because i call the dbpro dlls and i don`t know how to do it with dbc .

iv`e added the distance function it seems to work ,will upload shortly .

it`s uploaded in the other thread if you want to try them i`ve added the maths commands too , not sure if they work properly

chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 8th Jan 2009 03:37
Is this dll mainly for DBP or DBC? Comet, I tested 20*20 vs 20^2 in Pro and 20^2 was actually faster.

chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 8th Jan 2009 11:20
i am making this for dbpro but some functions which dont call dbpro`s dlls will work with dbc eg ( the distance func , because i use the sqrt from math.h.).

if thats faster i will change that in my code , thanks.

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 8th Jan 2009 17:19 Edited at: 8th Jan 2009 17:50
Quote: "Comet, I tested 20*20 vs 20^2 in Pro and 20^2 was actually faster."


Really? I ran some tests, and I got the opposite. Here is the code for DBC and DBP:



And here I edited the results into one image:



(All numbers are in milliseconds)

And, because I had nothing else to do, I even made a graph...



TheComet

Peachy, and the Chaos of the Gems

chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 8th Jan 2009 20:27
nice graph , i guess i wont change it .

@the comet did you test the maths commands out in the latest release ?

if so let us know how they go .



chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 8th Jan 2009 23:21
Yours is probably more accurate, I didn't use the FOR loops like you did, I just timed one calculation. What does the

for t=1 to 60
sync
next t


Do?

C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 8th Jan 2009 23:39
@ bmaczero
It syncs the program 60 times obviously, xD
chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 9th Jan 2009 02:04 Edited at: 9th Jan 2009 02:05
why would you want to sync 60 times before the main code ?

How strange ,unless it`s a dbc thing.

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 9th Jan 2009 10:59 Edited at: 9th Jan 2009 12:11
Quote: "Yours is probably more accurate, I didn't use the FOR loops like you did, I just timed one calculation. What does the

for t=1 to 60
sync
next t

Do?"


Oh, that is because the syncs jump a lot before the first 30 syncs... That means that for the purpose of calculating the first for t loop will take longer than it should, and the next for t loop takes the time it should. So to get the unsteadiness of the loops down, you run a loop about 60 times and sync.

It`s just a weird thing I noticed with DBC, is it like this in DBP?

@Chunks chunks

Downloading the update right now.

TheComet

EDIT : Uhm, I am still a bit of a noob with DLL`s, even though I can use sparky`s. How do you call the functions?

Peachy, and the Chaos of the Gems

chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 9th Jan 2009 13:07 Edited at: 9th Jan 2009 13:28
@ the comet
if you are using dbp put the dll in user plugins and keywords in the keywords folder and thats it .


if you are using dbc put the dll in with your projects exe and use the call dll command.

you will have to search for the decorated names of the functions in the dll , just use notepad or dllexp viewer .




you`ve got to bear in mind that only your distance function and the maths commands i did what you requested will work with dbc.


EDIT: sorry your gonna have to wait for the distance func , i seem to have broken it ,anyways it shouldn`t take me long will put up a new release tonight.

EDIT2: It works fine in dbp ,just getting strange values calling the dll ,its probably something to do with having to cast a float to a dword to return it dbpro ,don`t know how it works for dbc ,will find out and let ya know.

I might actually say that this dll only supports dbpro ,but don`t fear when i get time in next few days i will make a special one with the commands you requested.
thanks chunks

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 9th Jan 2009 14:14
That would be great!

I`ll try what you said.

TheComet

Peachy, and the Chaos of the Gems

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 10th Jan 2009 00:57
That makes sense, the program is probably still gathering resources and all that.

Login to post a reply

Server time is: 2024-11-24 08:49:36
Your offset time is: 2024-11-24 08:49:36