Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Change the algorithm for reflection. #12

Open
ketanhwr opened this issue Sep 15, 2016 · 6 comments
Open

Change the algorithm for reflection. #12

ketanhwr opened this issue Sep 15, 2016 · 6 comments

Comments

@ketanhwr
Copy link
Owner

The current reflection algorithm is a pure brute force. The ray is traced until it hits a mirror, and then the angle after reflection is calculated using inverse trigonometric functions.

Using equation of line and some geometry, this algorithm can be obviously optimised and result in a much smoother gameplay.

@theCSEnthusiast
Copy link

Hello Ketan, Can you please help me to locate the file where the reflection algorithm is written?

@ketanhwr
Copy link
Owner Author

@abhijeetthecode the functions for the reflection algorithm are located in scripts/levels.js

@theCSEnthusiast
Copy link

Thanks, I've started working on it.

@avalan4e57
Copy link

Hello guys. How're you doing? Is the project still alive?

@ketanhwr
Copy link
Owner Author

@avalan4e57 I'm busy with other projects atm and hence I added up-for-grabs tag for other people to contribute. People initiall show interest but unfortunately, forget about the project completely 😕

@manas-droid
Copy link

hey is this project still active?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants