0

Can anyone help me

Hi, I'm new to java, and I need help with a code that if two objects make contact, then I win

13th Dec 2019, 5:04 AM
Donovan Lopez
Donovan Lopez - avatar
8 odpowiedzi
+ 2
Can you please explain your question further? How are the objects shaped? how do you handle their position? are you using a jframe? If you are using rectangles for example, take a look at AABB Collision. There are a bunch of codes online that'll help with that.
13th Dec 2019, 5:19 AM
coddy
coddy - avatar
+ 1
Coder's Crux I am making a parking game and the car is a rectangle and the winning spot is an ellipse. The rectangle is controllable.
13th Dec 2019, 5:45 AM
Donovan Lopez
Donovan Lopez - avatar
+ 1
Okay, This task should actually be pretty simple, but tell me if I'm picturing this right. If the car hits any other parking lot with a car it fails. Is the parking lot shaped like a standard rectangular one, and if so, how is the winning spot going to be? at which point are you going to win. I do suggest though, that all your collision wil be with rectangles, as that's the easiest to do. Also, could you perhaps attach a picture? I'd love to help you as much as I can cause I'm currently making a 2d game engine in java doing all of these things.
13th Dec 2019, 5:50 AM
coddy
coddy - avatar
0
All collisions on rectangles WILL result in a loss
13th Dec 2019, 5:54 AM
Donovan Lopez
Donovan Lopez - avatar
0
Are all the levels hand-made? EDIT: Alright, this is taking way too many posts, do you want to move to a private conversation?
13th Dec 2019, 5:56 AM
coddy
coddy - avatar
0
Hi
13th Dec 2019, 11:35 AM
MD Mahbub Alam
MD Mahbub Alam - avatar
13th Dec 2019, 3:39 PM
Donovan Lopez
Donovan Lopez - avatar
0
Coder's Crux yes please
13th Dec 2019, 3:39 PM
Donovan Lopez
Donovan Lopez - avatar