{"author_link":"\/users\/loveapplegames","author_name":"loveapplegames","author_uid":"loveapplegames","comments":[],"epoch":1684403441,"event":"LD53","format":"md","ldjam_node_id":371027,"likes":20,"metadata":{"p_key":"201367","p_author":"loveapplegames","p_authorkey":"1006791","p_urlkey":"434054","p_title":"I dream of pixel art: AI based 8x8 pixel art character generator","p_cat":"LDJam ","p_event":"LD53","p_time":"1684403441","p_likes":"20","p_comments":"0","p_status":"WAYBACK","us_key":"1006791","us_name":"loveapplegames","us_username":"loveapplegames","event_start":"1682726400","event_key":"118","event_name":"Ludum Dare 53"},"node":{"_collation":{"body_sanitizer":"TextUtils::SanitizeHTML via existing importer","event":"LD53","removed_author":false},"_superparent":332127,"_trust":13,"author":6791,"body":"After two weeks of hard work... finally, a nice result!  This Ludum Dare, my ambition was to create a browser game with my own embedded AI based pixel art generation.  Being a total noob in Python, Pytorch and deep learning, I did not manage to create an actual game, but I was proud of myself that I did produce a half-functional tech demo running my homemade AI in the browser. \n\nAfter a lot of experimentation in Pytorch with different datasets, I managed to create a useful tool for generating animated game characters.  It's based on a 5-layer denoising autoencoder with noise added to the latent space, a sort of poor man's variational encoder.  I started with 376 8x8 pixel art characters, obtained from freely available internet sources. It was hard to find a large enough dataset. Some images were distorted with jpeg noise. I wrote a segmenter that cuts sprites out of sprite sheets and scale them to 1x1, reconstructing the original colours as well as possible.  \n\nPixel art is prone to overfitting, and I could get the neural net to perfectly recall all items in the data set. However, the goal is not to literally reproduce, but to interpolate.  I removed a lot of oddball characters to arrive at a dataset with 166 humanoids, all with two eyes, hands, legs, etc.  I shrunk the latent space to 3 values. The resulting neural net actually interpolates meaningfully between data points.  \n\n**The result: http:\/\/tmtg.nl\/ludumdare\/ld53-charactergen\/**\n\nCheck out my other experiments on my game page:\n\nhttps:\/\/ldjam.com\/events\/ludum-dare\/53\/i-dream-of-pixel-art-ai-game\n\n![ezgif-2-faca030f8a.gif](\/\/\/raw\/78a\/1\/z\/5bd5b.gif) \n\n![ezgif-2-0f1cfb5027.gif](\/\/\/raw\/78a\/1\/z\/5bd5c.gif)\n\n![ezgif-2-1a79eca360.gif](\/\/\/raw\/78a\/1\/z\/5bd6a.gif)\n\n![ezgif-2-2a618f75d1.gif](\/\/\/raw\/78a\/1\/z\/5bd5e.gif)\n\n![ezgif-2-9b082dc291.gif](\/\/\/raw\/78a\/1\/z\/5bd5f.gif)\n\n![ezgif-2-86f7ff6b72.gif](\/\/\/raw\/78a\/1\/z\/5bd60.gif)\n\n![ezgif-2-376a042e15.gif](\/\/\/raw\/78a\/1\/z\/5bd61.gif)\n\n![ezgif-2-a832fa5e58.gif](\/\/\/raw\/78a\/1\/z\/5bd62.gif)\n\n![ezgif-2-c0aad1b73a.gif](\/\/\/raw\/78a\/1\/z\/5bd64.gif)\n\n![ezgif-2-e95e817625.gif](\/\/\/raw\/78a\/1\/z\/5bd65.gif)\n\n![ezgif-2-f5e72d183d.gif](\/\/\/raw\/78a\/1\/z\/5bd66.gif)\n\n![ezgif-2-f060369ac1.gif](\/\/\/raw\/78a\/1\/z\/5bd69.gif)","comments":3,"comments-timestamp":"2023-05-18T15:08:41Z","created":"2023-05-18T08:25:37Z","files":[],"files-timestamp":0,"id":371027,"love":20,"love-timestamp":"2023-05-19T06:21:35Z","meta":[],"modified":"2023-05-19T06:21:35Z","name":"I dream of pixel art: AI based 8x8 pixel art character generator","node-timestamp":"2023-05-18T09:54:10Z","parent":361269,"parents":[1,5,9,332127,361269],"path":"\/events\/ludum-dare\/53\/i-dream-of-pixel-art-ai-game\/i-dream-of-pixel-art-ai-based-8x8-pixel-art-character-generator","published":"2023-05-18T09:50:41Z","scope":"public","slug":"i-dream-of-pixel-art-ai-based-8x8-pixel-art-character-generator","subsubtype":"","subtype":"","type":"post","version":1146972},"node_metadata":{"n_key":"371027","n_urlkey":"434054","n_parent":"361269","n_path":"\/events\/ludum-dare\/53\/i-dream-of-pixel-art-ai-game\/i-dream-of-pixel-art-ai-based-8x8-pixel-art-character-generator","n_slug":"i-dream-of-pixel-art-ai-based-8x","n_type":"post","n_subtype":"","n_subsubtype":"","n_author":"6791","n_created":"1684398337","n_modified":"1684477295","n_version":"1146972","n_status":"WAYBACK"},"source_url":"https:\/\/ldjam.com\/events\/ludum-dare\/53\/i-dream-of-pixel-art-ai-game\/i-dream-of-pixel-art-ai-based-8x8-pixel-art-character-generator","text":"After two weeks of hard work... finally, a nice result!  This Ludum Dare, my ambition was to create a browser game with my own embedded AI based pixel art generation.  Being a total noob in Python, Pytorch and deep learning, I did not manage to create an actual game, but I was proud of myself that I did produce a half-functional tech demo running my homemade AI in the browser. \n\nAfter a lot of experimentation in Pytorch with different datasets, I managed to create a useful tool for generating animated game characters.  It's based on a 5-layer denoising autoencoder with noise added to the latent space, a sort of poor man's variational encoder.  I started with 376 8x8 pixel art characters, obtained from freely available internet sources. It was hard to find a large enough dataset. Some images were distorted with jpeg noise. I wrote a segmenter that cuts sprites out of sprite sheets and scale them to 1x1, reconstructing the original colours as well as possible.  \n\nPixel art is prone to overfitting, and I could get the neural net to perfectly recall all items in the data set. However, the goal is not to literally reproduce, but to interpolate.  I removed a lot of oddball characters to arrive at a dataset with 166 humanoids, all with two eyes, hands, legs, etc.  I shrunk the latent space to 3 values. The resulting neural net actually interpolates meaningfully between data points.  \n\n**The result: http:\/\/tmtg.nl\/ludumdare\/ld53-charactergen\/**\n\nCheck out my other experiments on my game page:\n\nhttps:\/\/ldjam.com\/events\/ludum-dare\/53\/i-dream-of-pixel-art-ai-game\n\n![ezgif-2-faca030f8a.gif](\/\/\/raw\/78a\/1\/z\/5bd5b.gif) \n\n![ezgif-2-0f1cfb5027.gif](\/\/\/raw\/78a\/1\/z\/5bd5c.gif)\n\n![ezgif-2-1a79eca360.gif](\/\/\/raw\/78a\/1\/z\/5bd6a.gif)\n\n![ezgif-2-2a618f75d1.gif](\/\/\/raw\/78a\/1\/z\/5bd5e.gif)\n\n![ezgif-2-9b082dc291.gif](\/\/\/raw\/78a\/1\/z\/5bd5f.gif)\n\n![ezgif-2-86f7ff6b72.gif](\/\/\/raw\/78a\/1\/z\/5bd60.gif)\n\n![ezgif-2-376a042e15.gif](\/\/\/raw\/78a\/1\/z\/5bd61.gif)\n\n![ezgif-2-a832fa5e58.gif](\/\/\/raw\/78a\/1\/z\/5bd62.gif)\n\n![ezgif-2-c0aad1b73a.gif](\/\/\/raw\/78a\/1\/z\/5bd64.gif)\n\n![ezgif-2-e95e817625.gif](\/\/\/raw\/78a\/1\/z\/5bd65.gif)\n\n![ezgif-2-f5e72d183d.gif](\/\/\/raw\/78a\/1\/z\/5bd66.gif)\n\n![ezgif-2-f060369ac1.gif](\/\/\/raw\/78a\/1\/z\/5bd69.gif)","title":"I dream of pixel art: AI based 8x8 pixel art character generator","wayback_source":[]}