https://github.com/tryexceptpass/sofi-unity3d
https://github.com/tryexceptpass/sofi-unity3d
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tryexceptpass/sofi-unity3d
- Owner: tryexceptpass
- Created: 2016-12-18T22:29:37.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-24T19:37:08.000Z (over 7 years ago)
- Last Synced: 2025-03-17T20:01:46.227Z (11 months ago)
- Language: Python
- Size: 8.79 KB
- Stars: 39
- Watchers: 8
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
`sofi-unity3d` explores how to control a Unity3D game environment through [sofi](https://www.github.com/tryexceptpass/sofi) by using [WebSocketSharp](https://github.com/sta/websocket-sharp) as a client inside the game world.
For more details on how it works, have a look at [Making 3D Interfaces for Python with Unity3D](https://medium.com/@tryexceptpass/user-interfaces-with-unity3d-and-python-eb2e7744518a)
## Requirements
* You'll need to install the Sofi package, available at the tryexceptpass/sofi repository.
* To run the game world:
* If you have Unity3D already and want to run from there, use the project in the `engine` directory.
* If you don't, you can download the built world from the links below:
* [MacOS](https://s3.amazonaws.com/tryexceptpass/sofi3d.app.zip)
* [Windows](https://s3.amazonaws.com/tryexceptpass/sofi3d.exe.zip)
* [Linux](https://s3.amazonaws.com/tryexceptpass/sofi3d.x86.zip)
* Update `server.py` with your twitter account credentials.
## Execution
1. Start the game world by running the executable you downloaded above or start it directly from Unity3D. This will wait for a websocket server at port 9000.
2. Run the python code: `python server.py`. This will start the slide deck I used at PyCaribbean and start a twitter listener for #python which will spawn objects as tweets come in.
## Disabling the slides
If you'd like to just watch the tweets roll in, disabling the slides is easy enough, just comment or remove any lines that call `displayslide()`. Please note that you could easily repurpose this function for other things along with the `onkeyboard()` callback.