Author Topic: Routines  (Read 314103 times)

0 Members and 1 Guest are viewing this topic.

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: Routines
« Reply #75 on: March 06, 2010, 08:59:58 pm »
Aaaah ok. Well if these commands are ignored on the 83 I guess it's fine, since then the game would still run on them, just slower ^^

Btw Quigibo told me there would be another method for my pixelation animations, but apparently it's much more complicated to perform, for my current Axe skills. He is still trying to figure out how to do it, but it would involve manipulating the screen RAM directly.

For now I think I'll stick to my current methods tho XD

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Routines
« Reply #76 on: March 06, 2010, 11:30:02 pm »
Quigibo, I have a question. Currently, when you store to an address, the value of the expression becomes the address. Is this behavior ever planned to change, or can I safely use it for optimization?
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Routines
« Reply #77 on: March 07, 2010, 12:29:50 am »
umm... do you mean the value of the address becomes the expression?  I think the other way around is the expected behavior, no?

I'm pretty confident this won't change.  I know that I might in the future add something to store 16 bit numbers into 2 consecutive bytes, but I think that will use a different syntax anyway.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Routines
« Reply #78 on: March 08, 2010, 09:02:21 pm »
umm... do you mean the value of the address becomes the expression?  I think the other way around is the expected behavior, no?

I'm pretty confident this won't change.  I know that I might in the future add something to store 16 bit numbers into 2 consecutive bytes, but I think that will use a different syntax anyway.
I meant that if you do 1->{L6}, the result (to be used by further operations) will be L6.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Routines
« Reply #79 on: March 08, 2010, 09:06:49 pm »
That's what I thought.  So yes, you can use that optimization.  So you can do things like 2->{1->{L6}+1} but the code can get pretty crazy looking really fast.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Routines
« Reply #80 on: March 08, 2010, 09:10:56 pm »
Also, I made an implementation of the Collatz Conjecture, inspired by a recent XKCD comic:
Code: [Select]
:9001->A
:Disp A>Dec,i
:Repeat A=1 or getKey
:If A^2
:A*3+1->A
:Else
:A/2->A
:End
:Disp A>Dec,i
:End
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Routines
« Reply #81 on: March 08, 2010, 09:13:29 pm »
Another XKCD fan!  :)   I read it regularly as well.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Routines
« Reply #82 on: March 08, 2010, 09:25:36 pm »
Another thing, Quigibo, I think you should note somewhere in your documentation that operations are evaluated left-to-right. Also, some of the example expressions in your optimization guide assume full order of operations.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

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: Routines
« Reply #83 on: March 08, 2010, 11:58:33 pm »
I don't follow XKCD much because I tried in the past and english as a second language prevented to get most of the jokes :(

The only ones I get are some of the 4chan memes references :(
« Last Edit: March 08, 2010, 11:58:47 pm by DJ Omnimaga »

Offline Galandros

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1140
  • Rating: +42/-10
    • View Profile
Re: Routines
« Reply #84 on: March 14, 2010, 10:50:55 am »
I don't follow XKCD much because I tried in the past and english as a second language prevented to get most of the jokes :(

The only ones I get are some of the 4chan memes references :(
I can get most jokes. I need to see again some to understand later (like the Rickroll one)

I don't follow xkcd closely but sometimes I see at random.

btw this is what calcmaniac referred http://xkcd.com/710/
Hobbing in calculator projects.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Routines
« Reply #85 on: March 16, 2010, 12:49:46 pm »
Ok i have just finished my all new and super special awesome smoothscrolling tilemapper.  It supports scrolling anywhere from 1 to 8 pixels at a time, and could be expanded for vertical scrolling with not too much difficulty.  It uses the scrolling commands and then fills in the empty spaces made with new sprites.


Offline trevmeister66

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1009
  • Rating: +14/-5
    • View Profile
Re: Routines
« Reply #86 on: March 16, 2010, 01:04:20 pm »
Wow Builderboy, that is sweet, and really fast. Great work!
Projects:    nameless RPG: 1.0%  |  Reverse Snake v1.5: 100%  |  Secret Project: 5%  |  DUNGEON: 70%

My MW2 Blog <-- Please visit :)

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: Routines
« Reply #87 on: March 16, 2010, 02:36:29 pm »
Lol nice and fast, and if you scroll way too far, then you no longer need a pixel artist to draw 8x8 monsters, or even some tiles in particular for a RPG/adventure game, as they'll be generated for you :P

Also I didn,t knew you could do

[FFFFFFFFFFFFFFFF
F0F0F0F0F0F0F0F0]->Str1

instead of
[FFFFFFFFFFFFFFFF->Str1
[F0F0F0F0F0F0F0F0

Is it the exact same thing?
« Last Edit: March 16, 2010, 02:37:53 pm by DJ Omnimaga »

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: Routines
« Reply #88 on: March 16, 2010, 05:55:27 pm »
Yup, that's the same thing. :)

Looks nice Builderboy! ;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: Routines
« Reply #89 on: March 16, 2010, 11:29:17 pm »
Thanks, should make my source slightly smaller if I got many sprites