Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image PIxel Collision #47

Open
HimeWorks opened this issue Dec 7, 2013 · 5 comments
Open

Image PIxel Collision #47

HimeWorks opened this issue Dec 7, 2013 · 5 comments
Labels

Comments

@HimeWorks
Copy link
Member

@HimeWorks HimeWorks commented Dec 7, 2013

There's this script written by Cidiomar a long time ago that provides pixel collision functionality between characters (player, event, followers) and also with pictures.

http://himeworks.com/redirect.php?type=demo&name=image_collision_detection

They are mostly helper functions, with a couple script calls for eventing purposes.
I don't have the source code for the DLL though.

@DemosKerrigan
Copy link

@DemosKerrigan DemosKerrigan commented Dec 27, 2013

Does it act like sight detection (being spotted at distance by a guard) or something like : The player is next to the event and the player presses the directionnal button leading towards that event (like going trhough, prompting it to react)?

@HimeWorks
Copy link
Member Author

@HimeWorks HimeWorks commented Dec 27, 2013

It is literally just checking if two sprites overlap each other. It even checks non-rectangular shapes, so for example if you have a kitty with a long tail and the tail is moving up and down, your actor will only get hit if the tail actually touches you.

@DemosKerrigan
Copy link

@DemosKerrigan DemosKerrigan commented Dec 27, 2013

Now I get it, that's the thing we see in most plateform games to check if you touched the enemy or not to get damage or other effect. I wonder why I didn't think about it in the first place. How silly of myself ^^"

Thank you very much for the detailed explaination. ^^

@cidiomar-jr
Copy link

@cidiomar-jr cidiomar-jr commented Apr 6, 2014

Is this really being used by anyone? I can try to find the DLL`s source code if so.

@HimeWorks
Copy link
Member Author

@HimeWorks HimeWorks commented Apr 6, 2014

I'd be interested in seeing the source code at the very least, since I haven't had much luck getting an efficient pixel collision check for irregular shapes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.