Author Topic: Sprite Collisions?  (Read 4418 times)

Rubix Cube

  • Regular
  • **
  • Posts: 44
  • Christmas is soon. Don't get stressed out, ok?
    • View Profile
Sprite Collisions?
« on: 2009-08-25, 04:55:03 PM »
I tread the halls of the help boards once again, and with me I carry this inquiry;
How would one such as I set sprites to refrain from passing through each other?
 :laugh:
As I've said before (I think), I'm working on a racing game for SGDK2, and having cars pass through each other during a race is a bit of a problem. Can I set sprites to be solid, or even repel each other?
As always, any help is appreciated.  :yes:
I've made more new graphics for the Remository. Check 'em out, you may like them.

Need a new life?
http://www.harvest.org/crusades/events/archives.htm

SmartBoy16

  • Contributor
  • Fanatic
  • **
  • Posts: 587
  • Looking for inspiration.....
    • View Profile
    • Email
Re: Sprite Collisions?
« Reply #1 on: 2009-08-25, 05:04:44 PM »
the clean game may be able to help you solve that. the packages are meant to be pushed around (its not perfect). by adding a few rules, you could have a "pushback" sprite. probably somebody who has more experience on sgdk2 can help you more ;D
Looking to the skies.....

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Sprite Collisions?
« Reply #2 on: 2009-08-26, 07:24:33 AM »
Yes, please take a look at the ReactToPush functions in CleanGame.  When I release SGDK2.1 beta as the release, I'll include these functions as standard functions.  I don't have time to go into detail at the moment, but if you post your specific questions about ReactToPush I can answer them next time I'm on.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Sprite Collisions?
« Reply #3 on: 2009-09-01, 04:57:43 PM »
The ReactToPush function is delivered standard with version 2.1.2 that was just released.  Give it a try.