Skip to content

icitry/SQLSandSim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQLSandSim

Link to the YouTube video

Ever wondered if real-time physics simulations in SQL were possible? Imagine doing everything: the physics, the simulation loop, the rendering state and even a secret mechanic, all inside a simple database. Well, look no futher, cuz it's right here.

Running the project

There are 2 main components:

  1. The SQL config script.
  2. The web app (my bad for not wanting to look at ASCII chars).

The SQL script is written for PostgreSQL and will probably not work with other engines.

To load it, run the following command:

# For local database
path/to/SQLSandSim > psql -U <username> -d <db> -a -f schema.sql

# For remote database
path/to/SQLSandSim > psql -h <host> -U <username> -d <db> -a -f schema.sql

After this, all the necessary stuff will be loaded into the sand_sim database.

The web app expects a .env file with an appropriate configuration. Use .env.example as an example for what a configuration should look like. Afterwards, run these command to start the app and enjoy your sims:

path/to/SQLSandSim/app > npm i
path/to/SQLSandSim/app > npm start

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors