+ 1

How do you manage collision in games ? What is the most efficient way?

Learning game development.But stuck on collision.In social media collision is not explained with beginner friendly. How do you make collision work? Explain with you example

26th Mar 2020, 5:56 PM
Ankush Thakur
Ankush Thakur - avatar
4 odpowiedzi
+ 2
To code with classes. So can be clearly defined collisions for each object. That means OOP - object oriented programming
26th Mar 2020, 9:23 PM
JaScript
JaScript - avatar
+ 2
( x position + height && y position + width ) this should work for a 2d game basically you check the current x position adding its scale and see if anything else overlaps or inside the object!
6th Apr 2020, 5:52 PM
Divij Manik
Divij Manik - avatar
+ 2
if you are willing to use game engines then they mostly have colliders that can be added to you image or model
6th Apr 2020, 5:53 PM
Divij Manik
Divij Manik - avatar
0
Write the code with example wither in C# ,C++ or python
27th Mar 2020, 8:11 AM
Ankush Thakur
Ankush Thakur - avatar