How can you further speed up collision detection? How can you build a stream of collisions from a stream of shapes? Is it beneficial to turn every stream into a parallel stream?
- [Instructor] Hi, welcome to the…final video of this course.…This video as about two-phase…collision detection algorithms.…In this video we're going to consider more sophisticated…collision detection algorithms based…on the idea of spatial grouping.…These algorithms are divided into two phases called…the broad phase and the narrow phase.…Then we're going to see how to implement…these algorithms using streams.…
And finally we will conduct couple of performance tests.…So what's the idea of these algorithms?…It's a very simple idea, it consists in grouping game…objects based on their position on the screen.…And this grouping phase is called the broad phase.…In other words we may split our screen into a sort…of a regular grid and put each objects…in the grid cell it belongs to.…
Then in the second phase, also known as the narrow phase,…we only check collisions within each group.…Let's see an example of how this works.…So for instance consider these two boxes,…this is a typical collision between these two boxes,…and these two boxes as you can see belong…
Note: To get the best results from this course, you should be familiar with basic Java programming concepts, including lists, maps, and sets, and have a suitable IDE, such as Eclipse, NetBeans, or IntelliJ.
This course was created and produced by Packt Publishing. We are honored to host this training in our library.
- What is functional programming?
- What are functional interfaces?
- Writing lambda expressions
- Creating functional interfaces
- Composing functions
- Sequential data processing with streams
- Using parallel streams