Collision and hw brushes...

Discuss any general programming issues here
Post Reply
User avatar
Tuxedo
Posts: 355
Joined: Sun Feb 14, 2010 12:41 pm

Collision and hw brushes...

Post 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!
Simone"Tuxedo"Monsignori, Perugia, ITALY.
User avatar
airsoftsoftwair
Posts: 5887
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Collision and hw brushes...

Post 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.
User avatar
Tuxedo
Posts: 355
Joined: Sun Feb 14, 2010 12:41 pm

Re: Collision and hw brushes...

Post 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?
Simone"Tuxedo"Monsignori, Perugia, ITALY.
jalih
Posts: 281
Joined: Fri Jun 18, 2010 8:08 pm
Location: Finland

Re: Collision and hw brushes...

Post 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.
User avatar
Tuxedo
Posts: 355
Joined: Sun Feb 14, 2010 12:41 pm

Re: Collision and hw brushes...

Post 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 :)
Simone"Tuxedo"Monsignori, Perugia, ITALY.
User avatar
airsoftsoftwair
Posts: 5887
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Collision and hw brushes...

Post 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.
User avatar
Tuxedo
Posts: 355
Joined: Sun Feb 14, 2010 12:41 pm

Re: Collision and hw brushes...

Post by Tuxedo »

ok :)
that will be done!

Thank you for clarification!

Just to know, any performances problem doing things that way?
Simone"Tuxedo"Monsignori, Perugia, ITALY.
Post Reply