Git world generator. waking-git
uses the code structure, and evolution of
your git repository to generate a world for you to explore.
The program will scan your repository, and extract from its directory and code structure revelant data that can be used to generate a 2D/3D playable world/game. The structure of your code (Intefaces, Classes, functions etc...) can be used to create living creatures. Those creatures can be mobs/enemies depending on how well their structure match well known code smell, in the programming language the code is written on.
Here is work in progress shmup game that is currently being built on the implement-a-shmup-demo
branch:
The project is built in rust
, and uses git as a strong dependency.
Please read the draft of the architecture.
In order to run waking-git
you need to install the rust tool chain.
How to scan a repository ?
$ cargo run -p wake -- scan https://github.com/elhmn/waking-git
How to play ?
First make sure to build and install the players using the following command:
$ make build-players && make install-players
Then you can run the player using the following command:
$ cargo run -p wake -- play shmup https://github.com/elhmn/waking-git
How to run the server ?
$ cargo run -p wake serve -p 3000
You could request data from the server using the following command:
$ curl -X GET -vsS -d '{"repo_url": "https://github.com/elhmn/cgit"}' \
-H 'Content-Type: application/json' localhost:3000/scan/extracted | jq
The server supports the following routes:
GET /scan/extracted
- Extract data from a repositoryGET /scan/converted
- Convert extracted data to a world representationGET /scan
- Scan a repository and return a tarball containing extracted and converted data
Run the entire test suite using,
$ make test
Check linting
$ make lint
Check code format
$ make fmt
Setup git local hooks
$ make install-hooks
You can run make
OR make help
to find out more commands
$ make
You can build `wake` using `make build`
or run an example using `make run`
Choose a command...
build build application binary.
run run an example.
serve start the wake server.
build-wake build wake binary.
install-players install players binary.
build-players build players binary.
test run tests
lint run linter over the entire code base
lint-players run linter over the players workspace
lint-wake run linter over the wake workspace
fmt check your code format
install-hooks install local git hooks
You could run it using cargo commands directly
Make sure to build and install the player before running it:
`make build-players ; make install-players`
Then run: `cargo run -p wake -- play shmup https://github.com/elhmn/waking-git`
Scan a repo:
`cargo run -p wake -- scan https://github.com/elhmn/waking-git`
Run the player:
`cargo run -p players -- shmup /Users/elhmn/.wake/scanner/github-com-elhmn-waking-git/shmup-converted.json`
Building this project require to know what is the of state code scanning and data visualisation researches. Here is a list of research papers and code visualisers that will be useful to work on this project:
- codeology brings life to your source code, by generating a creature that represents your code structure
- repo-visualization
- Gource is a git history visualiser
- Visual softare analytics (VSA) is a research group that explore different ways to represent complex software systems
- getaviz is a tool built by the VSA, to visualise code structure
- static code analysers
- dynamic code analysers
- Gephi
- Rust code analysis
- emerge
- Some research papers: