Accurate tilemap collisions possible?

Get help using Construct 2

Post » Sun Feb 02, 2014 11:11 am

Hi,

Check out the following example:
https://www.dropbox.com/s/rw4v8n43int501a/HELP.capx

I have been playing around with this for days now and I'm close to giving up, I'm trying to create a laser and bullet which will erase a tile on a tilemap when hit.

Left click to fire laser
Right click to fire bullet

The laser does not find the correct tile unless I reduce the LaserBoltScan size but, then it's not exactly accurate.

Also, the bullets will sometimes go right through the tiles if pointed at the top left edge of a tile.

Are accurate angular collisions possible or are tilemap better suited to grid movement?MiniHulk2014-02-02 11:18:17
Have retro games for sale? Buy & Sell Retro Games UK
B
9
S
2
Posts: 68
Reputation: 768

Post » Sun Feb 02, 2014 12:58 pm

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Feb 02, 2014 1:05 pm

Appreciate the help but, it's not accurate, you can hit the sides of a tile without it erasing.
Have retro games for sale? Buy & Sell Retro Games UK
B
9
S
2
Posts: 68
Reputation: 768

Post » Sun Feb 02, 2014 1:17 pm

Yeah, you're right, this isn't any better than what you had..

oh wait it actually does something.. hmmmm

Changed it a bit to make it even better, but well, it's probably still not good enough.

Maybe you should try and spawn 1px by 1px blocks..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Feb 02, 2014 1:22 pm

That is better but, still skips tiles some times.

https://www.dropbox.com/s/c9gm9731ebq6n8v/gaps.png
Have retro games for sale? Buy & Sell Retro Games UK
B
9
S
2
Posts: 68
Reputation: 768

Post » Sun Feb 02, 2014 1:28 pm

Yes, I understand, I know what gaps are..
I also know programming is being creative..

Like I said, why not spawn small sprites at the corners of the laserboltscan block so you can exactly check the outsides of your laserbeam overlapping a tilemaptile.


I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Feb 02, 2014 1:39 pm

Sorry if I sounded ungrateful, I really do appreciate any help and only will ask for it if I have spent a ton of time trying to figure it out myself first.

I will keep plugging at it, thanks for the tips.
Have retro games for sale? Buy & Sell Retro Games UK
B
9
S
2
Posts: 68
Reputation: 768

Post » Sun Feb 02, 2014 1:56 pm

So here I implemented what I talked about.
It's not the most beautiful solution, but it works

Helped2
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests