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.

Author
Message
CoTang
22
Years of Service
User Offline
Joined: 18th Nov 2003
Location:
Posted: 22nd Nov 2003 19:03
Has anyone here made a subroutine or a function or ANYTHING that can time slice? It would be helpfuly for games that requires multiple functions to be called at the same time.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Nov 2003 20:05
I have a plug-in that you can use to load data in the background while you are doing something else.

That's about it I think, because DBPro doesn't support multithreading
CoTang
22
Years of Service
User Offline
Joined: 18th Nov 2003
Location:
Posted: 23rd Nov 2003 01:45
Really? Wow..... that not cool. You think DBP in the future will support this since almost all new games (I think) uses multithreading to help easy coding. Oh, well.
Neophyte
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 23rd Nov 2003 03:25
My memory may be a little hazy on this one, but I remember some time ago Rich said that it is unlikely since that would change the linear nature of the language. I read that to mean that introducing multithreading would open up a load of new problems that having the language be linear avoided.

Of coarse, you could always email lee at [email protected] and ask him directly to see what he has to say about the matter. You never know, he might even decide to include multithreading into the language as a result.
EricDB
22
Years of Service
User Offline
Joined: 22nd Nov 2003
Location:
Posted: 23rd Nov 2003 05:00
Depending on what kind of code you're writing, I'd hazard two guesses:

1) Only a very few functions will actually *need* to timeslice

2) Writing those functions so that they can cope with running in 1/100 second chunks is probably far easier than dealing with multithreading.
CoTang
22
Years of Service
User Offline
Joined: 18th Nov 2003
Location:
Posted: 23rd Nov 2003 07:21
yeah, but I still want it. I programmed in SDL before and I found that using time slicing was very helpful in many different aspect of my game programming experience. But SDL is a very limited, and I perfer DBP.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Nov 2003 12:53
Multi-threading just isn't needed for the vast majority of things, and there is also a cost involved ... slower libraries for a start, because they would have to check to see if the next operation is 'safe' to do.

This would need to happen for anything as complex as accessing an array entry, on upwards - and that would slow DBPro to a crawl, and use up loads of memory (critical section for each array, image, sprite, object, sound, bitmap, memblock, etc)

Then there's all the effort involved in making the libraries properly thread-safe. That would takes months of work to do correctly, and would probably involve changes to the existing commands/language too.

In summary : Don't hold your breath

Login to post a reply

Server time is: 2026-07-26 15:31:22
Your offset time is: 2026-07-26 15:31:22