{"id":13338281,"url":"https://github.com/jepemo/open-pvz","last_synced_at":"2025-04-04T03:17:07.777Z","repository":{"id":81265281,"uuid":"91096810","full_name":"jepemo/open-pvz","owner":"jepemo","description":"Tower Defense Game Engine inspired by \"Plantz Vz Zombiez\", implemented in C with differents bindings for other languages.","archived":false,"fork":false,"pushed_at":"2018-02-14T18:50:53.000Z","size":140,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T14:48:43.534Z","etag":null,"topics":["binding","c","game-engine","lua","tower-defense"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jepemo.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":"2017-05-12T13:56:43.000Z","updated_at":"2024-05-13T01:34:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb32835c-9699-421e-acae-96cdb423c203","html_url":"https://github.com/jepemo/open-pvz","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/jepemo%2Fopen-pvz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jepemo%2Fopen-pvz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jepemo%2Fopen-pvz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jepemo%2Fopen-pvz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jepemo","download_url":"https://codeload.github.com/jepemo/open-pvz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247112763,"owners_count":20885606,"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":["binding","c","game-engine","lua","tower-defense"],"created_at":"2024-07-29T19:16:11.810Z","updated_at":"2025-04-04T03:17:07.739Z","avatar_url":"https://github.com/jepemo.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# open-pvz\nTower Defense Game Engine inspired by \"Plantz Vz Zombiez\", implemented in C with differents bindings for other languages.\n\n- [Getting Started](#getting-started)\n- [Example](#example)\n- [Bindings](#bindings)\n\n## Getting Started\n\n### Build \u0026 Install\n\nIn **Linux** (Ubuntu)\n\nInstall compiler and lua headers\n\n```bash\napt-get install gcc\n```\nIn **Mac OS**\nInstall [brew](https://brew.sh/)\n\nInstall lua:\n\n```bash\nbrew install lua\n\n```\n\n**Get** the sourcecode:\n```\ngit clone https://github.com/jepemo/open-pvz.git\n```\n\n**Build** library, executing the make command:\n```\ncd open-pvz\nmake\n```\n\n## Example\n\n### C Simple level example\n\n```c\n#include \"opvz.h\"\n\nvoid level_init (Level *level)\n{\n  // plants\n  level_add_entity(level, PLANT_SUNFLOWER, 0, 0);\n  level_add_entity(level, PLANT_SUNFLOWER, 0, 1);\n  level_add_entity(level, PLANT_SUNFLOWER, 0, 2);\n  level_add_entity(level, PLANT_SUNFLOWER, 0, 3);\n  level_add_entity(level, PLANT_SUNFLOWER, 0, 4);\n\n  level_add_entity(level, PLANT_PEASHOOTER, 1, 0);\n  level_add_entity(level, PLANT_PEASHOOTER, 1, 1);\n  level_add_entity(level, PLANT_PEASHOOTER, 1, 2);\n  level_add_entity(level, PLANT_PEASHOOTER, 1, 3);\n  level_add_entity(level, PLANT_PEASHOOTER, 1, 4);\n\n  // Zombies\n  level_add_entity(level, ZOMBIE_REGULAR, 8, 0);\n  level_add_entity(level, ZOMBIE_REGULAR, 8, 1);\n  level_add_entity(level, ZOMBIE_REGULAR, 8, 2);\n  level_add_entity(level, ZOMBIE_REGULAR, 8, 3);\n  level_add_entity(level, ZOMBIE_REGULAR, 8, 4);\n}\n\nint main (int argc, char **argv)\n{\n  Level *level = level_new_default();\n\n  level_init(level);\n\n  bool finished = false;\n  while(!finished) {\n    level_print_debug(level);\n\n    LevelStatus * status = level_step(level);\n    finished = status-\u003efinished;\n  }\n\n  level_destroy(level);\n\n  return 0;\n}\n```\n\n### Output:\n\n![C Program animation](doc/c_anim.gif)\n\n\n## Bindings:\n * Lua ([Documentation](doc/lua.md))\n * Java (Todo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjepemo%2Fopen-pvz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjepemo%2Fopen-pvz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjepemo%2Fopen-pvz/lists"}