Help making beetles easier to kill

oh no! I was swapping out the art on the flowers in level 1 (turned out to actually look too faded, so I swapped it back), but when I played it (having changed nothing else), now some of my mites don’t move properly. Some are stopped completely and some glitch. None of the other code was touched, so I have no idea how to fix this…any ideas what I broke? :wink:

2 Likes

Are you talking about the mites that are repeatedly slamming themselves into the flowers?
Just turn the hitboxes of the flowers to rectangle, that should fix it.

Also I recommend instead of using collisions you use ray casts for the mite movements, it should make their movement a bit more smother.

1 Like

I’ve never used a raycast! Any tips on that would be great. I like how relentless those mites are, but not that they are super buggy, pardon the pun!

I just repositioned the hive cells on level 3, I see what you mean now more space removes the tiling overlap. Will fix the flower collision shape and try the raycast as well. Thank you!

1 Like

Raycasts behave exactly like proximities, only they test in a straight line instead of a circle. You can change the angle of the line and it’s length.

2 Likes

They are very useful for doors, automatic weapons, and sensors.

Here are some things to know:

Angles use numbers 1 - 360
Up: 270
Down: 90
Left: 180
Right: 0

If you click on the behavior and look at the object it’ll show a white line representing the raycast.

You usually want to use an always behavior or any other type of triggers to activate it or else it won’t cast.

2 Likes

And “Xor” logic gates are useful if you want it to sense one raycast but not the other.
Also @glowbug it uses angles…

1 Like

Super helpful @glowbug and @meburningslime. I can finally get those dang mites to move without spasms.

I have a long to-do list to finish this by this week, but that’s when my students are due to turn in their games, so…must be a good example. Thank you!

2 Likes

Super excited to see what they come up with!!! If possible I’ll try to play some of their games and give my feedback to you, if that’s ok with you.

1 Like

Also check the forums, I’m nominating glowbug for a badge award for being super helpful, if you agree that he is you should vote.

Could you supply some links to their games once it’s finished, if you are comfortable letting it out? Thanks.

I’ll have to ask my students their permission to share. This is my first time teaching game design the way I’ve wanted to teach it, with the right tool, etc. to my classes. Last year our unit was cut short due to the pandemic. My students are struggling with lots of trauma this year (many lost family members) and working in teams remotely has proved challenging…I’m hopeful we’ll get something “playable” but not necessarily games they would want to broadcast, yet. I’m encouraging groups to continue working on their games after our unit ends and consider what more they could do if given more time. I had hoped to get six games this year (two classes, three groups each) but we’ll see…I’m grateful for any completed work. It’s a tough year to be a teacher.

2 Likes

Yeah, I got the raycast to work in level 1 mites…moving on to beetles!

2 Likes

Yeah, I totally understand. Both of my parents are tutors for homeschoolers.