Railcraft

Railcraft

34M Downloads

2x2 Curves.

Cream-Tea opened this issue · 21 comments

commented

Not sure if this has been requested yet, but I was thinking we could add larger curved.

Now as for "making curves" that would be covered by having a two tracks without placing the last track in the corner, and you would select both tracks with the crowbar and similar to the linking system it would "link the tracks". This would use less track, as you would not need one in each corner and would allow for smoother turning of carts since I know sometimes the carts get stuck when in trains going around tight bends.

commented

It's been requested in #483

commented

Alright I'll close this then, seems like a larger task than I would have thought.

commented

Traincraft is doing some interesting things with curves: AlexIIL/TrainCraft-Ideas#2

commented

Yes, hence I suggested since if traincraft is doing it, should we?

commented

In theory it sounds like the Traincraft stuff will be compatible, I see little reason to duplicate effort.

commented

That would probably require double ticking the carts or something. The main reason they explode is because the alternative is derailment due to technical limitations in the engine.

commented

since liach added this as a question.. it would be nice to allos for high speed tracks to turn without going into fire :) with the new track system.. i think it will be a bit efficient if we allow for the spike maul to hit a corner track and turn it into a 2x2 track once tere is enough room. though i am not sure if @Cream-Tea is still around...

commented

Let me set this straight: my version of Traincraft (which is NOT the official one) isn't going to be continued (I really don't want to maintain a mod the size of TrainCraft alongside BuildCraft). However I don't want curved tracks to die (they are the only things that I really wanted to do) so I suggest re-opening this.

I think you might find my curved track code useful, and with a new forge event existing minecart compat can be done with a bit more effort. However I don't really want to sink more time into it if you don't want it in railcraft.

commented

Were talking about this on IRC, a couple days ago. Cream-tea is investigating the possibility of making this happen, with my full support. It may be a stand alone mod though, we are still considering technical limits.

commented

im gald my old request for Just this
becoming a thing now
thanks AlexIIL & CovertJaguar
anyway im slowly making train&wagon models MC styled
so if anyone wanna help (code part) we can make a Train addon for railcraft (not traincraft)
code part i am thinking if somehow copy/paste the coding from the locomotions
and just let the copied locomotions using my Models/textures (knows nothing to coding so not sure if this is simple or hard to do ) + add afew extra things like animated wheels,steam effects & etc.
to go with Bigger curves/switch & slopes that AlexIIL made

also will these curved rails be in 1.8.9/1.9 or in 1.7.10 ( i know AlexIIL made it for 1.8.9)
i kinda hope for both but i can see from the dev. view point it is alot harder to do
but from the gameplay/player viewer point 1.7.10 basically has everything that a automated train system could ever wanted even more if those curved rails/bigger slopes become a thing + with a train mod instead of minecarts/loco for minecart only while 1.8.9/1.9 has some stuff but so much is missing and yet to be comfirmed if a port to 1.8.9/1.9 or a replacement mod for that mod like: No enderstorage´s EnderChest(only tanks) for 1.8.9/1.9 yet and chickenbone´s mods is normaly some of the first mods ported

commented

It depends, you see LexManos wants modders to update to 1.8/1.9 so I doubt he'll add the event for 1.7.10.

commented

I'm not even actively developing Railcraft for 1.7.10 anyway. RC 9.x is in feature freeze/bugfix only mode.

commented

In case you don't know, you can talk with @ZnDevelopment for a collaboration. Zora no Densha has resolved the minecart compat problem, in my opinion. You can see AlexIIL/LargeCurvedRails#14 for more information. I hope you find this useful.

commented

I'm currently working on several forge events which will allow us to integrate curved rails seamlessly with vanilla tracks, without a core mod (which Zora no Densha uses). Hopefully we can both use said events (and traincraft if it ever catches up).

I'm also hoping to make rail connections work as well- so that vanilla rails will accept our curved rails as valid connections.

Also the way that signals work will probably need to be looked at for diagonal and curved tracks as it's completely different :)

commented

Yes, I have a design for a new type of signal that doesn't rely on area entity detection that should work with any shape of track.

