Author Topic: Undo  (Read 22797 times)

0 Members and 4 Guests are viewing this topic.

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: Undo
« Reply #45 on: February 27, 2011, 01:06:26 pm »
Thankfully, I have one of the old calcs with 128KB mem. But a 95*63 Change counter is missing a crucial element: What commands changed that pixel.
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 program4

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 158
  • Rating: +15/-0
    • View Profile
Re: Undo
« Reply #46 on: February 27, 2011, 01:38:32 pm »
I'm not sure I understand what you mean, but can't you just store the last commands as a number? For example, if the command to draw a line is assigned a value of 1, you could store the element 1 to a list, and when you undo the action, the program reads 1 and does the opposite (erases the line).

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Undo
« Reply #47 on: February 27, 2011, 01:40:16 pm »
The tricky thing is that if you draw a line or a rectangle or whatever, you are going to overwrite something else, and by simply erasing it, you won't be undoing it

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: Undo
« Reply #48 on: February 27, 2011, 02:02:33 pm »
Exactly. Now we've come full circle.
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 meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Undo
« Reply #49 on: February 27, 2011, 02:03:25 pm »
Quick question, you said that this program has three or four eight set in tools to use to draw right? What are they?

Edit:
Sorry if this has already been asked, if it has I missed it.

Edit:
The reason I'm asking is because I can see two, feasible, possibilities for a TI-BASIC undo button.

1. Each time you use a command you store the coordinates needed and the type of action it was (I personally would store the coordinates and then make the type of action a different decimal place for each one) and when you run out of elements, if you do, just archive the current one and overflow into a new list. Then when you use the undo button you simply clear the screen and redraw it by using the stored coordinates and commands. Slower, yes, but would probably be the best option if you want as many undoes as you can.

2. After each command you store the image to a different picture variable, then when the click undo it just clears the screen and recalls the previous saved image. This is probably the fastest but as people have said you're only limited to ten (unless you use the hacked picture variables but I'd advise against that for something like this).

There are other ways you can do it but they are way over kill and very convoluted. And also would be way harder to code.
« Last Edit: February 27, 2011, 02:48:26 pm by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

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: Undo
« Reply #50 on: February 27, 2011, 03:18:18 pm »
Pt-On/Off/Change, Line(On/Off), Fast Circle, Horizontal, Vertical. And no, that question hasn't been asked yet.
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 meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Undo
« Reply #51 on: February 27, 2011, 03:33:05 pm »
Ah ok, Well then that actually makes the first option I gave a lot easier and potentially faster than I thought it would be.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

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: Undo
« Reply #52 on: February 27, 2011, 03:41:55 pm »
Appearently, great minds think alike, because that's what I'm doing already.  That compromise idea is starting to look pretty good now. I just have to figure out how to implement it.
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 meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Undo
« Reply #53 on: February 27, 2011, 03:48:00 pm »
It actually would be pretty simple to implement, especially if you're only going to make it a one list cap on the amount of content.

Edit:
Also depending on how you store your data, but it still should be easy.

Edit:
What Window settings are you using? (Xmin=0, Xmax94, Ymin=-62, Ymax=0?)
« Last Edit: February 27, 2011, 04:05:18 pm by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

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: Undo
« Reply #54 on: February 27, 2011, 04:43:20 pm »
No, Y[0,62]. That way I can add it E-2 to the X coordinates.
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 meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Undo
« Reply #55 on: February 27, 2011, 05:29:33 pm »
What do you mean? Like I understand the y-value thing, just not the thing about the x-coordinates.
« Last Edit: February 27, 2011, 05:30:54 pm by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

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: Undo
« Reply #56 on: February 27, 2011, 05:32:55 pm »
The formula I'm using is 100V+X+.01Y
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 phenomist

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 132
  • Rating: +46/-3
    • View Profile
Re: Undo
« Reply #57 on: February 27, 2011, 05:37:49 pm »
BTW, for a 95x63 matrix, store it as 10 pictures, considering that you can restrict yourself where each entry has a integer maximum of 1000.
If I recall this costs somewhere around 7600 bytes.

Of course, if you don't expect the user to paint the same pixel hundreds of times, you can reduce the number of pictures.


Previous example rehashed:

Onscreen
OOOOO
*O*O*
**O**
*O*O*
OOOOO

In layer 1
*OOO*
*O*O*
*****
*O*O*
*OOO*

In layer 2
O***O
*****
**O**
*****
O***O

if a pixel is written over 3 times, then it will be in both layer 1 and layer 2; if 4 times, layer 4, etc.
« Last Edit: February 27, 2011, 05:38:43 pm by phenomist »
Level Designer for Graviter

[Disclaimer: I can't program for my life.]

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Undo
« Reply #58 on: February 27, 2011, 06:02:16 pm »
The formula I'm using is 100V+X+.01Y

What formula is that? (By the way, it can be one byte smaller if you do VE2+X+.01Y.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Undo
« Reply #59 on: February 27, 2011, 06:05:46 pm »
The formula I'm using is 100V+X+.01Y

What formula is that? (By the way, it can be one byte smaller if you do VE2+X+.01Y.
And a byte smaller if you do VE2+X+sub(Y.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.