Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

Duck HuntingView game page

1KB asymetrical 2 players game!
Submitted by Barnabe Wild — 2 days, 30 minutes before the deadline
Add to collection

Play game

Duck Hunting's itch.io page

Compressed Bytes used
1002 or 731 after Shrinko8

Source Code (OPTIONAL)
?'⁶!0000\0\0ぬᵇ… ▥'
?'⁶!0040\0\0ぬい\0 '
?'⁶!0080\0\0p\0`fサ'
?'⁶!00c0\0オツ\0オアツ'
?'⁶!0100オアツ\0\0オツ'
?'⁶!0140`ff\0\0\0p'
?'⁶!0180\0 \0\0\0ぬい'
?'⁶!01c0… ▥\0\0\0ぬᵇ'
function _init()
-- devkit enabled to enable mouse
poke(0x5f2d,1)
x = 60
y = 60
killed = false
score = 0
scorable = true
speed = 2
start_timer = 60
timer = 60
duck_score = 0
end
function _update()
if (timer >0) and (killed== false) then
timer -=1
end
if (timer <=0) then
start_timer += 10
timer = start_timer
duck_score += 1
print "\abf"
speed -=0.1

end
if (y >= 127)and (killed==false)then
y = 1
end
if (y <= 0) then
y= 126
end
if (x >= 127)then
x = 1
end
if (x <= 0) then
x = 126
end
mousex = stat(32)
mousey = stat(33)
if (down and stat(34) == 0) then
down = false
end
if ((not down) and stat(34) == 1) then
down = true
print "\ace-g" -- minor triad
end
if (x <= mousex) and (x>= mousex-8) and (y <= mousey) and (y >= mousey-8) and (down == true) and (scorable ==true) then
killed = true
score += 1
speed += 0.2
scorable = false
end
if (y >= 140) then
print "\abcdefg"
killed = false
x= 60
y= 60
scorable = true
start_timer -=12
timer = start_timer
end
end
function _draw()
cls()
--winner bar
rect (44,25,70,33)
print ("hunter",46,27)
-- 90 need to be a variable
rectfill(71,26,90+(score-duck_score)*3,33,8)
-- duck barr
if (duck_score <= score+7)then
rectfill(109,26,90+(score-duck_score)*3,33,12)
end

rect (109,25,127,33,7)
print ("duck",111,27)

rect (44,25,109,33)
line (90+(score-duck_score)*3,25,90+(score-duck_score)*3,33)
--end winner bar

rect(0,0,22,16)
print("score ",2,2)
print(score,10,10)

rect(0,19,42,33)
print("duck score ",2,21)
print(duck_score,10,27)

print("duck hunting",45,0)
print("p1: move with arrow keys",30,7)
print("p2: aim with mouse")
print("click to shoot",46,19)
print("timer until duck score :",0,120)
print(timer,100,120)

line(mousex, mousey - 4, mousex, mousey + 4)
line(mousex - 4, mousey, mousex + 4, mousey)
if (killed==false) then
if (btn(0)) x -= speed
if (btn(1)) x += speed
if (btn(2)) y -= speed
if (btn(3)) y += speed
spr(0,x,y)
end
if (killed==true) then
spr(1,x,y)
y+=2
end
if (down==true) then
draw_cross(mousex,mousey)
end
end
function draw_cross(x,y)
line(x - 10, y - 10, x + 10, y + 10)
line(x + 10, y - 10, x - 10, y + 10)
end

Leave a comment

Log in with itch.io to leave a comment.

Comments

No one has posted a comment yet