Search found 51 matches
- Mon Apr 14, 2014 4:07 pm
- Forum: Support and Development
- Topic: Checking pixels in tmx files
- Replies: 25
- Views: 12086
Re: Checking pixels in tmx files
Does the checking speed depend on the image color? I mean, would a seperate black and white collision mask speed up the process?
- Sun Apr 13, 2014 4:38 pm
- Forum: Support and Development
- Topic: Checking pixels in tmx files
- Replies: 25
- Views: 12086
Re: Checking pixels in tmx files
Have you found a solution?
- Thu Apr 10, 2014 8:13 pm
- Forum: Support and Development
- Topic: Checking pixels in tmx files
- Replies: 25
- Views: 12086
Re: Checking pixels in tmx files
Here it is.
Edit: I forgot to tell, but I made it with 0.8.0.
Edit: I forgot to tell, but I made it with 0.8.0.
- Thu Apr 10, 2014 6:23 pm
- Forum: Support and Development
- Topic: Checking pixels in tmx files
- Replies: 25
- Views: 12086
Re: Checking pixels in tmx files
The problem with pixel collision is that it is slow under most circumstances. Making the computer check thousands of pixels everytime is slow. Are you checking them every frame? If you are, just compare the pixels in an area close to the player (for example, pixels in a radius of 50 pixels around t...
- Thu Apr 10, 2014 5:08 pm
- Forum: Support and Development
- Topic: Checking pixels in tmx files
- Replies: 25
- Views: 12086
Re: Checking pixels in tmx files
Pixel collision will be fine for me, but how can I make it faster if I plan on making huge levels?
- Wed Apr 09, 2014 6:45 pm
- Forum: Support and Development
- Topic: Checking pixels in tmx files
- Replies: 25
- Views: 12086
Re: Checking pixels in tmx files
Ok, I will listen to you guys, pixel collision may be slow, but i don't know how to make any other collision system, except tile based. The one with polygons sounds good, but I have no idea how to implement it. Can somebody explain it, including the details?
- Wed Apr 09, 2014 10:19 am
- Forum: Support and Development
- Topic: Checking pixels in tmx files
- Replies: 25
- Views: 12086
Re: Checking pixels in tmx files
I know, but I want to experiment a bit with the different kinds of collision systems, starting with the easiest ones to implement. I have tried tile based so far, but I didn't like it, because it didn't give me enough freedom.
- Tue Apr 08, 2014 6:46 pm
- Forum: Support and Development
- Topic: Checking pixels in tmx files
- Replies: 25
- Views: 12086
Checking pixels in tmx files
Hi. I am working on an engine for my later games and I'm using getPixel on a map image for collision detection, but have I realised that if my image would be larger, it would take more time to check for collisions. So I came up with the idea of checking pixels in tmx maps. Is that possible? If so, p...
- Sun Mar 30, 2014 10:59 am
- Forum: Support and Development
- Topic: getPixel in a line
- Replies: 2
- Views: 1036
Re: getPixel in a line
It worked, thank you very much.
- Sat Mar 29, 2014 8:23 pm
- Forum: Support and Development
- Topic: getPixel in a line
- Replies: 2
- Views: 1036
getPixel in a line
Hi guys. I have bumped into a problem while making my own collision system. I know how to check for non-transparent pixels, but i have no idea how to check if there are any in a horizontal line. I have tried a for loop, but my character falls through the ground. Here is the function code: function m...