Author Topic: Undo  (Read 20263 times)

0 Members and 1 Guest are viewing this topic.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Undo
« Reply #60 on: February 27, 2011, 06:08:15 pm »
Oh ya...I forgot sub( can be used on numbers :P I'm always just used to using it on strings haha.
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 #61 on: February 27, 2011, 06:19:04 pm »
No problem. It's not always the best optimization to use sub(, since it's 2 bytes, but in an equation, it can work quite nicely.
« Last Edit: February 27, 2011, 06:19:18 pm by FinaleTI »


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.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Undo
« Reply #62 on: February 28, 2011, 02:09:54 pm »
So Idecided to make a basic routine for doing the undo process. I'll type it up when I get home, currently at school waiting for class to start. I don't know how you were compressing your data so I just created my own way.

Edit:
Here is the example I made.
Code: [Select]
ZStandard
104→Xmax
72→Ymax
ZInteger
ClrDraw
For(A,0,31
Horizontal A
End
"L1(A→u
{100621062,301030,10059.1,20359.1,30759.1,110027.1,120327.1,130727.1,201059.1,201027.1,56.2,156.2,107252.3→L1
For(A,1,dim(L1
iPart(E2fPart(u/E2→Z
iPart(E2fPart(u/E4→X
fPart(u→C
If .1=Ans
Then
iPart(10fPart(u/E5→B
iPart(u/E5
If not(Ans
Pt-On(X,Z,B
If 1=Ans
Pt-Off(X,Z,B
If 2=Ans
Pt-Change(X,Z
End
If .2=C
Then
If X
Horizontal Z
If not(X
Vertical Z
End
If .3=C
Circle(X,Z,iPart(E2fPart(u/E6)),{i
If not(C
Line(iPart(E2fPart(u/E8)),iPart(E2fPart(u/E6)),X,Z,iPart(u/E8
End

Every time in that code that you see a capital letter "E" it is the scientific notation "E" and "L1" means L1. Also, I'll go over how I compressed the data:

If a element does not have a decimal part it is a Line( command, .1 is a Pt-On/Off/Change command, .2 is a Vertical or Horizontal command, and .3 is a Cirlce( command.

For Line(:
-Nine total stored numbers.
--First one is for it is drawing (1) a line or erasing (0).
--The next eight are the X1, Y1, X2, and Y2 coordinates (in groups of two), respectfully.

For Pt-On/Off/Change:
-Six total stored numbers:
--First one says what kind of command it is (Pt-On (0), Pt-Off (1), or Pt-Change (2)).
--Second number says what kind of point (dot (1), square (2), or cross (3)) (Only used for Pt-On and Pt-Off).
--The next for are the X- and Y-coordinates (in groups of two), respectfully.

For Horizontal and Vertical:
-Three total stored numbers:
--First one says what command it is (Horizontal (1) or Vertical (0)).
--The next two are the coordinate used (one two digit number).

For Circle(:
-Six total stored numbers:
--The first is the radius of the circle to be made (one two digit number).
--The next four are the X- and Y-coordinates (in groups of two), respectfully.

So, if you put the zeros back in the list would look like this:
{100621062,000301030,010059.1,020359.1,030759.1,110027.1,120327.1,130727.1,201059.1,201027.1,056.2,156.2,107252.3}

Hopefully that all makes sense. Also, I'm sure there are some optimizations that could be made to that, I just made it real fast for the sake of an example so wasn't really trying to optimize.
« Last Edit: February 28, 2011, 05:22:35 pm by meishe91 »
Spoiler For Spoiler:



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

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Undo
« Reply #63 on: February 28, 2011, 11:41:20 pm »
*cough*Bump*cough*
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 #64 on: March 01, 2011, 12:14:39 am »
Um, gee, I appreciate the effort, but I already have code. I have 3 vars, V,X,theta (because ClrDraw screws up Y). They're compressed into one list element at the end of the loop, and a single var, L, is used as a flag denoting which set of coords the program is on for LineOn/Off and Circle, and the First set of coords is stored in L1. V is the command number, in order from 1 to 8: Pt-On/Off/Change Line(On/Off) Circle Horizontal Vertical.
And that's the most documentation on this program ever.
« Last Edit: March 01, 2011, 12:47:01 am by Freyaday »
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 #65 on: March 01, 2011, 12:18:33 am »
Ah, well I made it because I was bored and you said you just had to think of a way to implement it so I figured what the hell. However I'm not going to lie, your description confuses the hell out of me :P Could you possibly post some code or try rephrasing or something? Glad you got code though.
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 #66 on: March 01, 2011, 12:43:57 am »
What do you find confusing?
I have a character limit on my posts right now, which is why I'm not posting code at the moment.
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 #67 on: March 01, 2011, 12:56:00 am »
You're whole process really.

There is a character limit? O.o
Spoiler For Spoiler:



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

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Undo
« Reply #68 on: March 01, 2011, 01:25:35 am »
Weird, posts are limited to 50000 characters I think, which should be more than enough to post code. Otherwise you could simply use pastie.org or something.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

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 #69 on: March 01, 2011, 01:32:32 am »
The low char limit's just for me, 'cause I'm special. (I'm posting from my PSP.)
But seriously, unless I know what doesn't make sense, I can't fix it so that it does make sense.
« Last Edit: March 01, 2011, 01:34:40 am by Freyaday »
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 AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Undo
« Reply #70 on: March 01, 2011, 01:34:29 am »
Surely there's specific code responsible for each element of your program and you've identified which elements aren't working?
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

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 #71 on: March 01, 2011, 01:39:33 am »
Oh, no. Everything's working fine. I'm trying to create an efficient undo feature to replace my current save/load system.
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 DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Undo
« Reply #72 on: March 01, 2011, 01:47:36 am »
The low char limit's just for me, 'cause I'm special. (I'm posting from my PSP.)
But seriously, unless I know what doesn't make sense, I can't fix it so that it does make sense.
Oh ok, I see about the char limit.

Also when you can, could you check your forum inbox at http://www.omnimaga.org/index.php?action=pm ? Because I noticed some of your posts have questionable content (by Omnimaga T.O.S standards)
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Undo
« Reply #73 on: March 01, 2011, 02:34:14 pm »
Ah ok, I thought it might be something like that but wasn't sure (about the character limit).

But like I said its really your whole description. I mean it's just confusing how you're storing variables and what does what. Not trying to sound rude, it just isn't clicking in my head. (That's why I asked for code possibly to see if I could figure it out that way.)
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 #74 on: March 01, 2011, 05:18:13 pm »
Oh, ok. I'll try to explain it better.
There are 4 variables:
V, which is the command number
X, the current X coord
theta, the current Y coord
L, a flag that indicates which pair of coords is being entered. It is used for all of the two coord commands
And L1, which stores the first pair of coords when a 2 coord command is being entered.
Elucidification:
coord=coordinate
« Last Edit: March 01, 2011, 05:22:43 pm by Freyaday »
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!