Author Topic: nCoder  (Read 7745 times)

0 Members and 1 Guest are viewing this topic.

Offline LD_Chimpman

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 14
  • Rating: +6/-0
    • View Profile
nCoder
« on: January 14, 2014, 05:38:35 pm »
Ever wanted to look like a secret agent hacking into top secret files?
Want to impress your friends?
Try nCoder for TI nSpire!

Boot it up and be greeted with the ability to select your desired typing speed

Continue, and witness an awesome intro scene making it look like you are hacking through a security system!

Then comes the main point of the program: simply mash random buttons on the keyboard, and actual code will appear onscreen, tricking bystanders into thinking you have some sort of black-magic typing skills. You can look more believable by using a 1:1 ratio of button presses to character outputs, or look like a typing whiz by cranking it up to 9 characters outputted per one button press.

This program is based on the awesome http://hackertyper.net/ and I give all credit to the developer of that webpage for the idea. The code that appears when you type is literally just an older version of the code for the program itself because I was too lazy to write a fake yet realistic-looking placeholder code, but if anyone feels like writing up a fake (or real) piece of code that looks like it would be used to hack into something, send it my way and I'll reformat it and implement it in the program (I might even make it so you get a random output code each time) to make it more authentic.
Hope you all find it interesting - the .tns file is attached to this post!
PROJECTS:
Slime Volleyball: 10% Complete
nFinity: 55% Complete
nCoder: 100% Complete
Jumping Squares 2: 20% Complete
Cloning Dolly: 100% Complete

Offline The_King

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 247
  • Rating: +6/-2
  • Ⓣⓗⓔ Ⓖⓐⓜⓔ ⓍⒹ
    • View Profile
Re: nCoder
« Reply #1 on: January 14, 2014, 09:13:25 pm »
know i get the plan of the game  ;)

nice work and keep it up  :thumbsup: :thumbsup: :thumbsup:

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: nCoder
« Reply #2 on: January 14, 2014, 10:37:53 pm »
Looks nice, but I wonder if it would be possible to make the text smaller so that more can fit in the screen?

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: nCoder
« Reply #3 on: January 14, 2014, 11:27:59 pm »
You might be able to pull something up from a Github repo such as this, if you aren't insistent on having only Lua sources.
(Also, use a monospaced font.)
« Last Edit: January 14, 2014, 11:28:21 pm by blue_bear_94 »
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: nCoder
« Reply #4 on: January 14, 2014, 11:29:10 pm »
Using a monospace raster font would also help. (Yeah, I know all fonts on the Nspire are raster, but I'm talking about the kind you see when you use the terminal on a computer.)

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: nCoder
« Reply #5 on: January 15, 2014, 01:26:19 pm »
Monospace font doesn't exist out of the box on TI-Nspire.
You have to hack the output, either displaying char by char, or displaying tiles by tiles with a custom font made of images.

On another note : How could we lok like a  hacker without fullscreen and with Lua code displayed ?
« Last Edit: January 15, 2014, 01:36:06 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nCoder
« Reply #6 on: January 15, 2014, 01:31:35 pm »
I agree that full screen is a must, but Lua code, Axe code, C++ code, console code or brainf*ck code, it doesn't matter, this is made to amaze noob and as long as text they don't understand is written in green on a black background, they assume you are a hacker.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline LD_Chimpman

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 14
  • Rating: +6/-0
    • View Profile
Re: nCoder
« Reply #7 on: January 15, 2014, 02:32:26 pm »
Thanks everyone for the great suggestions.

Looks nice, but I wonder if it would be possible to make the text smaller so that more can fit in the screen?
This would be an easy fix and I'm sure it would make it look cooler, I'll definitely implement this.

You might be able to pull something up from a Github repo such as this, if you aren't insistent on having only Lua sources.
Yeah I don't really care what language the code is. I actually prefer it to not be lua because it definitely looks a bit too simplistic to be real hacking software. Thanks for the link, that looks more like the kind of thing I should use; I'll try to add that in.

Using a monospace raster font would also help. (Yeah, I know all fonts on the Nspire are raster, but I'm talking about the kind you see when you use the terminal on a computer.)
Monospace font doesn't exist out of the box on TI-Nspire.
You have to hack the output, either displaying char by char, or displaying tiles by tiles with a custom font made of images.
I'm worried that having every character as an image would cause CRAZY amounts of lag when typing. What would be a good way to go about doing this? I don't have any experience with custom fonts, the extent of my knowledge for lua fonts is the vanilla "serif" and "sansserif" :P

On another note : How could we lok like a  hacker without fullscreen and with Lua code displayed ?
Fullscreen is another thing I do not have experience with. How would I implement it? It certainly would make it look better.
(and yeah I can understand that the lua code looks kind of dumb and irrelevant, but it will be replaced soon. After all, a hacker wouldn't care all that much about drawing rectangles and such)
« Last Edit: January 15, 2014, 02:36:12 pm by LD_Chimpman »
PROJECTS:
Slime Volleyball: 10% Complete
nFinity: 55% Complete
nCoder: 100% Complete
Jumping Squares 2: 20% Complete
Cloning Dolly: 100% Complete

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: nCoder
« Reply #8 on: January 15, 2014, 04:04:01 pm »
I've implemented some monospace routines that you can find in LuaTerm 2.0 http://ourl.ca/19543

Fullscreen requires some little tricks, because it's not officially supported. If you draw using the gc from platform.withGC (while being in on.paint) you can go fullscreen. On 3.1 you need to to call gc:begin(), do what you want to draw in fullscreen, and then call gc:finish(). On 3.6 the withGC trick doesn't work anymore and you have to use the 1.0 apiLevel together with the 3.1 code to be able to do it.
« Last Edit: January 15, 2014, 04:04:20 pm by Jim Bauwens »

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: nCoder
« Reply #9 on: January 15, 2014, 04:20:40 pm »
Rad idea: make it show its own source code.

Offline LDStudios

  • Coder Of Tomorrow
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 388
  • Rating: +41/-1
    • View Profile
    • LD Studios
Re: nCoder
« Reply #10 on: January 15, 2014, 04:52:59 pm »
Rad idea: make it show its own source code.

That's what it does currently xD



Offline LD_Chimpman

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 14
  • Rating: +6/-0
    • View Profile
nCoder
« Reply #11 on: January 15, 2014, 07:02:39 pm »
Rad idea: make it show its own source code.
That's what it does currently xD
Well, an outdated version of it that probably doesn't actually work.
PROJECTS:
Slime Volleyball: 10% Complete
nFinity: 55% Complete
nCoder: 100% Complete
Jumping Squares 2: 20% Complete
Cloning Dolly: 100% Complete

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: nCoder
« Reply #12 on: January 16, 2014, 07:12:46 am »
Here is a function that returns the source of the current document:

Code: [Select]
function getSource()
    return (string.dump(getSource):sub(14):gsub("-- %TI.SCRIPTAPP.*$", ""):gsub("%z", ""))
end

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: nCoder
« Reply #13 on: January 16, 2014, 07:40:21 am »
Ooh, nice, jim :)

I've tried a bit going further than the "LuaQ", some time ago, but didn't succeed ^^
(whoever tried string.dumping stuff will know what I'm talking about :P)

stupid sub(14)... :P
« Last Edit: January 16, 2014, 07:47:04 am by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: nCoder
« Reply #14 on: January 16, 2014, 11:43:40 am »
Yeah, well it's cutting the Lua header off. There are some interesting bytes in there you know ;P But as we only need the source code I have to extract just what I need.