Search found 12 matches

by icedevml
Sat Nov 05, 2016 10:07 am
Forum: Not a bug
Topic: [0.14.19] Glitchy LuaEntity.get_connected_rail method
Replies: 7
Views: 2721

Re: [0.14.19] Glitchy LuaEntity.get_connected_rail method

Okay, I realized that in case of curved rail we have to go to the left or to the right. So the new inspect_path including that: function inspect_path() local train = game.player.vehicle.train local fr = train.front_rail local dir = train.rail_direction_from_front_rail local n = 0 while n < 10 do loc...
by icedevml
Sat Nov 05, 2016 9:52 am
Forum: Not a bug
Topic: [0.14.19] Glitchy LuaEntity.get_connected_rail method
Replies: 7
Views: 2721

Re: [0.14.19] Glitchy LuaEntity.get_connected_rail method

I think perhaps that is caused by the diagonal rails alternating direction, so you'll need to write your code to account for that (annoying) http://osldgoth.db48x.net/piwigo/i.php?/upload/2016/11/04/20161104204534-78745735-la.png I also realized that, regardless of how intuitive it is. Let's add a ...
by icedevml
Fri Nov 04, 2016 11:11 pm
Forum: Not a bug
Topic: [0.14.19] Glitchy LuaEntity.get_connected_rail method
Replies: 7
Views: 2721

Re: Glitchy LuaEntity.get_connected_rail method

Steps to reproduce: 1. build some simple rail path without junctions 2. build a diesel locomotive and enter it 3. run the following lua function: function inspect_path() local train = game.player.vehicle.train local fr = train.front_rail local dir = train.rail_direction_from_front_rail local n = 0 w...
by icedevml
Fri Nov 04, 2016 10:55 pm
Forum: Not a bug
Topic: [0.14.19] Glitchy LuaEntity.get_connected_rail method
Replies: 7
Views: 2721

[0.14.19] Glitchy LuaEntity.get_connected_rail method

Hello, I want to use LuaEntity.get_connected_rail together with LuaTrain.front_rail and LuaTrain.rail_direction_from_front_rail. So in my mod I implemented the following algorithm (pseudocode): local front_rail = some_train.front_rail local dir = some_train.rail_direction_from_front_rail local n = 0...
by icedevml
Wed Jul 20, 2016 12:29 pm
Forum: News
Topic: Friday Facts #147 - Multiplayer rewrite
Replies: 68
Views: 36347

Re: Friday Facts #147 - Multiplayer rewrite

The point is, as long as one doesn't have to resend it, UDP is fine. As soon as one has to transfer a state, TCP is the protocol since _The Internet_ is aware of it. I read that when a TCP packet is lost at an intermediate node (like somewhere in between my ISP and the server's ISP) my ISP (or his ...
by icedevml
Mon Jul 18, 2016 3:46 pm
Forum: News
Topic: Friday Facts #147 - Multiplayer rewrite
Replies: 68
Views: 36347

Re: Friday Facts #147 - Multiplayer rewrite

As I understand it TCP is bad for factorio *because* of re-transmissions. In case of packet loss the server could be like: "Well bad luck for you, no player action in this tick. Send me this again and i can get you in some later tick". So the affected user might be a little unhappy, but e...
by icedevml
Mon Jul 18, 2016 1:23 pm
Forum: News
Topic: Friday Facts #147 - Multiplayer rewrite
Replies: 68
Views: 36347

Re: Friday Facts #147 - Multiplayer rewrite

Server send to client1 : network_id:10[game_event_merged] Client 1 : never receive on the game tick / client will simply proceed without anydata from server and send is game_event to the server with the last network_id received 9. server send to client 1 : network_id:10[game_event_merged]:network_i...
by icedevml
Mon Jul 18, 2016 11:03 am
Forum: News
Topic: Friday Facts #147 - Multiplayer rewrite
Replies: 68
Views: 36347

Re: Friday Facts #147 - Multiplayer rewrite

TCP hold hostage data when detect packet lost or packet arriving before it's timeline resulting a delay before the software are aware of data. Also to speed up TCP some will tempted to turn off Naggle but the benefit is marginal as you'll need to create your own buffer system for data as the ratio ...
by icedevml
Sun Jul 17, 2016 11:12 am
Forum: News
Topic: Friday Facts #147 - Multiplayer rewrite
Replies: 68
Views: 36347

Re: Friday Facts #147 - Multiplayer rewrite

By the way, guys. If you realized all the stuff about multiplayer and that P2P is kinda utopic idea, can't you just use TCP right now? The only guy to open ports will be server, which is obvious. I can't really get why you try so hard to reinvent the wheel by implementing TCP over UDP. Such attempts...
by icedevml
Fri Jul 15, 2016 2:10 pm
Forum: Modding interface requests
Topic: Train acceleration/deceleration formulas
Replies: 0
Views: 891

Train acceleration/deceleration formulas

Hello! I have a mod which is playing with train speeds and it would be useful for me to know exactly how to calculate train acceleration or deceleration in next tick, given a LuaTrain object. Could someone (devs?) provide formulas for that? It would be also good to have some API for calculating that...
by icedevml
Fri Jul 15, 2016 1:35 pm
Forum: Ideas and Suggestions
Topic: Rail yard speed limits
Replies: 37
Views: 15391

Re: Rail yard speed limits

This is already possible using lamps and circuit network, AFAIK without mods. IMHO in some cases it's more handy to have speed limits, for instance on cargo stations where players are needed from time to time in order to so some maintenance tasks. A train going with 200 km/h needs quite long block i...
by icedevml
Fri Jul 15, 2016 12:07 pm
Forum: Ideas and Suggestions
Topic: Rail yard speed limits
Replies: 37
Views: 15391

Re: Rail yard speed limits

Solution: Create a way to set a train speed limit for certain sections of track. It would probably be tied to the signals system so that it can be implemented on a per-block basis. Just add a pop-up when you click on a signal and give it a some radio buttons for various speeds. This gives the playe...

Go to advanced search