{"id":60,"date":"2004-07-15T12:00:00","date_gmt":"2004-07-15T12:00:00","guid":{"rendered":"https:\/\/eric.tedjamulia.com\/blog\/java-dodge\/"},"modified":"2004-07-15T12:00:00","modified_gmt":"2004-07-15T12:00:00","slug":"java-dodge","status":"publish","type":"post","link":"https:\/\/eric.tedjamulia.com\/blog\/java-dodge\/","title":{"rendered":"Another small Java game: Dodge"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I made a little game where the mouse moves a block and the other blocks are the problem. Some are good, some are bad, and the idea is to keep moving rather than run into the wrong one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is a Java applet using AWT drawing and a mouse-motion listener. The player and moving obstacles are block objects; the game keeps them in an ArrayList and checks the player against them. It also has score and time state, so there is something to watch besides the blocks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Like Pong, it uses an offscreen image for double-buffered drawing. The rules are small enough that I can experiment with the game loop and collision checks without needing a lot of artwork first. Apparently a square and a few moving objects are enough to keep me occupied.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/etedj.com\/projects\/java\/Applets\/dodge3\/\">Java Dodge files<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I made a little game where the mouse moves a block and the other blocks are the problem. Some are good, some are bad, and the idea is to keep moving rather than run into the wrong one. It is a Java applet using AWT drawing and a mouse-motion listener. The player and moving obstacles [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42],"tags":[46,47,45,43],"class_list":["post-60","post","type-post","status-publish","format-standard","hentry","category-java-applets","tag-awt","tag-games","tag-high-school","tag-java"],"_links":{"self":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts\/60","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/comments?post=60"}],"version-history":[{"count":0,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts\/60\/revisions"}],"wp:attachment":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/media?parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/categories?post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/tags?post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}