As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label nInvaders. Show all posts

Last night after going to bed, I made a decision to move all pots back out to the external window sill in the back. Ive noticed the tomato plants growing nicely and sturdy comparing to the indoors, which barely to grow true leaves. Also, bean plants are thin and leggy.

Its time to change and let nature take its course. Last summer, the typhoon one after another, one particular tomato plant caught my attention which has been struck twice. First time, it lost many branches which was flower; second time, the main stalk was just barely alive, which lasted for a while until it slowly died back.

I thought that was the end of that plant, then I saw a new green growth for about 30cm, which shot out just about 5cm above the soil level from the dying stem, it was when I knew they could take care of themselves and its still growing in this cold January.

All pots and containers are out and I have transplanted the celery bottom with other celery plants, onion bottom into three pots since that onion bottom gives me three new plants. Also four snow peas and one azuki bean, plus one garlic. In addition, I planted another garlic and two shallots.

Unfortunately, I have to declare losses on the pepper toppings, nothing rooted. I used the bottle to plant a golden pothos for the entrance of my room.

What else did I do today?

  • Cardboards, I upgraded the cats bed, its cozy and dim; also built a cell for catching heat exhaust of dehumidifier.
  • I wiped some windows, probably need to go over again with dry towel.
  • Forked nInvaders to fix a critical bug that had existed for more than a decade, that means those who has played it never questioned why its so difficult to win, dont think its even possibly to pass first level.

nInvaders is a Space Invader clone, was made more than a decade ago, still runs even without any updates or patches for nearly 13 years.

https://lh3.googleusercontent.com/-VqnOn66mxv8/Vp1_Fax1veI/AAAAAAAAI-E/0LojE98PWLI/s800-Ic42/ninvaders.gif

Actual speed as recorded

Not sure if its by design or just outdated code, you will need to defeat the invaders in less than 20 seconds, which I dont believe thats plausible. Therefore, I edited the code, watch this video from 30 mark:

  • Time dilation devide: nInvader.c:L33 s/50/10/

  • Invisible Laser Destroyer: playerReloadMissile.c:L179 s/if/while/

  • Secret spell: UUDDLRLRBA

    #!/bin/bash
    
    echo -e '\e[31;1m*** CHEAT MODE ENABLED ***\e[0m'
    echo -e '- \e[34;1mTime dilation deviced\[0m    : \e[1;32mON\e[0m'
    echo -e '- \e[34;1mInvisible Laser Destroyer\[0m: \e[1;32mUPGRADED\e[0m'
    

Note

Turns out, its a 13-year-old bug, and everyone had played it without knowing it or even questioning it. Ive forked it and patched the bug, you can get the updated nInvaders. (2016-01-21T08:29:10Z)

It has one command-line option for changing difficulty level, -l 0 for NIGHTMARE level and -l 9 for the easiest setting. There is also two builtin cheats, L for one more life and W to skip the level.

nInvaders was created by Thomas Dettbarn in 2002, written in C with ncurses under the GPLv2, currently version 0.1.1 (2003-05-08).