Page 1 of 1

Collision and hw brushes...

Posted: Tue Feb 21, 2012 1:11 pm
by Tuxedo
Hi!
The new hw DoubleBuffer was REALLY FAST thank you!
However I get 2 weird things:

- How to check for a collision in hw mode? I simply can(and for that use software brushes when have to check for collisions) or there was a new way to check that?

- I noticed that the scroll wasnt so smooth or get some weid waves when scrolls...any way to solve that curently?

Keep Up Good Work!

Re: Collision and hw brushes...

Posted: Tue Feb 21, 2012 2:03 pm
by airsoftsoftwair
Collision() is currently not supported for hardware brushes. Just use #BOX instead with the brush position and size.

The scroll "waves" are an OS4 issue. I already noticed the OS4 team about it.

Re: Collision and hw brushes...

Posted: Tue Feb 21, 2012 2:47 pm
by Tuxedo
regarding the #BOX usage...
I read on the guide that was a non accurate way of checking collisions...so I think was better to use software brushes to have more precise collisions recognition? Or #BOX was improved in Hollywood 5?

Re: Collision and hw brushes...

Posted: Tue Feb 21, 2012 3:00 pm
by jalih
Tuxedo wrote:regarding the #BOX usage...
I read on the guide that was a non accurate way of checking collisions...so I think was better to use software brushes to have more precise collisions recognition? Or #BOX was improved in Hollywood 5?
It just means that you can't get pixel perfect collision detection for non rectangular objects using collision rectangles. Most of the time collision rectangles work fine.

Re: Collision and hw brushes...

Posted: Tue Feb 21, 2012 8:46 pm
by Tuxedo
@jalih

mmm...
I'm currently working on an engine for a old style Shoot'Em'Up and that sounds to me really bad...
The #BOX option I think wasnt so precise as needed in that type of game...
However I will try it deeper ASAP :)

Re: Collision and hw brushes...

Posted: Fri Jul 13, 2012 7:49 pm
by airsoftsoftwair
A final decision has now been made on this issue: Collision() now supports hardware brushes but it doesn't support pixel exact collision detection for hardware brushes. This will never be supported because Hollywood would have to read from video memory to do this and that is very slow and will often lock the mouse pointer which looks ugly. Keeping redundant transparency information in fast memory for hardware brushes is also not an option because these bitmaps would have to scaled/transformed when the hardware brush is scaled/transformed and this kills the performance because the copy in fast memory has to be transformed using the CPU.

Bottom line: There'll be no pixel exact collision detection for hardware brushes. As a simple workaround: Just keep a software copy of your hardware brushes and use the software copies for pixel exact collision detection.

Re: Collision and hw brushes...

Posted: Fri Jul 13, 2012 9:50 pm
by Tuxedo
ok :)
that will be done!

Thank you for clarification!

Just to know, any performances problem doing things that way?