Author Topic: Interesting effect... if it worked.  (Read 7015 times)

0 Members and 1 Guest are viewing this topic.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Interesting effect... if it worked.
« on: September 13, 2010, 11:11:38 am »
Code: [Select]
:.TEST
:<data>
:1->A->B
:ClrDraw
:Repeat getKey(15)
:Pt-Off(B/12,A/12,Pic1
:Pt-Off(B/18,A/18,Pic1+8
:Pt-Off(B/24,A/24,Pic1+16
:DispGraph
:ClrDraw
:C-getKey(2)+getKey(3)->C
:D-getKey(4)+getKey(1)->D
:B+C->B
:A+D->A
:End

My sprites don't appear. Why is this?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: Interesting effect... if it worked.
« Reply #1 on: September 13, 2010, 11:18:13 am »
I think that is doesn't work because you use Pt-Off, and not Pt-On. Pt-Off will just only turn off the pixels which are black on the sprite, nad not turn on the pixels that are white on the sprite. perhaps u could use the combination of Pt-On( and RectI( ? like this:
Code: (Axe) [Select]
:.TEST
:<data>
:1->A->B
:ClrDraw
:Repeat getKey(15)
:Pt-On(B/12,A/12,Pic1
:RectI(B/12,A/12,8,8
:Pt-On(B/18,A/18,Pic1+8
:RectI(B/18,A/18,8,8
:Pt-On(B/24,A/24,Pic1+16
:RectI(B/24,A/24,8,8
:DispGraph
:ClrDraw
:C-getKey(2)+getKey(3)->C
:D-getKey(4)+getKey(1)->D
:B+C->B
:A+D->A
:End
everytime that I was down, you would always come around, and get my feedback on the ground. (modified part from 'Seasons in the sun')

No matter how many errors are bothering you, always try to stay rel-Axe!

The HoMM project will be resumed as soon Axe 1.0.0 will be released!
Projects:
Code: [Select]
HoMM:   [==--------]    Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :P
tiDE:   [----------]    Explored and understood the main part of the code: just started writing a Tokenizer.



password of the week: uvanapererubupa (Any pronunciation is the right one ;) )   :D click me, and you'll be raided :D

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Interesting effect... if it worked.
« Reply #2 on: September 13, 2010, 11:32:21 am »
Didn't work. I believe it's erasing too fast.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Interesting effect... if it worked.
« Reply #3 on: September 13, 2010, 11:33:40 am »
I think that is doesn't work because you use Pt-Off, and not Pt-On. Pt-Off will just only turn off the pixels which are black on the sprite, nad not turn on the pixels that are white on the sprite.
Actually, Pt-Off is Replace logic.

At any rate, I think the problem is this code:
Code: [Select]
:C-getKey(2)+getKey(3)->C
:D-getKey(4)+getKey(1)->D

I think what you meant to do is:
Code: [Select]
:getKey(3)-getKey(2)->C
:getKey(1)-getKey(4)->D

Since C and D were uninitialized, they held random (probably very large) values that are added to B and A each frame.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Interesting effect... if it worked.
« Reply #4 on: September 13, 2010, 11:43:36 am »
But, wouldn't that cause whatever boolean value to by stored, not incremented?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Interesting effect... if it worked.
« Reply #5 on: September 13, 2010, 11:44:34 am »
But, wouldn't that cause whatever boolean value to by stored, not incremented?

Oh, so that is what you wanted to do? In that case, the solution is to initialize C and D to 0 (or whatever else you want them to start at)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Interesting effect... if it worked.
« Reply #6 on: September 13, 2010, 11:48:14 am »
Hmm... still doesn't produce the effect I want. How would I make the sprite 'wisp'-like? With the circles closely following the main sprite?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Interesting effect... if it worked.
« Reply #7 on: September 13, 2010, 11:56:16 am »
Hmm... still doesn't produce the effect I want. How would I make the sprite 'wisp'-like? With the circles closely following the main sprite?
I don't quite understand what this effect is supposed to be. What are the "circles"?
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Interesting effect... if it worked.
« Reply #8 on: September 13, 2010, 12:22:53 pm »
The wisp is supposed to be kind of tight. And while applying physics to the biggest circle, the other circles will follow suit and create a tail behind the main sprite.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Interesting effect... if it worked.
« Reply #9 on: September 13, 2010, 01:09:03 pm »
Hmm... The way I would approach it is creating an array of the positions of the big circle over the last n frames (12 frames, for example). Then display the medium-sized circle at the position from 6 frames ago and the small circle at the position from 12 frames ago. I might try to get some code running myself when I get some time to play with Axe.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Interesting effect... if it worked.
« Reply #10 on: September 13, 2010, 01:43:02 pm »
Hmm... The way I would approach it is creating an array of the positions of the big circle over the last n frames (12 frames, for example). Then display the medium-sized circle at the position from 6 frames ago and the small circle at the position from 12 frames ago. I might try to get some code running myself when I get some time to play with Axe.

This is exactly what you need.  What you are doing right now is not going to produce the effect you desire.  You have your coordinates, and then you have several other circles at different offsets, but they have no delay needed for the wisp effect you want.  Since they are all offsets of the same coordinates, they will all move at the same time

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Interesting effect... if it worked.
« Reply #11 on: September 13, 2010, 02:29:26 pm »
I got some working code :D

Code: [Select]
:[3844828282443800->Pic1
:[0038444444380000
:[0000382838000000
:0->A->B->C->D->{L1}r
:Fill(L1,23
:Repeat getKey(15)
:ClrDraw
:Pt-On({L1+22},{L1+23},Pic1
:Pt-On({L1+12},{L1+13},Pic1+8
:Pt-On({L1},{L1+1},Pic1+16
:DispGraph
:Copy(L1+2,L1,22
:C-getKey(2)+getKey(3)->C+A->A/32->{L1+22}
:D-getKey(4)+getKey(1)->D+B->B/32->{L1+23}
:End
"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: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Interesting effect... if it worked.
« Reply #12 on: September 13, 2010, 02:57:09 pm »
That looks quite nice actually ;D
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: Interesting effect... if it worked.
« Reply #13 on: September 13, 2010, 03:32:17 pm »
yes, I like it!
everytime that I was down, you would always come around, and get my feedback on the ground. (modified part from 'Seasons in the sun')

No matter how many errors are bothering you, always try to stay rel-Axe!

The HoMM project will be resumed as soon Axe 1.0.0 will be released!
Projects:
Code: [Select]
HoMM:   [==--------]    Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :P
tiDE:   [----------]    Explored and understood the main part of the code: just started writing a Tokenizer.



password of the week: uvanapererubupa (Any pronunciation is the right one ;) )   :D click me, and you'll be raided :D

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: Interesting effect... if it worked.
« Reply #14 on: September 13, 2010, 03:43:21 pm »
Nice job!  That's a really cool effect. :)