{"id":15394411,"url":"https://github.com/xyproto/luapixels","last_synced_at":"2025-03-27T23:44:11.849Z","repository":{"id":213289726,"uuid":"733496537","full_name":"xyproto/luapixels","owner":"xyproto","description":"Implement event functions in Lua and handle keypresses and draw pixels to a 320x200 256 color canvas backed by GLFW and OpenGL","archived":false,"fork":false,"pushed_at":"2023-12-20T14:36:57.000Z","size":2882,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T20:28:21.599Z","etag":null,"topics":["cross-platform","gameengine","glfw","go","lua","mode13h"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyproto.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":"2023-12-19T13:09:17.000Z","updated_at":"2023-12-20T00:47:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"75d76003-be3c-4506-b475-c2ab9cf80e96","html_url":"https://github.com/xyproto/luapixels","commit_stats":null,"previous_names":["xyproto/luapixels"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fluapixels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fluapixels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fluapixels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fluapixels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyproto","download_url":"https://codeload.github.com/xyproto/luapixels/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245944062,"owners_count":20697948,"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":["cross-platform","gameengine","glfw","go","lua","mode13h"],"created_at":"2024-10-01T15:23:31.611Z","updated_at":"2025-03-27T23:44:11.825Z","avatar_url":"https://github.com/xyproto.png","language":"Go","readme":"# luapixels\n\nThe beginnings of what could be a game engine for using GLFW + Go + Lua.\n\n![game.lua + results](img/screenshot.png)\n\n### Example use\n\nmain.go:\n\n```go\npackage main\n\nimport (\n    \"log\"\n\n    _ \"embed\"\n\n    \"github.com/xyproto/luapixels\"\n)\n\n//go:embed game.lua\nvar luaCode string\n\nfunc main() {\n    if err := luapixels.Run(luaCode); err != nil {\n        log.Fatalln(err)\n    }\n}\n```\n\ngame.lua:\n\n```lua\nwindow_title = \"Simple Example\"\n\nfunction at_start()\n  print(\"hi\")\n  -- Set color at palette index 7 to red (RGB 255, 0, 0)\n  setpal(7, 255, 0, 0)\nend\n\nfunction at_every_frame()\n  -- Set the background color to blue (RGB 0, 128, 255)\n  background(0, 128, 255)\n  -- At (100, 100), draw a red pixel (index 7 in the palette)\n  plot(100, 100, 7)\nend\n\nfunction at_key_pressed()\n  quit()\nend\n\nfunction at_end()\n  print(\"bye!\")\nend\n```\n\n### Performance\n\nThere is a lot of room for improvements when it comes to performance, since this implementation is fresh and not yet optimized.\n\nThe pixels are quads right now, but a texture could be used instead. This would require no changes from the Lua code, though.\n\n### General info\n\n* License: BSD-3\n* Version: 0.0.0\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fluapixels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyproto%2Fluapixels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fluapixels/lists"}