Metadata-Version: 2.4
Name: starcel
Version: 0.2.0a3
Summary: Starcel: a Python-controlled 3D spreadsheet on Unreal Engine 4.27. Launcher + installer that downloads the latest build from GitHub into Documents\Starcel.
Project-URL: Homepage, https://github.com/recursionis/starcel
Project-URL: Source, https://github.com/recursionis/starcel
Project-URL: Releases, https://github.com/recursionis/starcel/releases
Project-URL: Donate-Patreon, https://www.patreon.com/RecursionIs
Project-URL: Donate-PayPal, https://www.paypal.com/paypalme/RecursionIs
Author: Nicholas Maleki
License-File: LICENSE
Keywords: 3d,installer,launcher,spreadsheet,starcel,ue4,unreal-engine,visualization
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Win32 (MS Windows)
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Operating System :: Microsoft :: Windows :: Windows 11
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: <3.10,>=3.9
Requires-Dist: comtypes; sys_platform == 'win32'
Requires-Dist: dill
Requires-Dist: fast-autocomplete[levenshtein]
Requires-Dist: gputil
Requires-Dist: imageio
Requires-Dist: kingdon
Requires-Dist: matplotlib
Requires-Dist: mpmath
Requires-Dist: numba
Requires-Dist: numpy
Requires-Dist: opencv-python
Requires-Dist: psutil
Requires-Dist: py-cpuinfo
Requires-Dist: pymupdf
Requires-Dist: pynput
Requires-Dist: pystubgen
Requires-Dist: pywin32>=306; sys_platform == 'win32'
Requires-Dist: requests>=2.31
Requires-Dist: scikit-image
Requires-Dist: scikit-learn
Requires-Dist: sympy
Requires-Dist: tqdm>=4.66
Requires-Dist: wmi; sys_platform == 'win32'
Provides-Extra: alpha
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: pyinstaller; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Description-Content-Type: text/markdown

# Starcel <sub><img src="https://raw.githubusercontent.com/recursionis/starcel/master/Images/branding/icon-padded.png" alt="logo"></sub>
Hi! I'm Nick, the developer of Starcel


## What is it? 
A Python controlled 3D spreadsheet. A full Unreal Engine 4 instance with Chaos physics. Support for Client and Server. It can be used as a visualization or education tool.

Currently, Starcel is an Unreal Engine 4.27Chaos Client and Server which can be controlled with Python 3.9. There is 3D spreadsheet functionality, a Python calculation engine, everything Unreal engine offers, and there are many more features planned. It is very powerful. 

This project is intended for content creators, hobbyists, developers, spreadsheet users, physicists, engineers, scientists, gamers, unreal engine prototypes, and more. 