commented

Looks like I missed the RC alpha. Woops.

On a more serious note, how would you prefer I implement the individual tracks + what variants should there be? Currently there is a block used per type of track (so 19 blocks in total) and this only adds the default (iron + wood) tracks. I'm assuming you want them converted so that all of them are a single block, with a single generic type of tile entity to match.

The main question is whether you would prefer to have a separate block type for the "pointer" track (which is an internal block that points to the real tile entity containing the track info) or a tile entity for it (which can point directly to it rather than jumping across multiple pointer tracks). I'm planning on making full sized switches though, which require a lot of additional logic for placement and the block pointer might just add to its complexity. (However, again, I won't be coding them now as they are really quire complicated in terms of both movement and choosing a direction to go).

I'll leave model generation alone for now though (its a lot of extra code to validate, so at the very least I won't try to make a 3d + 2d model generator now.)

This does assume you still want curved tracks however :)

commented

@AlexIIL Heh, poke me on IRC some time if you want a build or anything (or you could build it yourself easily enough).

As for the details, yeah as single block for the 2x2 corners is probably best. There should be four variants, Strap-Iron, Iron, Reinforced, Electric, and HighSpeed (maybe....not sure about the HS logic). It's probably trivial to put all four variants on the same block as well if you are already using a Tile Entity. Or it might be possible to not use a Tile Entity at all and just use Block States, if possible that would be prefered.
Four rotations, four positions, and five variants? But if you need Tile Entity that's ok as well.

I'm currently in the process of changing things around with the how tracks are defined. The base variants of the flex tracks get their own block: Strap-Iron, Reinforced, Electric, HS. These tracks have no Tile Entities and are the tracks that make up 90% of all railways. They are essentially equivalent to BlockRail that Minecraft uses for Iron Tracks. Everything else will be implemented on BlockTrackComplex or some such which will be similar to tracks were defined in 1.7. It will have a Tile Entity and will have two variant modifiers: Base + Kit. Base will be Strap-Iron, Iron, Reinforced, Electric, or HighSpeed. And the Kit will be things like Boosters, Dumping Mechanism, Whistle Bars, etc... This will allow me to create say Reinforced Locking Tracks or High Speed Whistle Tracks.

Your 2x2 curves could be similar to BlockTrackComplex but with just the Base variant variable.

commented

@Joshwoo70 It's been a while but now I might be coming back on track (pun intended).

Now as for news it's not really news, but I don't think I mentioned that I did have a little look over a year ago at the possibility. That was on 1.7.10, there was an event added to forge that would have made it possible but pull requests stopped being accepted on 1.7.10 and Railcraft hadn't updated fully at the time so we would have had to have waited anyway.

In fact I can't remember what the exact event name was but it was to do with the minecarts, you could override their directional behavior or something.

As for 2x2 curves, assuming it will only be 2x2 for now, I mean atleast 2x2 looks 100x nicer than the tight 90 degree curves we have at the moment. I think we could do it with a multiblock, the incentive would be that instead of using extra track in the 2 spaces, you would have 2 tracks on the parts in which you want it to curve around, and the other 2 spaces you could place a type of block. This is where the event from forge comes in, previously it was possible to create a 2x2 curve in terms of textures, it just wouldn't have affected the minecart physics itself, now it should be possible to manipulate them so that it can go around a bigger shaped curve.

I think it will require an understanding of trigonometry and each end of the curve will have to indicate that it is the start or finish of the curve. so that it can connect to straight pieces.

Finally if @CovertJaguar thinks he can make a block signal system that isn't reliant on being on the same x or z axis then that will help too, it's already a pain to make corners with the current block signal system, imagine having to make systems just for a 2x2 curve.

Sorry for the long talk but hopefully this gives you an idea.

commented

Any news?

commented

None from me sorry, I've been pretty busy with BuildCraft.

commented

I am sorry, but I'd say this feature is costly and undesireable. I suggest using more diagonal tracks on curves (3 instead of 1) instead. Vanilla minecarts don't know how they will locate themselves on tracks like these.