Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.
Moderator: Committer
o01eg
Programmer
Posts: 1998 Joined: Sat Dec 10, 2011 5:46 am
#1
Post
by o01eg » Wed Jan 01, 2020 3:34 pm
While trying to work on issue
https://github.com/freeorion/freeorion/issues/2675 I found out current movement implementation is sensitive to order of fleets:
https://github.com/freeorion/freeorion/pull/2220
I got an idea about order-independent fleet movement:
Apply orders to each fleet's route independently.
For each fleet in the star system check if it cannot move and mark it as stationary of other fleets routes.
For each non-stationary fleet cut route if next turn will be blockaded independently of other non-stationary fleet.
Move each non-stationary fleet according route independently.
I suppose such decomposition will simplify fleet movement code as well as solve
https://github.com/freeorion/freeorion/issues/2675
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to
the slow multiplayer game at
freeorion-lt.dedyn.io .Version
2024-01-30.0dd6806 .
Donations're welcome:
BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ophiuchus
Programmer
Posts: 3427 Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV
#2
Post
by Ophiuchus » Mon Jan 06, 2020 5:37 pm
One issue which introduces order of orders is if considering a fleet with orders to move away to be non-blocking.
Not sure how this currently handled
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!