How do I check weather I'm on track or grass?

Just started using Construct 2? Post your questions here

Post » Tue Aug 12, 2014 6:21 pm

Hello everyone,

I'm designing a prototype for a racing game, and made a track with grass around it (2 Inkscape layers, one for grass, another for track). Then, I exported the grass layer and the track layer to 2 png images, added them to construct and added a car w/ Car behaviour. In the events, I added a Is Overlapping Track to set the max speed of the car to 250 and not Is Overlapping Track to set the max speed to 80.

Problem is: when it goes to the "hole" inside the track (transparent, so you see the grass layer), is still counts as the track overlapping.

What is the best way of handling this? Will I have to add a shape in the inner boundaries of the track above it to slow it or is there a better way?

Thanks in advance,

Marcelo
B
9
S
3
Posts: 40
Reputation: 780

Post » Tue Aug 12, 2014 8:14 pm

short answer: Yes you'd have to add a shape

longer answer: Using big sprites is probably not the best way and cutting them up into smaller pieces with collision-polygons would work much better..
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 » Tue Aug 12, 2014 8:35 pm

Thank you.
B
9
S
3
Posts: 40
Reputation: 780

Post » Wed Aug 13, 2014 2:58 pm

Another possible way to do it, though time consuming, is to divide the track sprites up into straights and turns, make a family out of them and piece them together to 'build' the track. That way, there will only be collision on track pieces.
Intermediate level Construct 2 developer, looking to build up my portfolio : https://seriouslycrunchy.itch.io/

Current projects : Bite Sized Game Development, please have a look at my tutorials and comment!

I also write for http://moonbooks.net/, please come and check us out!

Follow me on twitter! @SrslyCrunchy I'm always looking for games or templates to highlight, use the hashtag #madeinconstruct !
B
15
S
6
Posts: 52
Reputation: 3,006

Post » Wed Aug 13, 2014 5:15 pm

Hey @SeriouslyCrunchy - was trying that after reading your tutorials - which, if I might say, are awesome.

Will try to follow this approach . Thanks for your reply.
B
9
S
3
Posts: 40
Reputation: 780

Post » Thu Aug 14, 2014 3:03 pm

Thanks very much! Always good to hear from those who are finding my tutorials useful!

It does take a lot of time to place them all and align them, and it does mean you have loads of instances of the sprite objects, but it does mean the whole thing works much better than a single sprite in regards events and especially collisions.
Intermediate level Construct 2 developer, looking to build up my portfolio : https://seriouslycrunchy.itch.io/

Current projects : Bite Sized Game Development, please have a look at my tutorials and comment!

I also write for http://moonbooks.net/, please come and check us out!

Follow me on twitter! @SrslyCrunchy I'm always looking for games or templates to highlight, use the hashtag #madeinconstruct !
B
15
S
6
Posts: 52
Reputation: 3,006


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests