decorator-factory / photons-game

A sandbox game made using Tkinter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

photons-game

The game

This is a sandbox game I wrote 3.5 years ago using Python and Tkinter, when I was only starting to program. The game lets you build an optical circuit. You can make a Turing complete system out of simple building blocks such as laser beams and mirrors. For examples, take a look at screenshots/.

The code is not very well-written, pretty convoluted, and amazingly CPU-hungry. I'm releasing this for posterity to see if I improved over the years : - )

P.S. This README is modern, I didn't bother writing documentation back then!

How to run the simulator

  1. Make sure you have Python 3 installed (any modern version will do)
  2. Clone the repo
  3. Navigate into the repo folder
  4. Run python3 phoSim.py
  5. You should see a file selection window. Pick the logic_demo_gates.pickle file.
  6. Use the arrow keys to navigate around the field. Navigate to the bottom to see a full adder circuit

How to run the editor

  1. Run python3 phoEdit.py
  2. You will see a window prompting you to select a board size. Just click "Create"
  3. Press Left mouse button to place a block
  4. Press Right mouse button to place a block
  5. Press R to rotate a block under the cursor
  6. Select Libraries -> Change block type to change the block type
  7. Try recreating some of the logic gates
  8. Select File -> Save to save the level to a file
  9. Close the editor. Now you can open the level in the simulator

About

A sandbox game made using Tkinter

License:MIT License


Languages

Language:Python 100.0%