Fleet Movement Overhaul

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
o01eg
Programmer
Posts: 1998
Joined: Sat Dec 10, 2011 5:46 am

Fleet Movement Overhaul

#1 Post by o01eg »

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:
  1. Apply orders to each fleet's route independently.
  2. For each fleet in the star system check if it cannot move and mark it as stationary of other fleets routes.
  3. For each non-stationary fleet cut route if next turn will be blockaded independently of other non-stationary fleet.
  4. 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

Re: Fleet Movement Overhaul

#2 Post by Ophiuchus »

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!

Post Reply