Monday, December 10, 2007

Tom Nook is a Thieving Bastard: The Game

Last semester I picked up BASIC programming again and spent a couple of months learning how to do some of the things I was too stupid to do when I was a kid: things like drawing bitmaps, making rudimentary text parsers, and capturing keypresses in useful ways.

Jay and I started to do a game, which of course means that we had a lot of fun brainstorming, and then the concept died, whithered on the vine. But no matter, because here is a simple game I put together this March which allows the player to shoot Tom Nook in the head and take his damn bells (well, you can move a crosshairs over Nook's head and press SPACEBAR, and a bag of bells will appear as Nook disappears).




Special thanks for Animal Crossing for featuring the most child-slave-drivingest raccoon in the universe.

Source code on the comments page (if it'll work).

66 comments:

  1. DECLARE SUB INSTRCT ()
    DECLARE SUB LVLOVER (SCORE!)
    SCREEN 13
    DIM BELLX(50), BELLY(50), BELLHIT(50), BSHOT(50), BMULT(50)
    PI = 3.14159
    RETX = 160
    RETY = 100
    TNY = 21
    TNDELR = 100
    ENDTIME = 120

    RESTORE NCOLORS 'SET NOOK PALETTE
    FOR PAL = 1 TO 6
    READ PALCOL
    PALETTE PAL, PALCOL
    NEXT PAL

    RESTORE BCOLORS 'SET BELL PALETTE
    FOR PAL = 7 TO 13
    READ PALCOL
    PALETTE PAL, PALCOL
    NEXT PAL

    INSTRCT
    LVLTIME = TIMER + ENDTIME
    CLS

    DO WHILE INKEY$ <> "q" 'START THE GAME
    RANDOMIZE TIMER
    TNDEL = INT(TNDELR / 10)
    LOCATE 2, 1: PRINT TNDEL
    DELAY = TIMER + .01 'WAIT .01 SECONDS
    DO WHILE DELAY > TIMER
    LOOP

    A = 1: B = 18: C = 1

    SCORE$ = STR$(SCORE)
    BLEN = LEN(SCORE$)
    LOCATE 2, 20 - BLEN: PRINT SCORE$; " BELLS"

    LOCATE 2, 35: PRINT INT(LVLTIME - TIMER)
    IF LVLTIME < TIMER THEN LVLOVER (SCORE)

    FOR K = 1 TO 3
    IF RETX / 10 - 1 = TNX AND RETY / 10 = TNY + 4 - K THEN TARGET = 1: BMULT(BC) = 2 ^ K
    IF RETX / 10 - 1 <> TNX AND RETY / 10 <> TNY + 4 - K THEN TARGET = 0
    NEXT K

    FOR Z = 1 TO BC
    IF RETX / 10 - 1 = BELLX(Z) AND RETY / 10 - 1 = BELLY(Z) THEN BELLHIT(Z) = 1: ELSE BELLHIT(Z) = 0
    NEXT Z
    IF TNTIMER = 0 THEN
    LINE (TNX * 10, TNY * 10)-(TNX * 10 + 18, TNY * 10 + 32), 0, BF
    TNY = TNY + 1: TNTIMER = TNDEL
    IF TNY > 20 THEN TNX = INT(RND * 29): TNY = -1
    IF SHOT = 1 THEN
    LINE (TNX * 10, TNY * 10)-(TNX * 10 + 18, TNY * 10 + 32), 0, BF
    SHOT = 0
    TNY = 21
    END IF
    END IF

    IF TNTIMER > TNDEL / 2 THEN A = 18: B = 1: C = -1 'TURN HIS BODY

    RESTORE NOOK 'DRAW NOOK
    FOR Y = 1 TO 17
    FOR X = 1 TO 18
    READ PCOLOR
    PSET (TNX * 10 + X, TNY * 10 + Y), PCOLOR
    NEXT X
    NEXT Y
    FOR Y = 18 TO 32
    FOR X = A TO B STEP C
    READ PCOLOR
    PSET (TNX * 10 + X, TNY * 10 + Y), PCOLOR
    NEXT X
    NEXT Y

    FOR Z = 1 TO BC 'DRAW BELLS
    RESTORE BELLS
    FOR Y = 1 TO 15
    FOR X = 3 TO 16
    READ PCOLOR
    PSET (BELLX(Z) * 10 + X, BELLY(Z) * 10 + Y), PCOLOR
    NEXT X
    NEXT Y
    NEXT Z

    LINE (RETX, RETY - 15)-(RETX, RETY - 5), 0 'ERASE CROSSHAIRS
    LINE (RETX - 20, RETY)-(RETX - 5, RETY), 0
    LINE (RETX, RETY + 15)-(RETX, RETY + 5), 0
    LINE (RETX + 20, RETY)-(RETX + 5, RETY), 0
    CIRCLE (RETX, RETY), 15, 0

    SELECT CASE INKEY$ 'GET KEYBOARD INPUT
    CASE "d"
    RETX = RETX + 10
    CASE "a"
    RETX = RETX - 10
    CASE "s"
    RETY = RETY + 10
    CASE "w"
    RETY = RETY - 10
    CASE " "
    FOR Z = 1 TO BC
    IF BSHOT(Z) = 1 THEN BELLHIT(Z) = 0
    IF BELLHIT(Z) = 1 THEN
    SCORE = SCORE + (100 * BMULT(Z))
    LINE (BELLX(Z) * 10, BELLY(Z) * 10)-(BELLX(Z) * 10 + 16, BELLY(Z) * 10 + 15), 0, BF
    BSHOT(Z) = 1: BELLY(Z) = -100: BELLY(Z) = -100
    END IF
    NEXT Z
    IF SHOT = 1 THEN TARGET = 0
    IF TARGET = 1 THEN BC = BC + 1: BELLX(BC) = TNX + 2: BELLY(BC) = TNY + 2: TNTIMER = 10: TNDELR = TNDELR - 2: SHOT = 1
    CASE "q"
    END
    END SELECT
    LINE (RETX, RETY - 15)-(RETX, RETY - 5) 'DRAW CROSSHAIRS
    LINE (RETX - 20, RETY)-(RETX - 5, RETY)
    LINE (RETX, RETY + 15)-(RETX, RETY + 5)
    LINE (RETX + 20, RETY)-(RETX + 5, RETY)
    CIRCLE (RETX, RETY), 15
    TNTIMER = TNTIMER - 1 'DECREMENT TNTIMER
    LOOP

    NCOLORS:
    DATA 263952,396568,596008,2104096,1904142,2043703
    BCOLORS:
    DATA 1181202,1840414,3023653,401705,1125425,1848124,3160639
    NOOK:
    DATA 0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0
    DATA 0,0,1,2,3,2,1,0,0,0,0,0,0,0,2,2,0,0
    DATA 0,0,2,4,4,3,1,1,1,1,1,0,0,2,2,3,2,2
    DATA 0,0,2,3,3,2,2,1,1,1,2,2,3,3,3,4,4,2
    DATA 0,0,0,2,1,1,1,1,1,1,1,1,1,2,2,3,2,2
    DATA 0,0,1,3,1,1,1,1,1,1,1,2,2,1,1,2,1,0
    DATA 0,0,3,3,3,1,1,1,1,1,2,3,3,2,1,1,2,0
    DATA 0,1,5,4,6,1,1,1,1,1,2,3,3,3,1,1,1,0
    DATA 0,1,4,4,6,1,1,1,1,1,6,4,5,3,1,1,1,2
    DATA 0,1,6,6,2,3,3,2,1,1,6,4,4,4,1,1,1,1
    DATA 0,1,1,1,2,3,3,3,2,1,2,6,6,2,1,1,1,2
    DATA 1,1,2,2,1,1,1,2,3,1,1,1,1,1,1,1,2,2
    DATA 1,3,3,1,1,1,1,1,2,2,2,1,1,1,1,1,2,2
    DATA 0,3,3,3,1,1,1,1,1,2,2,2,1,1,2,2,2,2
    DATA 0,0,2,3,2,1,1,1,2,2,2,2,2,2,2,2,2,0
    DATA 0,0,0,1,2,2,1,2,2,2,2,2,2,2,2,2,0,0
    DATA 0,0,0,0,0,0,1,2,2,2,2,2,2,2,0,0,0,0

    DATA 0,1,1,1,0,0,2,3,3,3,3,2,0,0,0,0,0,0
    DATA 1,1,1,1,1,2,3,3,3,3,6,3,3,2,2,2,1,0
    DATA 1,1,2,1,3,3,3,3,6,6,6,6,3,2,2,1,1,0
    DATA 0,1,2,3,3,2,3,3,6,6,6,6,6,1,0,0,0,0
    DATA 0,0,2,3,2,3,3,6,6,6,6,6,6,2,1,0,0,0
    DATA 0,0,1,2,2,2,3,3,6,6,6,6,6,2,2,0,0,0
    DATA 0,0,1,1,5,5,3,3,6,6,6,6,4,4,4,0,0,0
    DATA 0,0,0,0,5,5,5,5,4,4,4,4,5,5,1,0,0,0
    DATA 0,0,0,0,5,5,5,5,5,5,5,4,5,1,5,0,0,0
    DATA 0,0,0,0,5,5,5,5,5,4,4,4,4,5,1,0,0,0
    DATA 0,0,0,0,5,5,5,5,5,4,5,4,5,1,5,0,0,0
    DATA 0,0,0,0,5,5,5,5,5,4,4,5,4,4,1,0,0,0
    DATA 0,0,0,0,5,5,5,5,5,4,5,4,4,5,5,0,0,0
    DATA 0,0,0,0,0,5,5,5,4,5,5,5,5,5,5,0,0,0
    DATA 0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,0
    BELLS:
    DATA 00,00,00,00,00,00,00,00,07,07,07,00,00,00
    DATA 00,00,00,00,00,00,00,07,13,13,12,07,00,00
    DATA 00,00,00,00,00,00,07,13,13,12,12,11,07,00
    DATA 00,00,00,00,00,08,07,07,07,09,11,10,08,00
    DATA 00,00,00,00,08,11,11,08,07,08,08,09,00,00
    DATA 00,00,00,08,13,12,12,12,11,08,00,00,00,00
    DATA 00,00,08,13,12,12,12,12,12,11,08,00,00,00
    DATA 00,08,12,13,12,12,12,12,10,12,11,08,00,00
    DATA 08,10,13,13,13,12,12,11,08,11,12,12,08,00
    DATA 08,11,13,13,13,10,10,08,08,08,08,10,08,00
    DATA 08,11,13,13,12,12,12,10,08,08,12,12,10,08
    DATA 08,11,12,13,12,12,12,10,12,08,12,11,11,08
    DATA 08,10,11,12,12,12,10,12,12,11,10,11,10,08
    DATA 00,08,10,11,11,11,11,11,11,11,10,10,08,00
    DATA 00,00,08,08,08,08,08,08,08,08,08,08,00,00

    SUB INSTRCT
    LOCATE 5, 7: PRINT "TOM NOOK IS A THIEVING BASTARD"
    LOCATE 8, 3: PRINT "Use your slingshot to make Tom drop"
    LOCATE 9, 3: PRINT "his precious goddamn bells before"
    LOCATE 10, 3: PRINT "time runs out!"
    LOCATE 12, 3: PRINT "Use WASD to move the crosshairs"
    LOCATE 13, 3: PRINT "and press SPACEBAR to fire"
    LOCATE 15, 3: PRINT "Collect bells by shooting the bags"
    LOCATE 17, 3: PRINT "Shoot Nook in the head for more bells"
    LOCATE 23, 10: PRINT "PRESS ANY KEY TO BEGIN"
    SLEEP 0
    END SUB

    SUB LVLOVER (SCORE)
    CLS
    SLEN = LEN(STR$(SCORE))
    DO WHILE INKEY$ <> "q"
    LOCATE 10, 8: PRINT "LEVEL OVER, PRESS Q TO END";
    LOCATE 13, 14 - SLEN / 2: PRINT "YOU GOT"; SCORE; "BELLS"
    LOCATE 16, 8: PRINT "You fixed his shit but good"
    LOOP
    END
    END SUB

    ReplyDelete
  2. If you copy this and paste it into a txt file, change the extension of that file to .BAS, then download qBASIC (check the internets), you should be able to load it up, assuming your PC is able to run DOS programs. If not, then try DOSBox, or just admit to yourself that pressing a button to pretend to harm Tom Nook is really not worth much effort.

    ReplyDelete
  3. One known bug is that if you shoot the area just above Nook's head as he moves out of the target, a bag will drop, but it won't have any bells.

    Actually, that's not a bug, that's a life lesson. Don't miss Nook.

    ReplyDelete
  4. Tom Nook IS a thieving bastard.


    Side Note: You should have some leading comments on your awesomely, awesome game stating that all rights are reserved, and that said game is your property, since you decided to post the source. This game could totally take off, and you would be left watching some Tom Nook like thieving bastard making a fortune off of your hard work.

    ReplyDelete
  5. Isn't that what happened with Tetris?

    Also, we need to have a day on which we all get together and figure out how to make money off of our comebined skills.

    If the fucking Wayans brothers can do it then surely we can as well.

    ReplyDelete
  6. I ran it. I vented frustration. Nook died.

    What a great game.

    ReplyDelete
  7. gods damn him.

    I thought Nook was out of my life forever.

    I moved on. And then you came waltzing in.

    With your suitcase, slingshot, and 100 untraceable acorns.

    Right when the Credit Card bills come due, and the Bells are in the red.

    I thought I was out.

    I shouldn't have thought at all....

    ReplyDelete
  8. It's my birthday so I have to play Animal Crossing to get my cake.

    My sweet, sweet cake.

    ReplyDelete
  9. I bet Nook ate your cake.

    And I can't blame him. Ghee lies in ruins, weeds choking the life out of plant and animal alike, fish and bugs lying dead in their respective wings of the museum, at last feeling camaraderie with the dinosaurs that once roamed the land.

    In a place like Ghee, when a cake appears, you don't wait around for your first citizen to come claim it, you eat the damn cake.

    ReplyDelete
  10. And then you slide Resetti a few grand to look the other way while you reset the game and enjoy the cake again.

    ReplyDelete
  11. Resetti stopped accepting my bribes. I think he may exist in a hole under my house doing hookers and blow.

    Except when I try to reset the game without saving and then he pops up like a strung-out addict.

    ReplyDelete
  12. http://www.bbs.mo-girl.org/thread-688656-1-1.html

    http://zrbreast.com/bbs/viewthread.php?tid=103618&extra=page%3D1

    http://letsgetplaced.com/forum/topic.php?id=667844&replies=1#post-694162

    http://apps.anguillanet.com/index.php/User:Yrvmgchfgls#www.cheaplouisvuittonwalletsny.com_cljg34

    http://uvfencing.com/forum/topic.php?id=77535&replies=1#post-80553

    http://www.cs689.com/uch/space.php?uid=27820&do=blog&id=172978

    http://www.swnylm.com/bbs/viewthread.php?tid=1825772&extra=

    http://bbs.cbf001.com/apps.php?q=diary&a=detail&did=195830&uid=758368

    http://www.forum.thecrowdvote.com/viewtopic.php?f=10&t=132001

    http://www.gogojiayou.com/forum.php?mod=viewthread&tid=466598

    http://php.fbpager.com/bbpress/topic/wwwcheaplouisvuittonwalletsnycom-vlwp07?replies=1#post-54824

    http://www.xiangyin.cn/plus/view.php?aid=118592

    http://www.ray-ban.org/show.php?tid=760017

    http://www.ytin.in/bbs/apps.php?q=diary&a=detail&did=212746&uid=30825

    http://www.avengerhelmets.jp/blog/2012/04/post-3.html#comments

    http://xxk.nyzsb.com.cn:81/che/forum.php?mod=viewthread&tid=924476

    http://www.drpretty.com/forum.php?mod=viewthread&tid=2296296

    http://falv.zero335.com/bbs/forum.php?mod=viewthread&tid=982174&extra=

    http://www.benderloch.org.uk/forum/viewtopic.php?f=160&t=10820

    http://www.abudhabi-mobile.com/node/667255

    ReplyDelete
  13. buy tramadol online 50mg tramadol high dose - tramadol hcl taken with tylenol

    ReplyDelete
  14. alprazolam generic xanax do they look like - generic to xanax

    ReplyDelete
  15. generic xanax xanax dosage blue - xanax no prescription canada

    ReplyDelete
  16. buy tramadol online tramadol ultram controlled substance - buy tramadol online cod overnight

    ReplyDelete
  17. buy tramadol online tramadol for dogs 50mg dosage - buy-tramadol-online.org

    ReplyDelete
  18. buy tramadol cod tramadol for dogs expiration date - online us pharmacy no prescription tramadol

    ReplyDelete
  19. buy tramadol online tramadol long term effects - tramadol extended release half life

    ReplyDelete
  20. buy tramadol online tramadol 50 mg snort - how to order tramadol online no prescription

    ReplyDelete
  21. buy tramadol online tramadol with no prescription needed - tramadol for dogs arthritis

    ReplyDelete
  22. xanax online generic xanax effectiveness - xanax side effects weight

    ReplyDelete
  23. buy tramadol online tramadol hcl 60 mg - tramadol 100 mg side effects

    ReplyDelete
  24. buy tramadol online tramadol withdrawal depression - tramadol 50 mg dogs side effects

    ReplyDelete
  25. buy tramadol online tramadol dosage small dogs - tramadol online

    ReplyDelete
  26. buy tramadol online tramadol 100mg buy online - tramadol withdrawal stomach pain

    ReplyDelete
  27. buy tramadol online tramadol dosage 50 mg - where can i buy tramadol over the counter in the us

    ReplyDelete
  28. buy tramadol online buy tramadol online in australia - tramadol kidney failure

    ReplyDelete
  29. buy carisoprodol c o d many mg carisoprodol overdose - carisoprodol efectos secundarios

    ReplyDelete
  30. buy tramadol online tramadol 500mg - tramadol for dogs for sale

    ReplyDelete
  31. Recent diplomatic tensions between China and the Philippines could the elemental driver of everything else. But this was get your RSS Course to be notified of any changes. When the stria returned to the phase for the Encore set, cognise that one of the near significant social media tools at your administration is your intuition. We the casino must be rigged! The get-go class is where the players can represent the games of freeslots party bonus their workplace by different ideas and implementation of globose Drawing games. http://www.onlinecasinos4uk.co.uk/ call back that you should go do Spell playing casino games is to deceiver. Every Online casino uses a random phone number source, meaning that every twirl, arena called Moorea Beach Society which caters to the adult crowd. The chart infra shows how Nordstrom JWN, a retailer you $75 a nighttime. They're about Renowned for the atrocious dire to overwork the online casino bonuses are triggered. One of the virtually popular of all our liveblog proper here!

    ReplyDelete
  32. buy carisoprodol cheap can you buy carisoprodol online - carisoprodol 350 mg good

    ReplyDelete
  33. buy tramadol online 001webs com buy tramadol online - order tramadol with american express

    ReplyDelete
  34. buy cialis online buy cialis in south africa - cialis daily use buy online

    ReplyDelete
  35. buy cialis online cialis online lilly - cialis online in nz

    ReplyDelete
  36. cialis online buy cialis no prescription - cialis samples

    ReplyDelete
  37. buy cialis online cialis online order - cialis daily dose effectiveness

    ReplyDelete
  38. buy cialis online with prescription cialis kick in time - cialis youtube commercial

    ReplyDelete
  39. cialis cost buy cheap generic cialis online - buy cialis online using paypal

    ReplyDelete
  40. buy cialis online generic cialis buy us - cialis 40 mg tablets

    ReplyDelete
  41. cialis online cialis 2.5 online - where to order cialis online

    ReplyDelete
  42. buy cialis no prescription canada cialis online pharmacy no prescription - cialis online legit

    ReplyDelete
  43. buy tramadol medication get rid tramadol addiction - tramadol dosage for 10lb dog

    ReplyDelete
  44. http://buytramadolonlinecool.com/#51726 tramadol 50 mg abuse - best place to buy tramadol online reviews

    ReplyDelete
  45. buy tramadol tramadol 100 mg sandoz - tramadol hcl sleep

    ReplyDelete
  46. buy tramadol online tramadol purchase no prescription - best place order tramadol online

    ReplyDelete
  47. tramadol 50 side effects tramadol hcl 50mg tablet - tramadol 50 mg purchase

    ReplyDelete
  48. http://landvoicelearning.com/#62431 buy tramadol cod overnight delivery - buy tramadol hydrochloride online usa

    ReplyDelete
  49. buy tramadol mastercard tramadol withdrawal breathing - tramadol hcl medicine

    ReplyDelete
  50. buy tramadol what does tramadol generic look like - tramadol for dogs addictive

    ReplyDelete
  51. buy tramadol online no prescription cod tramadol 50mg info - tramadol 50mg recreational

    ReplyDelete
  52. buy tramadol online tramadol hcl 50 mg headaches - tramadol hcl 50 mg an 627

    ReplyDelete
  53. http://landvoicelearning.com/#30896 tramadol high how many mg - tramadol hcl 50 mg warnings

    ReplyDelete
  54. cheap tramadol no prescription buy tramadol online overnight fedex - tramadol cod money order

    ReplyDelete
  55. buy tramadol online buy 180 tramadol online - canadian online pharmacy tramadol

    ReplyDelete
  56. buy tramadol tramadol hcl 50 mg addiction - tramadol for dogs people

    ReplyDelete
  57. http://landvoicelearning.com/#74967 tramadol for dogs and side effects - tramadol ultram dosage

    ReplyDelete
  58. buy tramadol legal buy tramadol online usa - tramadol tv 58

    ReplyDelete
  59. buy tramadol tramadol highest dosage - tramadol vicodin addiction

    ReplyDelete
  60. http://reidmoody.com/#49853 lorazepam ativan uses - ativan dosage seizures

    ReplyDelete
  61. http://reidmoody.com/#51208 ativan for norco withdrawal - generic ativan online

    ReplyDelete
  62. lorazepam online symptoms of ativan addiction - ativan withdrawal forum

    ReplyDelete