Implementation Rails

Skaldarnar

Badges badges badges badges mushroom mushroom!
Contributor
Art
World
SpecOps
#22
I just saw the tweet this morning - nice work! Now make all the stuff moving! :)
 

Michael

Moderator
Contributor
Architecture
#23
tada, implemented an impulse constraint solver :D.

here are my resources if you want to look at it to:
http://myselph.de/gamePhysics/equalityConstraints.html
http://www.dyn4j.org/2010/09/distance-constraint/
http://allenchou.net/2013/12/game-physics-constraints-sequential-impulse/
https://github.com/wnbittle/dyn4j/b...yn4j/dynamics/contact/SequentialImpulses.java
http://www.cs.ucsb.edu/~cse/Files/Stabilization071993.pdf


In terms of what I plan going forward with this. I'm going to remove large rails and reduce it down to just carts. I'm just going to work on refining and improving carts. So at the moment I'm looking into implementing some form of constraint model. It's fairly basic at the moment but it shows a proof of concept. The mod still is fairly buggy with my changes so those problems need to be addressed before I release this.

Bugs
  • If a cart is moving too fast it can skip a rail segment and cause an out of bounds exception
  • It's possible for a cart to set the location to NAN
  • rail placement is annoying
  • switches don't work at all with the wrench
 
Last edited:

Michael

Moderator
Contributor
Architecture
#27
At the moment I want to get the module to have feature parity with the old one. I think it would be a good idea to create a feature list. I've been debating what feature to work into this module and what would be better fit into a different module. Some of the more base things such as cart joining would need to be re-implemented along with all the bugs that still exist with the constraint solver I wrote. The cart motion is a still pretty unstable but that is going to have to be a work in progress.
 

Cervator

Project Lead and Community Wizard
Contributor
Design
Logistics
SpecOps
#30
Hey @Adeon ! Great to see you again. Hope all is well :)

@Nihal Singh has integration with Rails as a bonus item for one of our GSOC projects. @Michael and @SkySom have been tweaking at it occasionally. Maybe by summer's end we could have a really cool system working!

GitHub has introduced "projects" which allow for a new way to note down ideas before they become full issues. Might be an idea to start one for Rails + related (since it may end up involving multiple modules). Here's Nihal's for example: https://github.com/orgs/Terasology/projects/1
 

Adeon

terasology.ru
Contributor
Architecture
GUI
Logistics
#31

Michael

Moderator
Contributor
Architecture
#32
Have you had a chance to try out the changes I made to master? You can start from there and I can probably start working on a features list later today. As a base mod what do you think should be added in terms of carts. I don't want to add too much and would rather like to focus on helping people extend onto carts for different mods. @Adeon have you joined the slack channel?

https://github.com/orgs/Terasology/projects/6
 
Last edited:

Adeon

terasology.ru
Contributor
Architecture
GUI
Logistics
#33
@Michael Can you tell me name of the channel?
About base mo: I planned to add customization for the minecarts. For example: you can make minecart with wood bucket and you can replace it on iron bucket in future. Or you can create booster with the coal engine and replace it on gas engine :)
 

Cervator

Project Lead and Community Wizard
Contributor
Design
Logistics
SpecOps
#35
Invite sent :) Or re-sent, really, ancient pending one :D

@Adeon let me know if you don't see the resent invite, sent to your gmail
 

Michael

Moderator
Contributor
Architecture
#36
I've been trying to force myself to try work on this some more. So I've implemented a portion of the solver to handle the player and cart interactions. The old implementation seemed to be heavily dependent on frame rate. Generally a higher framerate would allow the player to push the cart faster because the contact events we're triggered more. The click bug seems to be back again; so I'll probably try to hunt that down again. There is still that annoying bug where the rail will appear one way but the track segment is different. I have no way of reproducing this consistently, so I really have no idea how it occurs.


 
Last edited:

Michael

Moderator
Contributor
Architecture
#39
I have that segment bezier module that could be used to make larger tracks. At the moment I'm just focusing on this single block module. you should be able to climb in these with the E button. I've been slightly reworking how the solver works and I've been pretty happy with the results thus far. I also recently added network support for this module. The old module had some code for larger tracks, but I've rescoped this down and focused on the single block carts.