Need sensors

  • Videogamer555
    11th Jan 2012 Member 0 Permalink
    You should realize I mentioned only the data types already used by TPT. It already uses 1-byte integer, 2-byte integer, and 4-byte integer, 4-byte single precision floating point, for various parts of TPT. Type is a byte data. Temperature is a 2 byte integer in the save file (and a floating point value internally). Color is a 4 byte integer.

    So yes TPT already uses all 4 data types mentioned.
  • devast8a
    11th Jan 2012 Former Staff 0 Permalink
    If this were to be implemented. I'd personally make the following changes.

    - using a separate layer with sensors being non-particle/non-wall objects one particle in size. (like signs)
    - each sensor is automatically numbered (the numbers being shown when the sensor tool is selected or if a "Always show sensor option is ticked")

    I'd do away with logging in binary format and instead log in plain-text following a csv like format.
    You should be able to open it up in a spreadsheet program with little effort.

    eg.
    TPTD/1.0
    0, 0, 0, Sensor Modified, 192, 482, 0, 1, Temperature, Pressure
    16, 1, 0, 100, 193
    32, 2, 0, 100.2, 392

    == The first three numbers are
    time in ms since sim creation
    frames since sim creation
    sensor number

    With a list of values for the items being measured (eg. 163, 592)
    OR the following, for sensor modified/created events

    literal. "Sensor Modified"
    X coordinate of sensor
    Y coordinate of sensor
    Measurement period in ms
    Measurement period in frames
    - For measurement periods, 0 = not used, one of them must be non-zero
    List of items to be measured (eg. Temperature, Pressure)
  • mniip
    11th Jan 2012 Developer 0 Permalink
    @devast8a (View Post)
    literals?
    what about XML then?
    [sarcasm]
  • devast8a
    11th Jan 2012 Former Staff 0 Permalink
    @mniip (View Post)
    literal ie. the text as it appears.