Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Digital Logic Sim

​A minimalistic digital logic simulator · By Sebastian Lague

How to import projects from v1?

A topic by NeoX2025Gaming created 61 days ago Views: 122 Replies: 3
Viewing posts 1 to 4

I created like a whole giant project in v1 of this simulator. How do I convert it to be compatible with v2?

To my understanding, you can't. There were significant changes to how things work, which is why he bumped the Major-version number.

Here is a chip file from V1:

{
  "Name": "NAND",
  "Colour": "#655291",
  "InputPins": [
    {
      "Name": "Pin",
      "ID": 1320137264,
      "PositionY": 1.94174767,
      "ColourThemeName": "Red"
    }
  ],
  "OutputPins": [
    {
      "Name": "Pin",
      "ID": 482374715,
      "PositionY": 1.06796145,
      "ColourThemeName": "Red"
    }
  ],
  "SubChips": [
    {
      "Name": "AND",
      "ID": 1318026148,
      "Points": [
        {
          "X": -3.89040542,
          "Y": 0.825243
        }
      ],
      "Data": null
    }
      ],
      "Data": null
    }
  ],
  "Connections": [
    {
      "Source": {
        "PinType": 4,
        "SubChipID": 1318026148,
        "PinID": 2
      },
      "Target": {
        "PinType": 3,
        "SubChipID": 670444639,
        "PinID": 0
      },
      "WirePoints": [
        {
          "X": -3.34040546,
          "Y": 0.825243
        },
        {
          "X": -3.24335265,
          "Y": 0.825243
        },
        {
          "X": 0.0404410921,
          "Y": 0.825243
        },
        {
          "X": 0.008082807,
          "Y": 1.06796145
        }
      ],
      "ColourThemeName": "Red"
    }
      ],
      "ColourThemeName": "Red"
    }
      ],
      "ColourThemeName": "Red"
    }
  ]
}

And here is one from V2:

{
  "Name": "AND",
  "NameLocation": 0,
  "ChipType": 0,
  "Size": {
    "x": 0.7,
    "y": 0.5
  },
  "Colour": {
    "r": 0.149019614,
    "g": 0.4784314,
    "b": 0.698039234,
    "a": 1
  },
  "InputPins":[
    {
      "Name":"A",
      "ID":86929491,
      "Position":{
        "x":-2.125,
        "y":0.4375
      },
      "BitCount":1,
      "Colour":0,
      "ValueDisplayMode":0
    }
  ],
  "OutputPins":[
    {
      "Name":"OUT",
      "ID":22298655,
      "Position":{
        "x":2.5,
        "y":0.1875
      },
      "BitCount":1,
      "Colour":0,
      "ValueDisplayMode":0
    }
  ],
  "SubChips":[
    {
      "Name":"NAND",
      "ID":1250621584,
      "Label":"",
      "Position":{
        "x":-0.5,
        "y":0.1875
      },
      "OutputPinColourInfo":[{"PinColour":0,"PinID":2}],
      "InternalData":null
    }
  ],
  "Wires":[
    {
      "SourcePinAddress":{
        "PinID":0,
        "PinOwnerID":86929491
      },
      "TargetPinAddress":{
        "PinID":0,
        "PinOwnerID":1250621584
      },
      "ConnectionType":0,
      "ConnectedWireIndex":-1,
      "ConnectedWireSegmentIndex":-1,
      "Points":[{"x":0.0,"y":0.0},{"x":-1.1875,"y":0.4375},{"x":-1.1875,"y":0.3125},{"x":0.0,"y":0.0}]
    }
  ],
  "Displays":[]
}

Thanks for the info! Just wanted to check if you could convert it somehow.