CodingTrain / Directional-Boring

Horizontal Directional Drilling Simulation
MIT License
44 stars 20 forks source link

Implemented variable speed (need to be decided for each game) #40

Closed alin256 closed 1 year ago

alin256 commented 2 years ago

Solves issue #37. However, to keep the code modifications to reasonable, I only allow changing the speed for a new game. That way, the number of points in the path array represents the drilling length.

@DenisovichDev, I did not manage to integrate the speed slider nicely into the interface since you are using non-P5 sorcery for layout beyond my understanding. Maybe you can take a look at how to fix it before merging.

The testing version is running at https://al-digital.no/Directional-Boring/

DenisovichDev commented 2 years ago

The speed slider seems great! And letting the user change it only for a new game makes sense game play wise too.

I will try to fix this tonight. If you don't wanna merge this before the fix, I guess I'll have to commit to this PR? I don't know if I have the permission for that though

DenisovichDev commented 2 years ago

@alin256 My fix is ready to push to this PR, but I'm getting a permission denied message since I'm not a maintainer (if you have allow edits by maintainers ticked on). I guess you can either fix the permissions or just merge this as is, and I push the fixes in a different PR.

Also, did you want the randomness label to show the current slider value? I can make that work with the way the code is now, if you want. Using p5 sliders is a pain from the UI side, basically. Let me know if you want me to add that in.

alin256 commented 2 years ago

@alin256 My fix is ready to push to this PR, but I'm getting a permission denied message

I am a bit confused about which access you are lacking. Is it to alin256:variableSpeed ? Maybe it is easiest for you to create a new PR?

DenisovichDev commented 2 years ago

Yes it is to do with that branch. I'm not sure about this permission thing, tbh. Yeah I guess you can merge this, I'll make a different PR.

alin256 commented 1 year ago

I think I have a better way to change speed now without sliders