Author Topic: HP Prime nitacku-ized (animation)  (Read 10018 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
HP Prime nitacku-ized (animation)
« on: January 12, 2014, 04:09:56 pm »
Some people might remember that Nitacku used some xLIB glitches and shortcuts to pull off incredible fade-in/out animations in his hybrid Basic games.



Well, on the HP Prime it was pretty easy to replicate one of them :D



It could be handy for an RPG battle transition. :D

Code: [Select]
EXPORT nitackuanim()
BEGIN
DIMGROB_P(G1,320,240);
BLIT_P(G1,G0);
FOR Z FROM 239 DOWNTO 0 DO
BLIT_P(G0,0,Z,320,240,G1,0,Z,320,Z);
WAIT(.125);
END;
END;
« Last Edit: January 12, 2014, 04:31:08 pm by DJ Omnimaga »

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: HP Prime nitacku-ized (animation)
« Reply #1 on: January 13, 2014, 11:48:22 am »
I made one in Axe!

Code: [Select]
.A
0 -> X
For(95)
0 -> Y
For(63)
If rand^2
Pxl-Change(X,Y
End
Y++
End
X++
End
63 -> A
While A
Rect(0,A,95,64-A
0 -> X
For(95)
!If pxl-Test(X,A-1
RectI(X,A,1,64-A
End
X++
End
DispGraph
A--
End

Easier than I thought.
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

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: Re: HP Prime nitacku-ized (animation)
« Reply #2 on: January 13, 2014, 11:52:23 am »
Now that you post this, I wish that I added some similar animation at the end of Supersonic Ball 83+ title screen. I should maybe update the game with one eventually, as well as a scrolling title background like on the HP Prime.

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: HP Prime nitacku-ized (animation)
« Reply #3 on: January 13, 2014, 11:54:19 am »
Nice to see you like it.

Oh, and everything before "63 -> A" Is unnecessary, just to give a background to fade in and out.
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: HP Prime nitacku-ized (animation)
« Reply #4 on: January 13, 2014, 02:53:22 pm »
YOu should speed up the effect for the game DJ, it seems too long to be not annoying after ~15 times.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: HP Prime nitacku-ized (animation)
« Reply #5 on: January 13, 2014, 03:40:09 pm »
The speed can be changed if someone else wanted to use this in their game, just adjust the wait command. :) I think the current speed is pretty good though personally.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: HP Prime nitacku-ized (animation)
« Reply #6 on: January 13, 2014, 03:57:46 pm »
Quick try, non-tested (admits that you want to apply the effect to the current content of the screen) :
Code: [Select]
62->A+1
While 1
Copy(-1*12+L6,+12,63-A*12)
DispGraph
End!If A--+1
« Last Edit: January 13, 2014, 03:58:36 pm by Matrefeytontias »

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: HP Prime nitacku-ized (animation)
« Reply #7 on: January 13, 2014, 04:08:54 pm »
Show-off. <_<

It's a little too fast.

EDIT: And it doesn't loop through the *whole* screen
« Last Edit: January 13, 2014, 04:10:12 pm by JWinslow23 »
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: HP Prime nitacku-ized (animation)
« Reply #8 on: January 13, 2014, 04:10:17 pm »
Quick try, non-tested (admits that you want to apply the effect to the current content of the screen) :
Code: [Select]
62->A+1
While 1
Copy(-1*12+L6,+12,63-A*12)
DispGraph
End!If A--+1
Works.
« Last Edit: January 13, 2014, 04:43:11 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: HP Prime nitacku-ized (animation)
« Reply #9 on: January 13, 2014, 04:16:59 pm »
Show-off. <_<

It's a little too fast.

EDIT: And it doesn't loop through the *whole* screen
My goal was to make it as fast as possible :P you can put a Pause right after the DispGraph.

According to Hayleia's screenshot, it does do what it's intended to do.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: HP Prime nitacku-ized (animation)
« Reply #10 on: January 13, 2014, 04:38:14 pm »
My goal was to make it as fast as possible :P you can put a Pause right after the DispGraph.
I don't see the point of making it fast, an animation has to be seen.
So I made a version that saves 8 bytes :P
Code: [Select]
0->r1
L6+768-24
For(63)
 Copy(,+12,r1+12->r1)-r1-12
 Select(,DispGraph)
End
« Last Edit: January 13, 2014, 04:44:30 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: HP Prime nitacku-ized (animation)
« Reply #11 on: January 13, 2014, 05:03:54 pm »
I saved 5 bytes to your code ;D
Code: [Select]
L6+768-24
For(63)
->r1
Copy(,+12,-(L6+768)*~1)
DispGraph
r1-12
End
Now we are going off-topic though, if someone could move that part to the Axe subforum ...

EDIT : I can save another 4 bytes by replacing ->r1 with Asm(E5) and r1-12 with Asm(E1)-12. Funny to notice that if you apply the ASM trick, you have a code that actually does something cool while not using any variable ;D  - HL abuse is nearing molestation though
« Last Edit: January 13, 2014, 05:22:58 pm by Matrefeytontias »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: HP Prime nitacku-ized (animation)
« Reply #12 on: January 13, 2014, 05:30:57 pm »
Well you can get rid of r1 by doing this
Code: [Select]
L6+768-24
For(63)
 Select(,sub(Sub))-12
End
Return
Lbl Sub
Copy(,+12,-(L6+768)*~1)
DispGraph
Return
which is exactly the same as pushing hl and popping it back as you proposed, but with a necessary procedure (because Axe doesn't like Copy inside of a Select) that makes the code save no byte (you lose the 4 bytes you earned with the call and the ret). But yeah, it doesn't use any variable now.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: HP Prime nitacku-ized (animation)
« Reply #13 on: January 13, 2014, 06:19:45 pm »
Yeah I found that too, but since it was slower and no smaller, I just did not post it.

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: HP Prime nitacku-ized (animation)
« Reply #14 on: January 13, 2014, 08:32:04 pm »
YOu should speed up the effect for the game DJ, it seems too long to be not annoying after ~15 times.
Yeah I made it at the slowest speed to show how capable it was. I personally would make it three times faster at least. However, this means I might lose the game three times more often <_<

Also yeah I agree about Copy/Conj for the Axe program. I didn't read the code much earlier but then noticed the lack of those commands. Supersonic Ball parallax scrolling uses multiple Copy commands to speed backgrounds up considerably.

What I am curious is if something like this is feasible in xLIBC...
« Last Edit: January 13, 2014, 08:32:55 pm by DJ Omnimaga »