{"id":633,"date":"2023-01-06T04:32:09","date_gmt":"2023-01-06T03:32:09","guid":{"rendered":"https:\/\/eocanha.org\/blog\/?p=633"},"modified":"2023-01-16T20:24:57","modified_gmt":"2023-01-16T19:24:57","slug":"cats-panic","status":"publish","type":"post","link":"https:\/\/eocanha.org\/blog\/2023\/01\/06\/cats-panic\/","title":{"rendered":"Cat&#8217;s Panic"},"content":{"rendered":"\n<p>It&#8217;s been 8 years since the last time I wrote a videogame just for personal fun. As it&#8217;s now become a tradition, I took advantage of the extra focused personal time I usually have on the Christmas season and gave a try to <a href=\"https:\/\/processing.org\/\" data-type=\"URL\" data-id=\"https:\/\/processing.org\/\">Processing<\/a> to do my own &#8220;advent of code&#8221;. It&#8217;s a programming environment based on Java that offers a similar visual, canvas-based experience to the one I enjoyed as a child in 8 bit computers. I certainly found coding there to be a pleasant and fun experience.<\/p>\n\n\n\n<p>So, what I coded is called Cat&#8217;s Panic, my own version of a known arcade game with a similar name. In this version, the player has to unveil the outline of a hidden cute cat on each stage.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/eocanha.org\/blog\/wp-content\/uploads\/2023\/01\/screenshot.png\"><img loading=\"lazy\" width=\"1024\" height=\"724\" src=\"https:\/\/eocanha.org\/blog\/wp-content\/uploads\/2023\/01\/screenshot-1024x724.png\" alt=\"\" class=\"wp-image-634\" srcset=\"https:\/\/eocanha.org\/blog\/wp-content\/uploads\/2023\/01\/screenshot-1024x724.png 1024w, https:\/\/eocanha.org\/blog\/wp-content\/uploads\/2023\/01\/screenshot-300x212.png 300w, https:\/\/eocanha.org\/blog\/wp-content\/uploads\/2023\/01\/screenshot-768x543.png 768w, https:\/\/eocanha.org\/blog\/wp-content\/uploads\/2023\/01\/screenshot-1536x1086.png 1536w, https:\/\/eocanha.org\/blog\/wp-content\/uploads\/2023\/01\/screenshot.png 1640w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>The player uses the arrow keys to control a cursor that can freely move inside a border line. When pressing space, the cursor can start an excursion to try to cover a new area of the image to be unveiled. If any of the enemies touches the excursion path, the player loses a life. The excursion can be canceled at any time by releasing the space key. Enemies can be killed by trapping them in a released area. A stage is completed when 85% of the outline is unveiled.<\/p>\n\n\n\n<p>Although this game is released under GPLv2, I don&#8217;t recommend anybody to look at its source code. It breaks all principles of good software design, it&#8217;s messy, ugly, and it&#8217;s only purpose was to make the developing process entertaining for me. You&#8217;ve been warned.<\/p>\n\n\n\n<p>I&#8217;m open to contributions in the way of new cat pictures that add more stages to the already existing ones, though.<\/p>\n\n\n\n<p>You can <a href=\"https:\/\/github.com\/eocanha\/CatsPanic\" data-type=\"URL\" data-id=\"https:\/\/github.com\/eocanha\/CatsPanic\">get the source code in the GitHub repository<\/a> and <a href=\"https:\/\/github.com\/eocanha\/CatsPanic\/releases\" data-type=\"URL\">a binary release for Linux here<\/a> (with all the Java dependencies, which weight a lot).<\/p>\n\n\n\n<p>Meow, enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been 8 years since the last time I wrote a videogame just for personal fun. As it&#8217;s now become a tradition, I took advantage of the extra focused personal time I usually have on the Christmas season and gave a try to Processing to do my own &#8220;advent of code&#8221;. It&#8217;s a programming environment &hellip; <a href=\"https:\/\/eocanha.org\/blog\/2023\/01\/06\/cats-panic\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Cat&#8217;s Panic<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,5],"tags":[22,21,23],"_links":{"self":[{"href":"https:\/\/eocanha.org\/blog\/wp-json\/wp\/v2\/posts\/633"}],"collection":[{"href":"https:\/\/eocanha.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eocanha.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eocanha.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eocanha.org\/blog\/wp-json\/wp\/v2\/comments?post=633"}],"version-history":[{"count":2,"href":"https:\/\/eocanha.org\/blog\/wp-json\/wp\/v2\/posts\/633\/revisions"}],"predecessor-version":[{"id":637,"href":"https:\/\/eocanha.org\/blog\/wp-json\/wp\/v2\/posts\/633\/revisions\/637"}],"wp:attachment":[{"href":"https:\/\/eocanha.org\/blog\/wp-json\/wp\/v2\/media?parent=633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eocanha.org\/blog\/wp-json\/wp\/v2\/categories?post=633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eocanha.org\/blog\/wp-json\/wp\/v2\/tags?post=633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}