Sounds good to me. I like that you're planning on leaving the momentum factor in place.
I always had that intention. I dislike the idea of having a cart getting boosted to maximum speed only to immediately start decelerating again. The momentum mechanic will also allow for a margin of error when laying track and reduce "wasted" track. If you accidentally lay too many boosters, the power will simply allow the cart to travel further. Of course, there will be a hidden momentum limit, but I'm still unsure of what that will be or how it would work.
I always had that intention. I dislike the idea of having a cart getting boosted to maximum speed only to immediately start decelerating again. The momentum mechanic will also allow for a margin of error when laying track and reduce "wasted" track. If you accidentally lay too many boosters, the power will simply allow the cart to travel further. Of course, there will be a hidden momentum limit, but I'm still unsure of what that will be or how it would work.
I can't believe I overlooked such a simple solution (resetting the momentum when hit with a booster in the opposite direction) but so far the mechanics look like
When {Minecart touches booster} Then {Push Minecart in max speed in the direction its facing}
We would have to run some checks (I only know C++ so I'll be using their terms). Checks in C++ are written as "If-then" and "Else if then" statements.
So It should be more like this
When {Minecart touches booster}
If (Booster is facing the opposite direction)
-Then (Check momentum value)
--If Momentum < 25%
---Then reverse direction
--Else, if Momentum > 25%
---Then reduce speed by 25%, keep direction
--Else, if momentum = 25%
---Travel one track, then cease movement.
Else, if (Booster is facing the same direction)
-Then increase speed/ momentum by 25%
Or something like that
Rollback Post to RevisionRollBack
-Yes he's 100% vanilla minecraft (without the cherry) legit
-No I do not plan on setting him on fire
Actually, there's a simpler way. Consider the following:
[*:mvup5ho1] A Minecraft world is structured using X and Y coordinates.
[*:mvup5ho1] Booster-brakes always "add" a value to a minecart's momentum in either the X or Y plane. They can also "add" negative values.
[*:mvup5ho1] Assume North and East are positive directions, South, and West, are negative directions. North and South are the Y plane, West and East are the X plane.
[*:mvup5ho1] Depending on what direction a BB is facing, it will "add" either a positive or negative number to the X or Y momentum. A BB facing North for example, would add +25% speed to Y of any passing carts. A BB facing West would add -25% to X of passing carts.
For example, let's say a cart is traveling South at -25% speed (It's a negative speed because it's traveling in a negative direction). If it passed over a BB also facing south, it would get even more negative speed and in fact move even faster South along the Y plane. (-25%) + (-25%) = -50%
Now, continuing the example, let's say this same cart is still traveling South at -50% Y. It then passes over a North facing BB. The North facing BB adds +25% speed to the cart's Y speed and slows the cart down. (-50%) + (25%) = -25%
You follow?
In other news, I've just finished up some quick re-do's for the detector block textures to reflect their new single side output mechanic. I'll update the OP today/tomorrow/soon.
Please note that the "input sides" are oriented so that the lines of the textures align with the output side.
The textures:
<- occupied cart detector output side
<- occupied cart detector input sides
<- empty cart detector output side
<- empty cart detector input sides
<- detector output side light
If you guys really hate them we can update the terrain.png later, but for now this will allow our programmers to start programming the single side output detector blocks.
tl;dr all the above: All you need is a single addition for speed when passing a booster, with no conditionals. The momentum will, however, need to check if their signs are the same and if it's greater than 100% or less than -100%.
Actually (i just finished a basic physics course) speed is never going to be a negative because it is a rate of distance/time. Distance will never be negative because it does not pay attention to direction (it isnt a vector) and time will never be negative obviously. Velocity is what your looking for here because it is a vector which contains direction and speed. Just a technical thing that I found.
The WIP mod I posted before added or subtracted 4000 from the momentum variables (there is no speed variable just a max movement/speed of 0.40000000000000002 per update event) this large value made it difficult to see the "braking effect". Another issue is the max movement is less than one block resulting in each booster actually boosting multiple times. I've uploaded two new versions one with momentum + MAXSPEED and the second with momentum + MAXSPEED * 0.25.
@Fearnorith, Eagle0600, thanks for your clarifications. Hopefully the intended function of the booster-brake is clearer. On a related note, apologies to Zenox for butchering basic physics terms. I should know better after all the physics classes I took back in high school. That being said, I'm still unsure of how to best explain the booster -brake mechanics to people who might not have a physics background. "Vector Derived Booster" might be a better name and description of it's actual function than 'Booster-Brake but it also seems a little too scientific. Anyone have any better suggestions for a better way to describe the piece and it's function?
Also, yes to making the mod compatible to mod loader. :biggrin.gif:
[EDIT] @mcmodder_07, nice! I'll check out the update right away. Thanks for the info as well. I wonder if there's a way for a BB to check if it's already boosted a cart once and not apply the value multiple times...
Yet another test run using mcmodder_07's .25 BB, this time its a bit more complex:
The BB doesn't follow the logic of other track pieces yet so making an interchange takes a bit more planning. If anyone is interested in seeing the mechanics of it in more detail I can make a video about them.
not sure if this has been posted, just an idea: have a jump plate so when activated, will boost the cart upwards while still maintaining its momentem. could be used to have the cart going in different routs and for minecart jumps.
[EDIT] @mcmodder_07, nice! I'll check out the update right away. Thanks for the info as well. I wonder if there's a way for a BB to check if it's already boosted a cart once and not apply the value multiple times...
How about a counter?
Counter == 0
When {Minecart touches booster brake}
-If (Counter > 0)
--End Script
-Else
--Increase or decrease speed/momentum/velocity/what have you
--Counter = +1
That way after it runs the code once it increases the counter before running the code again and therefore wont boost a second time. Then maybe the counter could decrease again after a certain amount of time. Or perhaps maybe make the booster itself wait a few seconds after boosting...
*Mid-Post epiphany
Here is what I mean
When {Minecart touches booster brake}
-Increase or decrease speed/momentum/velocity/what have you
-wait(1 second)
Or however you would have to word it so that the script has a wait time that is longer than it take the player to get over the piece. *looks behind him all paranoia-like to see if anyone is still following him*
Rollback Post to RevisionRollBack
-Yes he's 100% vanilla minecraft (without the cherry) legit
-No I do not plan on setting him on fire
not sure if this has been posted, just an idea: have a jump plate so when activated, will boost the cart upwards while still maintaining its momentem. could be used to have the cart going in different routs and for minecart jumps.
Elevator, in other words. I believe that that has been suggested, in numerous variations.
not sure if this has been posted, just an idea: have a jump plate so when activated, will boost the cart upwards while still maintaining its momentem. could be used to have the cart going in different routs and for minecart jumps.
Thanks to a bit of variable confusion, by current booster brake doest just this :smile.gif:
@Brigander, the speed at which you manage to upload demo vids continues to impress me. xD
Question for anyone: What happens if a cart falls directly onto a full-stop or booster that's activated? (Like, from a ledge or something? (I'm still busy setting up the mod so I haven't tested it yet myself)
I would assume it follows the same physics as being pushed by both sides of boosters and being in the middle when I toggle the stopper. It stops where it lies.
And when you have nothing to do but lurk on forums and play Minecraft making vids is quick lol.
Rollback Post to RevisionRollBack
No matter how dark the night may seem, there is always the light of hope to guide your path, you only need to allow it.
Nope. Carts pass right through a full stop if the drop onto an active one. (just tested it)
Also, I found a couple weird glitches. This is a screen cap of a sheep that hitched a ride in my test cart, rode it off the ledge, and was suddenly suspended above the cart which was stopped by the powered full-stop. The sheep is still detected as being stuck in the cart btw. Straange.
Sounds good to me. I like that you're planning on leaving the momentum factor in place.
I always had that intention. I dislike the idea of having a cart getting boosted to maximum speed only to immediately start decelerating again. The momentum mechanic will also allow for a margin of error when laying track and reduce "wasted" track. If you accidentally lay too many boosters, the power will simply allow the cart to travel further. Of course, there will be a hidden momentum limit, but I'm still unsure of what that will be or how it would work.
I can't believe I overlooked such a simple solution (resetting the momentum when hit with a booster in the opposite direction) but so far the mechanics look like
We would have to run some checks (I only know C++ so I'll be using their terms). Checks in C++ are written as "If-then" and "Else if then" statements.
So It should be more like this
Or something like that
-No I do not plan on setting him on fire
Actually, there's a simpler way. Consider the following:
[*:mvup5ho1] A Minecraft world is structured using X and Y coordinates.
[*:mvup5ho1] Booster-brakes always "add" a value to a minecart's momentum in either the X or Y plane. They can also "add" negative values.
[*:mvup5ho1] Assume North and East are positive directions, South, and West, are negative directions. North and South are the Y plane, West and East are the X plane.
[*:mvup5ho1] Depending on what direction a BB is facing, it will "add" either a positive or negative number to the X or Y momentum. A BB facing North for example, would add +25% speed to Y of any passing carts. A BB facing West would add -25% to X of passing carts.
For example, let's say a cart is traveling South at -25% speed (It's a negative speed because it's traveling in a negative direction). If it passed over a BB also facing south, it would get even more negative speed and in fact move even faster South along the Y plane. (-25%) + (-25%) = -50%
Now, continuing the example, let's say this same cart is still traveling South at -50% Y. It then passes over a North facing BB. The North facing BB adds +25% speed to the cart's Y speed and slows the cart down. (-50%) + (25%) = -25%
You follow?
In other news, I've just finished up some quick re-do's for the detector block textures to reflect their new single side output mechanic. I'll update the OP today/tomorrow/soon.
Please note that the "input sides" are oriented so that the lines of the textures align with the output side.
The textures:
<- occupied cart detector output side
<- occupied cart detector input sides
<- empty cart detector output side
<- empty cart detector input sides
<- detector output side light
If you guys really hate them we can update the terrain.png later, but for now this will allow our programmers to start programming the single side output detector blocks.
Actually (i just finished a basic physics course) speed is never going to be a negative because it is a rate of distance/time. Distance will never be negative because it does not pay attention to direction (it isnt a vector) and time will never be negative obviously. Velocity is what your looking for here because it is a vector which contains direction and speed. Just a technical thing that I found.
I like the new detector block textures.
Editing the terrain.png is acceptable because it is a work in progress. When it is a finished mod it will most likely be mod loader compatible.
Link: http://www.mediafire.com/?41nihcktw97jgd2
Also, yes to making the mod compatible to mod loader. :biggrin.gif:
[EDIT]
@mcmodder_07, nice! I'll check out the update right away. Thanks for the info as well. I wonder if there's a way for a BB to check if it's already boosted a cart once and not apply the value multiple times...
The BB doesn't follow the logic of other track pieces yet so making an interchange takes a bit more planning. If anyone is interested in seeing the mechanics of it in more detail I can make a video about them.
How about a counter?
That way after it runs the code once it increases the counter before running the code again and therefore wont boost a second time. Then maybe the counter could decrease again after a certain amount of time. Or perhaps maybe make the booster itself wait a few seconds after boosting...
*Mid-Post epiphany
Here is what I mean
Or however you would have to word it so that the script has a wait time that is longer than it take the player to get over the piece. *looks behind him all paranoia-like to see if anyone is still following him*
-No I do not plan on setting him on fire
Elevator, in other words. I believe that that has been suggested, in numerous variations.
Thanks to a bit of variable confusion, by current booster brake doest just this :smile.gif:
Yea, the picture is bad, oh well
Download: http://www.mediafire.com/?t7anra5ka7e7bn1
Lol, I want that just to play around XDD
@mcmodder
I shall download as soon as possible. Are the booster for that one at 25% or 100?
edit: Thank you
It has, This was my favorite (near the bottom of the page): The Mineshaft Block
As an off topic side note: Does anyone happen to have the link to an inventory editor? I apparently didn't bookmark mine...
-No I do not plan on setting him on fire
Working as intended. Very nice work sir. Any chance we can see the detectors working soon?
Edit: Fraps is being annoying and not taking the video. I'll try later after sacrificing something to appease it or sommat.Double Edit: lol 69 (posts)
Triple Edit:
Question for anyone: What happens if a cart falls directly onto a full-stop or booster that's activated? (Like, from a ledge or something? (I'm still busy setting up the mod so I haven't tested it yet myself)
And when you have nothing to do but lurk on forums and play Minecraft making vids is quick lol.
Also, I found a couple weird glitches. This is a screen cap of a sheep that hitched a ride in my test cart, rode it off the ledge, and was suddenly suspended above the cart which was stopped by the powered full-stop. The sheep is still detected as being stuck in the cart btw. Straange.