{"id":21148586,"url":"https://github.com/schwalbe-t/Wein2DAndroid","last_synced_at":"2025-10-02T01:30:28.578Z","repository":{"id":166519979,"uuid":"412193659","full_name":"schwalbe-t/Wein2DAndroid","owner":"schwalbe-t","description":"Wein2DAndroid is a library for handling graphics, input and sound for Android apps in Java.","archived":false,"fork":false,"pushed_at":"2022-05-04T16:21:22.000Z","size":308,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T07:44:36.677Z","etag":null,"topics":["2d-game","2d-graphics","android","app","application","game","game-2d","game-development","game2d","gamedev","games","java"],"latest_commit_sha":null,"homepage":"https://wein2ddocs.netlify.app","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schwalbe-t.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}},"created_at":"2021-09-30T19:11:23.000Z","updated_at":"2023-11-03T05:36:18.000Z","dependencies_parsed_at":"2023-06-27T20:16:07.545Z","dependency_job_id":null,"html_url":"https://github.com/schwalbe-t/Wein2DAndroid","commit_stats":null,"previous_names":["devtaube/wein2dandroid","typesafeschwalbe/wein2dandroid","schwalbe-t/wein2dandroid"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/schwalbe-t/Wein2DAndroid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schwalbe-t%2FWein2DAndroid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schwalbe-t%2FWein2DAndroid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schwalbe-t%2FWein2DAndroid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schwalbe-t%2FWein2DAndroid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schwalbe-t","download_url":"https://codeload.github.com/schwalbe-t/Wein2DAndroid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schwalbe-t%2FWein2DAndroid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277942680,"owners_count":25903112,"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","status":"online","status_checked_at":"2025-10-01T02:00:09.286Z","response_time":88,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["2d-game","2d-graphics","android","app","application","game","game-2d","game-development","game2d","gamedev","games","java"],"created_at":"2024-11-20T09:27:28.069Z","updated_at":"2025-10-02T01:30:28.335Z","avatar_url":"https://github.com/schwalbe-t.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\nWein2DAndroid is a library for handling graphics, input and sound for Android apps in Java with very similar method names and structure to Wein2D to allow for easy porting of code across libraries.\n\n## Code Example\nThis is an Example for a simple App using Wein2DAndroid.\n\nThis is the main activity that's defined in the AndroidManifest.xml:\n```java\nimport devtaube.wein2dandroid.*;\n\npublic class ExampleProgram extends Wein2DApplication\n{\n\n    // cube values (feel free to play with these!)\n    static final double CUBE_SIZE = 50.0; // the width and height of the cube (in pixels)\n    static final double CUBE_JUMP_VELOCITY = 800.0; // the cube's jump velocity (in pixels per second)\n    static final double CUBE_GRAVITATION = 1600.0; // gravitation (how much velocity gets removed per second)\n    static final double CUBE_BOUNCEBACK_MULTIPLIER = 0.4; // how much velocity the cube keeps after hitting the ground\n\n    double cubeHeight = 0.0;\n    double cubeVelocity = 0.0;\n\n    @Override\n    public void onCreate()\n    {\n    }\n\n    @Override\n    public void onFrame()\n    {\n        // update calls //////////////////////////////////////////////////\n\n        // if screen is tapped, set the cubes velocity (let the cube jump up)\n        if(getMouseL()) cubeVelocity = CUBE_JUMP_VELOCITY;\n\n        // move the cube up and down according to it's velocity\n        cubeHeight += cubeVelocity * this.deltaTime;\n        // if the cube is not on the ground remove some of the cube's velocity (gravitation)\n        if(cubeHeight \u003e 0.0) cubeVelocity -= CUBE_GRAVITATION * this.deltaTime;\n\n        // if the cube is below or on the ground, set him onto the ground, invert the cube's velocity (movement) and remove some of it's velocity\n        if(cubeHeight \u003c= 0.0) {\n            cubeVelocity = -cubeVelocity * CUBE_BOUNCEBACK_MULTIPLIER;\n            cubeHeight = 0.0;\n        }\n\n        // render calls //////////////////////////////////////////////////\n\n        // fill the screen with blue\n        fill(11, 138, 143);\n\n        // draw the cube\n        drawRectangle()\n                .setPosition((this.width - CUBE_SIZE) / 2.0, this.height - CUBE_SIZE - cubeHeight) // draw at the center of the screen (x axis), draw at the cube's height (y axis)\n                .setSize(CUBE_SIZE, CUBE_SIZE) // draw the cube with it's width and height\n                .setColor(255, 255, 255, 255)\n                .draw(); // draw!\n    }\n\n}\n```\n\n# Documentation\nDocumentation for Wein2DAndroid can be found at [https://wein2ddocs.netlify.app](https://wein2ddocs.netlify.app).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschwalbe-t%2FWein2DAndroid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschwalbe-t%2FWein2DAndroid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschwalbe-t%2FWein2DAndroid/lists"}