Author Topic: First non-TI-BASIC game on TI-Nspire OS 3.0  (Read 29127 times)

0 Members and 1 Guest are viewing this topic.

Offline BrownyTCat

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 420
  • Rating: +37/-8
    • View Profile
Re: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #15 on: April 13, 2011, 10:29:09 am »
I have intermediate Lua knowledge, so this could be fun.  :hyper:

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #16 on: April 13, 2011, 12:07:08 pm »
Quote
I'm afraid TI won't make a SDK, since we have behaved badly, we hacked their new calculator in just a few hours and are already making games (I give critor and all the other guys the merit for this though, while saying 'we').

I'm pretty sure that TI made a SDK before just to make money.  They only gave SDKs for free when not many people were using them.
« Last Edit: April 13, 2011, 12:07:55 pm by Hot_Dog »

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #17 on: April 13, 2011, 12:17:55 pm »
Well this is awesome. I'm sure the TI developers bets on how fast we find the stuff they hide on their calcs. :P

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #18 on: April 13, 2011, 12:21:34 pm »
Boo-Yah! If I ever get an Nspire, I'm definitely going to learn Lua.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #19 on: April 13, 2011, 12:32:42 pm »
Well this is awesome. I'm sure the TI developers bets on how fast we find the stuff they hide on their calcs. :P
If they know about Omnimaga (and the other calc sites), I'm pretty sure they do. :P

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #20 on: April 13, 2011, 03:23:24 pm »
Wow, this looks incredible.  Major props to Goplat and all involved; this is amazing. ;D

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: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #21 on: April 13, 2011, 03:29:34 pm »
I wouldn't be surprised if eventually TI tried to sell us a Lua SDK. Hopefully the community can either write one or a program to convert txt files to a TI-Nspire lua compatible format.

By the way I added a screenshot on the first post. I captured from the TI-Nspire software, but it's a CX screenshot, not regular TI-Nspire.

Offline Goplat

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 289
  • Rating: +82/-0
    • View Profile
Re: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #22 on: April 13, 2011, 03:44:44 pm »
Here's how I made the .tns file:

  • Create a blank document
  • Create a Problem1.xml file, containing the following (without any line breaks, except in the script itself):
    <?xml version="1.0" encoding="UTF-8" ?><prob xmlns="urn:TI.Problem" ver="1.0" pbname=""><sym></sym><card clay="0" h1="10000" h2="10000" w1="10000" w2="10000"><isDummyCard>0</isDummyCard><flag>0</flag><wdgt xmlns:sc="urn:TI.ScriptApp" type="TI.ScriptApp" ver="1.0"><sc:mFlags>0</sc:mFlags><sc:value>-1</sc:value><sc:script>Lua script goes here (with appropriate character entities replacing the five characters < > " ' &)</sc:script></wdgt></card></prob>
  • Use 7-zip to create a zip file containing Problem1.xml
  • Concatenate the beginning of the blank document, up to the end of Document.xml (at offset 0x170), with the zip file. (OS 3.0 requires Document.xml to be encrypted, but thankfully Problem*.xml can still be unencrypted.)
« Last Edit: April 13, 2011, 03:48:45 pm by Goplat »
Numquam te deseram; numquam te deficiam; numquam circa curram et te desolabo
Numquam te plorare faciam; numquam valedicam; numquam mendacium dicam et te vulnerabo

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: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #23 on: April 13, 2011, 03:47:42 pm »
Oh wow nice, could you elaborate on number 4, though? To me it seems kinda like Chinese because I never messed with advanced zipping options before x.x

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #24 on: April 13, 2011, 03:48:44 pm »
DJ: concatenating the two documents can be done by copying and pasting, using a hex editor such as XVI32 :)
Open the blank TNS document with the hex editor; open the zipped problem1.xml; copy the entire contents of the latter to the clipboard; paste at the end of the former; save the former.

Goplat: thanks for the explanations :)
It's even simpler than I thought.
« Last Edit: April 13, 2011, 03:50:13 pm by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #25 on: April 13, 2011, 03:49:02 pm »
O.O that looks actually pretty easy :)
Thanks for sharing this!
I'm not a nerd but I pretend:

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: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #26 on: April 13, 2011, 03:51:23 pm »
Yeah but where do you do the concatenation? Do you just open the empty document file in notepad then paste its content at the end/beginning of the XML file? Or do we absolutely need an hex editor? Maybe it would be nice to have a tutorial describing every step in detail for the average computer-illiterate person, in the forum help section.

It's still nice that it can already be done without having someone write an entire IDE or something, though. Congrats to everyone for having found out about Lua on the Nspire.

EDIT: Nvm my first paragraph, I didn't see your edit.
« Last Edit: April 13, 2011, 03:52:02 pm by DJ_O »

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #27 on: April 13, 2011, 03:59:47 pm »
This is real cool!

I hope we will start seeing nice programs in Lua for the nSpire's :)
« Last Edit: April 13, 2011, 04:00:15 pm by jimbauwens »

Offline GB

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 147
  • Rating: +15/-3
  • Use Microhard WindOS today!
    • View Profile
    • MICROHARD CORPORATION
Re: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #28 on: April 13, 2011, 05:41:54 pm »
We still gotta find some way to run Ndless though. I doubt it'll be easy to create another nDoom or Gameboy emulator in Lua.
TI-86 USER
CASIO PRIZM USER
TI-NSPIRE USER
TI-84 PLUS SILVER EDITION USER
TI-83 PLUS USER

PROJECTS:

Microhard Paint
http://www.omnimaga.org/index.php?topic=11915.0

TI-Nspire Character Map
http://www.omnimaga.org/index.php?topic=7725.msg142555#msg142555

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: First non-TI-BASIC game on TI-Nspire OS 3.0
« Reply #29 on: April 13, 2011, 05:44:23 pm »
Yeah I agree. However Lua opens the Nspire to more programmers. Many people can't stand C and ASM difficulty (probably the reason why there are so few Nspire coders despite the large amount of Nspire users around here)