Parallel?
-
@Murtaza why do you not run behaviors in parallel?
-
There should be specific behaviors that make it so that behaviors run in parallel an dthat behavior run in a specific order over a certain amount of time
-
There are a few reasons.
-
Parallel programming is really really hard (not for us.. for you). If things are happening in parallel it's really difficult to sync things up. Your logic becomes very complicated for just making sure things happen at the same time, or they run when they're supposed to.
-
It's not often used for video game logic. Video games are very state based. Do this, if that happens. etc. In parallel programming, the states are all happening at the same time so you're actually spending a lot of time (and behaviours) to just keep track of things. It gets messy quick, and gives off very little reward.
The times where parallel programming are useful, are for things like physics engines, and AI. But we handle that (At least physics) for you. So you don't need to worry about it. -
Did I mention it's really hard? Even now, most apps are not written this way. Unless you're getting into very serious advanced scientific simulations, or things that require a lot of computational power (physics, AI etc. Even these are rarely done in parallel), it's not worth the extra effort. Only in the last few years some AAA titles (games with huge budgets in the high millions) have started doing some things in parallel.
Parallel programming sounds cool. But not really something you need in most situations.
-