codingtrain / directional-boring Goto Github PK
View Code? Open in Web Editor NEWHorizontal Directional Drilling Simulation
License: MIT License
Horizontal Directional Drilling Simulation
License: MIT License
In the current simulation, you can potentially circle infinitely.
Also, drilling through your own pipe normally breaks it.
@shiffman mentioned this in today's stream. I wonder how this could be implemented.
Perhaps on this practice mode there could be a curve showing where the drill will be in the future if the bias is kept enabled/disabled?
Originally posted by @ArztKlein in #4 (comment)
Love this! It would be cool to have the "boulders" integrate more with the layers so that they feel more realistic? Some other ideas are:
Originally posted by @shiffman in #17 (comment)
I have added a rudimentary scoring system. (It adds a point for every advance and penalizes if drill bit goes out of bounds in x direction.
https://editor.p5js.org/kfahn/sketches/tOVT5TEMf
To do: add penalty for entering water
steering has additional randomness to simulate different ground conditions
One thought I had would be something along the lines of a "fog of war" other games use, simulating real-time scanning, that only reveals a small area around or slightly ahead of the drill head, and you'd have to react appropriately to any suddenly-appearing obstacles if you can, given the limited turning radius of your drill head. I assume there's scanning and mapping done well ahead of time IRL, of course, but this might a fun twist.
Originally posted by @aerger in #4 (comment)
After seeing this in Grady's video I, being programmer, just had to take a look. First of all, congrats on a great job, the game is really fun, and I'm still quite shocked how adequate the value 0.01
is for the const angle
, I've experimented with different values and the range from 0.005
up to 0.02
is playable (And may be interestring to explore it as part of the difficulty settings), but 0.01
is by far the value that fits the largest range of possible scenarios.
That, however, aggravated my issue with the controls. Clicking depends on targeting the right element, which has nothing to do with the game, and playing in a laptop with a high DPI touchscreen makes it worse as the high DPI makes things smaller and it's noticeably hard to hit the button on the touchscreen.
I made a small addition to the code which fixed most of my issues:
function keyTyped() {
console.log("J=Key typed: ["+key+"]")
if (key === " ") {
if (state == 'PAUSED') {
state = 'DRILLING';
} else if (state == 'DRILLING') {
bias *= -1;
} else if (state == 'WIN' || state == 'LOSE') {
startDrill();
}
}
}
I put it right above // Draw loop
, but it's my first time writing anything related to p5.js so that's probably not the best place to put it.
The angle
experimentation also made me realize the steering limits shift ever so slightly, no idea whether it'd be easy to fix or not (It occurs to me that it may, for whatever reason, depend on the draw
function and the time it takes to run, in which case it would be a very demanding issue and definitely not worth the trouble, but most likely that's not the case).
Again, congrats on the game and the channel, really happy to see such an amazing approach to spreading programming literacy, I'll be sure to spread the word.
I think it would be cool to give the game a name and a hashtag so that it can be made viral at some point.
Am I the only one who feels like the drill moves too fast? As far as skill games go, it's not the worst. But it's a far cry from the highly calculated pace that I imagine. I looked at the sketch code and realized that I have no idea how the loop speed is controlled; in fact I'm not even sure if javascript (or P5 in this case) even does loop like a traditional program.
Is it possible to implement a feature like this?
@DenisovichDev can we update the interface for the phone screen.
I am thinking to have a large toggle bias button in the middle and all the other controls closer to the bottom:
Practice
Hard
Pressing space causes scrolling in the browser, which is not a problem with bigger screens since the body isn't long enough. But in small screens it's a big problem. I'll fix this in a small PR.
One cool idea for procedural terrain generation would be different geologic layers that affect the steering bias. So when you're in a "hard" layer, maybe it doesn't turn as sharply (and so on). It could be a color lookup like the collision detection.
Originally posted by @gradyh in #2 (comment)
I would like to use your initial demo as part of my research.
What are the License and the best way to cite your original project?
I suggest some additional visualization of drilling disasters:
@shiffman finally managed to get time to start watching your life stream.
The pop-up is shown while there is animation of a new pipe loaded in the machine. Should we remove them?
The scoring is currently displayed in 'courier-bold'.
It seems that this does not work on Linux (Ubuntu 20.04 LTS) and defaults to something ugly.
Draw a scalable house that the player should not drill into. This is a sub-issue of #41.
Please create a global constant color of the part touching the ground for the win/lose checking.
An additional broken house would make the loose screen look cool.
In the code, there is a placeholder for drawing house(s) into the scene (might be not merged yet).
// todo add the houses here
// it is important to color houses differently
// because the status checking occurs based on color
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.