Author Topic: Hyperspin joystick anamation  (Read 669 times)

KTURNER

  • Sr. Member
  • ****
  • Posts: 110
    • View Profile
Hyperspin joystick anamation
« on: August 08, 2017, 08:25:43 AM »
Is there a trick to get the joystick animations for Hyperspin to show up on the layouts.

mc2programmer

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Hyperspin joystick anamation
« Reply #1 on: August 15, 2017, 04:35:15 PM »
So I tried to load some .swf (flash) joystick animations into AM, and they did load however the colors were all messed up and I figured it may have been do to the still limited flash support. So what I did was created a sprite sheet from my flash file and added the sprite animation to my theme. Depending on what joystick animation you are using you might just be able to add the swf and it might play just fine. if not here is some sprite code if you want to go that route.



// Attempt for joystick animation sprite sheet
//sprite animation - use a spritesheet to animate specific frames of the sprite sheet
local joystick_up = fe.add_image("joysprite.png", (fe.layout.width / 2) - 480, fe.layout.height - 180, 300, 200);
local sprite_cfg = {
    when = When.Always,
   orientation = "vertical",
   height = 116,
    width = 242,
    frame = 0,
    time = 1000,
    order = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
    repeat = "yoyo",
   loop = true
}
animation.add( SpriteAnimation( joystick_up, sprite_cfg ) );


keep in mind depending on your sprite sheet the setting will be a bit different

howlerbr

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Hyperspin joystick anamation
« Reply #2 on: August 15, 2017, 06:14:30 PM »
that's way too cool, I liked it. Where do I find the documentation for other animation options for sprites? In squirrel-lang site? I couldn't find anything

KTURNER

  • Sr. Member
  • ****
  • Posts: 110
    • View Profile
Re: Hyperspin joystick anamation
« Reply #3 on: August 16, 2017, 11:38:11 AM »
Wow thanks! This is way over my head but I would love to learn it. I'm going to play around with it. What's weird is when I first reinstalled windows 7 they were showing up. The layouts had white bars across them and were all jacked up but the joysticks were there. I downloaded the latest graphics drivers and fixed the issue but the joysticks are gone.

jedione

  • Sr. Member
  • ****
  • Posts: 310
  • punktoe
    • View Profile
Re: Hyperspin joystick anamation
« Reply #4 on: August 16, 2017, 06:41:37 PM »
repeat = "yoyo",

what code is this iv never seen this?
thought it was

repeat = "true",
repeat = "false",
help a friend....

mc2programmer

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Hyperspin joystick anamation
« Reply #5 on: August 18, 2017, 11:51:30 PM »
the code is solid... to give a little bit more light on the subject I would first try just loading any joystick .swf file that you like in the layout.nut file forgot how to code it, but I think it is just like loading any other image just set it to the swf file. If that doesn't work for you ie the swf wont load or it doesn't look right in attract-mode look for a swf or flash to sprite sheet creator. create a single sprite sheet of the joystick animation. then use the code I posted to do a sprite animation. You will have to tweek the settings depending on your spritesheet.... I had to use yo-yo on mine as the animation goes down then up then down to complete the animation some may start left to right or some other pattern takes a bit of trial and error to get the setting, but not too hard. when you load the animation first thing is just to get the joystick in frame then it may 'Jump' a bit just mess with the corresponding setting still it looks right.
 

mc2programmer

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Hyperspin joystick anamation
« Reply #6 on: August 18, 2017, 11:53:11 PM »
oh I think the documentation for this is in the animation module... can not remember though.

repeat = the pattern to repeat "yoyo" in my case
loop = true to do what you are thinking?



ok did some digging
https://github.com/mickelson/attract/blob/master/config/modules/spritesheet.nut


maybe liquid8d can chime in... but that shows settings for repeat
« Last Edit: August 19, 2017, 12:30:25 AM by mc2programmer »

mariano198596

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Hyperspin joystick anamation
« Reply #7 on: September 19, 2017, 07:05:32 AM »
if you use adobe after effects 12 and set the output flv + alpha range and raising all quality to maximum not nearly lost. I probe it and it works perfect. I leave you the capture of the config


KTURNER

  • Sr. Member
  • ****
  • Posts: 110
    • View Profile
Re: Hyperspin joystick anamation
« Reply #8 on: September 19, 2017, 02:13:35 PM »
Thanks for all the help but I have no Idea how to use this stuff.