You are browsing as a guest. Sign up (or log in) to start making projects!

3h 43m 31s logged

TWIN!

I made Collisionboxes and I made it

WITHOUT A LIBRARY!

It was very crazy and if I have more than 50 collision boxes it begins to lag but
IT WORKS!
I made 3 types of the collision boxes:
1.Player (It walks),
2.Areas (You can walk through ) and
3.Wall (You can’t walk through it).

How wonderful!

The video shows it more or less.

Explanation how I made it:

The collision detection: I use an aabb-collision detection so i check if the coordinates of two boxes are overlapping.
The wall: First in the code, the player is moved. Then the coordinates of the player are given to the collision box of the player. After that the code checks if the collision box of the player overlaps with a wall and if that’s the case than it resets the position or smth like that. (I know I’m good at explaining)

Bye Twin!

0
5

Comments 0

No comments yet. Be the first!