## Please [donate](https://www.patreon.com/RecursionIs) to keep this project running!
You can donate on [Paypal](https://www.paypal.com/paypalme/RecursionIs) or [Patreon](https://www.patreon.com/RecursionIs)


## Quickstart
The current release includes the client, the server, and the no-editor for Windows. Each compiled source is ~1GB. 
The full Unreal Engine Starcel source project folder is quite a large download, >50GB. The project files on github are ~1GB, check the .gitignore to see what is missing. 

You need to use Visual Studio 2019 for compiling ([download community edition](https://aka.ms/vs/16/release/vs_community.exe)). I recommend [PyCharm Community](https://www.jetbrains.com/pycharm/download/?section=windows) for editing until IDE support is added.

Compiled versions of Python 3.9 can be downloaded from here https://www.python.org/downloads/release/python-3913/, newer versions of specifically Python 3.9 should work, but need to be compiled from Python source. The unreal_engine package is not installed to Python permanently, but it is installed at runtime, so it does not need to be pip-installed. The `Content/Scripts/unreal_engine` folder includes all necessary stubs and empty classes for intellisense. 

You can manually install the necessary packages directly using `python.exe -m pip install -r requirements.txt`.

The default Unreal Engine map contains a PyActor which loads main.py and the class Main when the map starts up. Both the server and the client will run this file separately. The line ``if KismetSystemLibrary.IsDedicatedServer():`` lets you define client and server specific code. You can create more PyActors or even use Python from the UE console by clicking ` and typing "py.". 

Use `spawn_pyactor` to create an object that runs a Python class. 

Create a Text object by double clicking Enter. Once created, you can use =py() to run any Python command. 

The state of the world is not saved in main.py or elsewhere, you will need to make changes there directly or copy your changes from the world elsewhere to save. This will be changed in the future.

Add the following to "C:\Program Files\Epic Games\UE_4.27\Engine\Config\BaseEngine.ini"
```
[PlatformPaths]
UnrealBuildTool=Engine/Binaries/DotNET/UnrealBuildTool.exe
```

You may need to set the UE_PYTHON_DIR, PYTHONPATH, and PYTHONHOME environment variables to the location of your python installation, `C:\Users\nicho\AppData\Local\Programs\Python\Python39\` or `C:\Program Files\Python39` for example.

You may need to move Python3.dll and python39.dll into C:\Program Files\Epic Games\UE_4.27\Engine\Binaries\ThirdParty\Python3

Replace C:\UE_4.27Chaos_Source\Engine\Binaries\ThirdParty\Python3 with a copy of your Python3.9 instance. 

## Startup map and mod paks
You can set which map opens first and which mod `.pak` files load in the ini files. You don't need any command-line arguments.

**Startup map:** `Config/DefaultEngine.ini`
```ini
[/Script/EngineSettings.GameMapsSettings]
GameDefaultMap=/Game/Maps/StaringAtSkyMap.StaringAtSkyMap
EditorStartupMap=/Game/Maps/StaringAtSkyMap.StaringAtSkyMap
```
You can also change these in the editor under Project Settings → Maps & Modes.

**Mod paks:** `Config/DefaultGame.ini`
```ini
[/Script/Starcel9.StarcelPakLoader]
; mount every .pak in this folder
+ModPakDirs=Mods
; or list paks one by one
+ModPaks=Mods/StarcelMapTest1-WindowsNoEditor.pak
; optional, overrides GameDefaultMap
StartupMap=SunTemple
```
Keep comments on their own lines. UE doesn't strip a `;` comment that comes after a value.
- Relative paths are relative to the project folder. In a packaged build, that's `WindowsNoEditor/Starcel9/`, so the default mods folder is `WindowsNoEditor/Starcel9/Mods/`.
- A pak can be a full packaged build of another UE 4.27 project, such as `MyMap-WindowsNoEditor.pak`. Its `/Game/...` assets become loadable without overriding Starcel's own files.
- `StartupMap` takes a short name (`SunTemple`) that is looked up in the mounted paks, or a full path (`/Game/Maps/SunTemple`).
- To change these settings in a packaged build without repackaging, put the same section in `WindowsNoEditor/Starcel9/Saved/Config/WindowsNoEditor/Game.ini`.
- Mod paks only load in packaged builds. The editor can't load cooked content.

The command line still works and takes priority: `Starcel9.exe SunTemple -ModPak="C:/path/to/MyMap-WindowsNoEditor.pak"` (see `test-pakmap.bat`). A map named on the command line is used instead of `StartupMap`. Paks from `-ModPak` are mounted in addition to the ones in the ini.

While the game is running, open the console (\`) and run `Starcel.LoadPakMap "C:/path/to/File.pak" [MapName]`. Blueprints can call `Mount Map Pak` / `Mount Pak And Open Map`.

Don't put mod paks in `Content/Paks`. The engine's automatic pak mounting expects paks built from this project, and it would stop the loose (non-pak) game files from loading.


## Questions, Issues, and Support
Most everything you will need is covered in this readme. 

Python support can be found at r/LearnPython, YouTube, other forums, and chats.

Unreal Engine support can be found on YouTube, their Discord, and their forum. 

UnrealEnginePython examples, Starcel examples, and the unreal_engine folder (Content/Scripts/unreal_engine, which has the class and function info) should cover just about everything you can do with the plugin. If you are certain there is an issue with the https://github.com/20tab/UnrealEnginePython plugin you can post on the issues tab on GitHub, but you *must* be certain. I will check this every so often. 

Advanced logging is available. 

The UE4.27 port of the plugin can be found at https://github.com/HaiyiMei/UnrealEnginePython. I made changes to this source to upgrade it to Python 3.9 and to make it work for my use case. 

Issues with the Starcel code and new features can be posted on GitHub. 

I will merge new features and fixes. Feel free to contribute. 

Anything else can be asked in our Discord. We are a community of volunteers so we may not have answers and may not get back to you, but we will try our best. 


## Are public Starcel servers safe? 
Local use is as safe as local Python. Utilize a whitelist system to stay safe when using servers. 


## How do I use a server? 
You can connect to a server by running the client_travel()/connect() Python function, by changing the _StartClient.bat file, or by opening the console with \` and typing `open <IP>`. 

If you want to run a local server, LAN, the server console should list a port, local IP, and public IP, or you can use ipconfig. You can share this IP and port with other users on your network. You can port forward this local port in your router to have it available online. You can share your public IP and port with whoever and they will be able to connect. Be very careful sharing your IP and use the whitelist system. Treat this project as downloading and running unsigned code from the internet or giving someone remote desktop access. 

Python functions can run on the client and server, this is clear from the Python code and can be easily changed. This opens up great possibilities of collaboration using tools like PyCharm's "Code With Me" or by sharing your folders in Windows Explorer's built in OneDrive implementations. 

Unreal's replication system can be confusing. Clients cannot directly invoke functions on other clients, they must first invoke a call to the server and then the server can run a Multicast RPC. For a replicated actor to exist across all clients in Unreal Engine, it must be spawned on the server.

I recommend starting a fresh UE C++ project and getting familiar with Blueprints and maybe also C++ to get a feel for how to use Unreal and its editor. 

If you want to manually build the dedicated server source, you cannot use UE4.27Chaos from the launcher, you must download the Engine directly from [EpicGame's github branch](https://github.com/EpicGames/UnrealEngine/tree/4.27-chaos), which requires signing up for their developer program. My UE Source folder is ~150GB, whereas the download from the Epic Games Launcher is ~45GB. I needed to add the following lines to my "C:\Program Files\Epic Games\UE_4.27Chaos_Source\Engine\Config\BaseEngine.ini" among a few other fixes for compiling this project. 
```
[PlatformPaths]
UnrealBuildTool=Engine/Binaries/DotNET/UnrealBuildTool.exe
```
You can cook and package your project from the UE4Editor File tab.


## Linux and Mac? 
Starcel is currently Windows only. It can be compiled on other operating systems, however, this is currently untested. To start, UE, Python, and the UnrealEnginePython plugin are supported in Linux and MacOS. If the project receives support and requests I will port it myself. Feel free to submit a pull request if you upgrade it yourself. 70% of users are on Windows, 13% on Mac, 4% on Linux. 


## Is the program stable? 
Not currently, eventually there will be a stable update. 


## AR/VR integration? 
I am working on integration for AR glasses. Glove-based hand-tracking is in development. If you plan on setting the rotation of the player to a quaternion that comes from a AR/VR device, make sure your quaternion apis match and your coordinate systems match(UE uses left-handed Z-up). 


## Can I make a 2D UI? 
It is not recommended to control any elements in Starcel with a 2D UI. You can build a UI out of 3D elements in the 3D space and make it always display flat on the included screen which I have added as a component to each Pawn's camera. In theory, anything you make in 2D, including websites, you can make exactly the same in 3D. Despite that, UnrealEnginePython has built in support for QT in Engine using Slate, which renders directly on top of the existing Starcel viewport. If you need, you could use Tkinter, QT, etc. to make a 2D UI outside the game window.


## UE5 and Python upgrade? 
You can use the included interop.py(untested) to help run newer Python versions with this version, but it will be slow and you will have to add workarounds for using functions like begin_play and tick. You will need to have both versions of Python installed. The latest edition of Starcel is written in Python 3.9 and Unreal Engine 4.27Chaos. This likely will not change for a while as Python's C++ bindings have been deprecated and changed in Python 3.10. This could take a month or few to upgrade. An [Unreal Engine 5 upgrade of the UnrealEnginePython plugin](https://github.com/20tab/UnrealEnginePython/pull/880) will require header, module, and api changes. This could take a month to upgrade. If you plan on working on this, you can message me for some info that could help you begin. 


## What happened to the last Starcel and its features? 
It was too buggy and I didn't want new users to be disappointed, so I removed the download link.


## WIP
- Tables Python spreadsheets
- Hotkey editor
- File explorer, icons, and desktop environment
- Transparent Windows and Live Wallpaper
- CLI
- Multidimensional plotting and graphing
- Advanced function and question search with live search and history
- Multiplayer
- UDCAP VR Glove and AR Glasses Integration


## What this program isn't
This is not a 2D User Interface. This is not a 3D Sculputing program, this is not a CAD Kernel, this is not a video editor interface.


## Why Unreal? 
Unreal is great! It is industry-leading for developing games and in cinema. The Python bindings make this a fully featured rendering engine with quick scripting potential. The rendering system is unmatched, beautiful, and the engine itself is fast. I tested Unity, Panda3D, UPBGE and NVIDIA Omniverse, and many other programs, and they didn't have the features I was looking for.


## Where did you get the idea? 
I wanted to build a system for multidimensional tables and multidimensional plotting of functions and data. For example, plotting multidimensional weights in LLMs (https://youtu.be/wjZofJX0v4M?&t=813, here the embedding space in GPT-3 is 12,228 dimensional, whereas Kingdon only allows up to 16 dimensions). I wanted to build the final form of computer interaction, by building in 3D we have allowed a space for representing just about any object you will encounter and everything in the world. Using a programming language designed to be human readable was paramount. I wanted something that is as close to the English language as possible while still being useful. Excel is the most used programming language by a large margin, with python being the next. It is very convenient to program in a table, as many data structures, tensors, matrices, arrays, nodes, can be represented as a table. 


## Where does the name "Starcel" come from?
- In software, the * character is used as a wildcard which could represent literally anything. One of the goals of Starcel is to allow you to run any conceivable command and represent any format of data.
- If you leave the axiomatically set area you will see your space and actions from a third person view - a single star, or dot, suspended in the void.
- Starcel runs inside the cells of a spreadsheet.
- "cel" relates to our player acceleration function. It is intended that Starcel accelerates users and development around the world. 
- We built a function that spawns basis of various dimensions within a spatial dimension. These basis look like stars.
![Commands and Features](/Images/DimSelectorOverride.png)
- You are a Star! *


## Fun stats
- Unreal Engine 4 has ~16,000,000 lines of code
- 20tab/UnrealEnginePython is ~70,000 lines of code
- starcel-ue4 is ~35,000 lines of Python code and ~2000 lines of C++ code
- starcel-ue4 was written in 6 months


## Need to contact me?
If you need to sponsor the project, you can contact me by email, nick recursion.is. 


## Social
- https://discord.gg/nAfm6knz
- https://recursion.is/youtube


## Contributors
This project would not have been possible without rdeioris's work on [UnrealEnginePython](https://github.com/20tab/UnrealEnginePython)


# Support the Project
You can donate on [Paypal](https://www.paypal.com/paypalme/RecursionIs) or [Patreon](https://www.patreon.com/RecursionIs)


## Would you like to contribute? 
Send as many feature updates and issues as you would like. 

Although you can work on anything you'd like, here are specific tasks I need help with: 
- Upgrade the Python code to be more Pythonic, maybe inspired by Ursina, and make the unreal_engine functions more user-friendly
- Integrate [UnrealEnginePython Modus](https://github.com/dfb/UnrealEnginePython/tree/modus)
- Proper Software Engineering principles refactor — Much of this code is AI generated, and I lost the plot
- Clean up the Unreal Engine files according to [standards](https://github.com/Allar/ue5-style-guide) and update the Python files to match. Try to migrate blueprints to Python code. 
- Upgrade to the latest version of Unreal Engine or UE4.27-Plus, and Python after the above
- Panda3D style of object control and Ursina
- Integrate Starcel as a renderer for Manim
- AI md files (anthropic, openai, gemini, etc.)
- Continued server development
- Someone to create example maps
