Mini Basketball
Game created in an afternoon for the TweetTweet8 GameJam
- Goal: Hit the circle on the right with the circle on the left
- Up, Down, Left, Right arrows to set direction and power
- Enter to Shoot
Made in Godot4.
Code (499 characters):
extends Node2D var b=Vector2(99,0) var s=b var t=s var g=false var c=Color() func _process(d): if g: s*=1.-(d*.1);s.y+=9*d;b+=s*d;if b.distance_to(t)<5: b.y=99 if b.y>98 or b.x>98: s=Vector2(20,-20);b=Vector2(9,97);t.x=85;t.y=60+randf()*10;g=false queue_redraw() func _input(e): if !e.is_pressed() or g: return match e.as_text()[0]: "E": g=true "U": s.y-=1 "D": s.y+=1 "R": s.x+=1 "L": s.x-=1 func _draw(): draw_line(b,b+s,c,3) draw_circle(b,3,Color.ORANGE) draw_circle(t,4,c)
Status | Released |
Platforms | HTML5 |
Author | Eibriel |
Genre | Educational |
Made with | Godot |
Tags | Minimalist |
Code license | GNU General Public License v3.0 (GPL) |
Average session | A few seconds |
Inputs | Keyboard |
Leave a comment
Log in with itch.io to leave a comment.