In the server code, in response to a load, you can watch it in stdinhand.c load_command() in the save file which is a compressed version of what looks like a .ini structure file. Just a guess but from the dates this project was started, the developers who put this in probably had no xml option at the time. They apparently wanted a lightweight database that was high enough performance, and text based so that naive users could manipulate it.

Moving a Unit

Client instance

Set a breakpoint at do_move_unit in control.c, then do a move. Resulting stack most recent order looks like this:

  • do_move_unit
    • handle_unit_packet_common
      • handle_unit_info
        • client_handle_packet
          • client_packet_input
            • input_from_server
              • get_net_input

Crikies. They are doing a net IO for every tiny bit of a move transaction. Wow. Wow.

Server side

In unitHand.c, set a bp at handle_unit_move Call Stack:

  • handle_unit_move
    • server_handle_packet
      • server_packet_input
        • incoming_client_packets
          • server_sniff_all_input
            • srv_running

and top loop stuff.