{"id":13577310,"url":"https://github.com/vlang/doom","last_synced_at":"2025-04-04T18:07:43.493Z","repository":{"id":37491489,"uuid":"191271832","full_name":"vlang/doom","owner":"vlang","description":"DOOM translated from C to V. ","archived":false,"fork":false,"pushed_at":"2024-07-08T11:06:45.000Z","size":3027,"stargazers_count":503,"open_issues_count":4,"forks_count":33,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-28T17:07:45.855Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vlang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-11T01:36:08.000Z","updated_at":"2025-03-20T12:19:29.000Z","dependencies_parsed_at":"2024-07-08T13:36:02.781Z","dependency_job_id":"17ce4c2e-8130-4c9b-976a-5bcb9a60700a","html_url":"https://github.com/vlang/doom","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlang%2Fdoom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlang%2Fdoom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlang%2Fdoom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlang%2Fdoom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vlang","download_url":"https://codeload.github.com/vlang/doom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226215,"owners_count":20904465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:01:20.377Z","updated_at":"2025-04-04T18:07:43.460Z","avatar_url":"https://github.com/vlang.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# DOOM.v\nDOOM translated from C to V.  Builds in 0.7 seconds (x25 speed-up).\n\n\nCurrent problems that will be fixed asap:\n\n- #define consts are replaced with their values\n- No indentation in functions\n- Music works fine, but monster and weapon sounds don't\n\n\nIt is possible to translate files one by one and gradually replace C with V. Object files compiled with V have full binary compatibility with object files produced by C, and can be a drop-in replacement:\n\n```bash\n# Download and build DOOM\ngit clone https://github.com/chocolate-doom/chocolate-doom\ncd chocolate-doom\ncmake .\nmake chocolate-doom\n\n# Build p_enemy.v and replace the object file\nwget https://raw.githubusercontent.com/vlang/doom/master/p_enemy.v\nv -lib translated p_enemy.v\ncp p_enemy.o src/doom/CMakeFiles/doom.dir/p_enemy.c.o\n\n# Rebuild it again with p_enemy.v.o and launch it\nmake chocolate-doom \u0026\u0026 src/chocolate-doom -width 640\n```\n\nThere are several things that are allowed in translated code:\n- Globals\n- `++/--` expressions and int to bool conversions (`for i-- {`)\n- Variables can be unused\n- Immutability is not enforced\n\nAll of these except for the globals are going to be fixed by the translator: \n\n- `++/--` expressions will be replaced with statements at the right place\n- unused variables will be removed\n- mutable variables will be marked as mutable.\n\n## How to build and run this demo\n\n### Preparations (Ubuntu Linux)\n\n1. Install dependencies\n   ```bash\n   apt install libsdl2-dev libsdl2-mixer-dev libsdl2-net-dev\n   ```\n\n2. Download doom1.wad into `~/Downloads` from [here](https://distro.ibiblio.org/slitaz/sources/packages/d/doom1.wad). (ref: `External links` section in [this doomwiki page](https://doomwiki.org/wiki/DOOM1.WAD))\n\n### Clone, build and run the demo\n\n```bash\ngit clone git@github.com:vlang/doom.git\ncd doom/\nDOOM_FOLDER=`pwd` \u0026\u0026 ./build_whole_project.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlang%2Fdoom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvlang%2Fdoom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlang%2Fdoom/lists"}