This site requires JavaScript, please enable it in your browser!
Greenfoot back
Aura_
Aura_ wrote ...

2018/1/30

I need help with collision detection.

Aura_ Aura_

2018/1/30

#
Right now I have a pretty developed "dodge and collect" game with text screens, options, death screens, animations, etc. I'm on the final level and need help with collision detection as the title says. I have the "granite" background set as the world and used an app to lay black squares onto it to make a layout and want to make it so actors can't go over black squares. I've tried looking online and only seen this in relation to side scrollers, when this is a top down-ish game. I'm thinking of using color detection but am running out of time to figure things out. I want it so the player can't move into the black squares, and so the enemy goes the other direction when it hits the black squares. Please help as soon as possible. Thank you so much!
danpost danpost

2018/1/30

#
Important to know: are these black squares Actor objects or are they drawn onto the background image? Also, what is the cell size of the world and, if larger than one, are actors all maintained within a grid square at each moment? And, at what speed do the enemies move and what rotation directions are allowed for them.
You need to login to post a reply.