Animated Characters from External Source
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Animated Characters from External Source
Hi,
if I make my own animated characters using external animation software,what is the best way to play them in a Livecode generated game? I remember that when Livecode was still Runtime Revolution, I tried importing animated GIFs and this made my program freeze on older processors; besides GIFs RunRev seemed to support only Quicktime, no Flash, AVI or any other video/animation format, so I gave up and quit ...
thank you ...
if I make my own animated characters using external animation software,what is the best way to play them in a Livecode generated game? I remember that when Livecode was still Runtime Revolution, I tried importing animated GIFs and this made my program freeze on older processors; besides GIFs RunRev seemed to support only Quicktime, no Flash, AVI or any other video/animation format, so I gave up and quit ...
thank you ...
Re: Animated Characters from External Source
Hi archimede,
unfortunaltey animated GIF is still the only "animation" format compatible with LC.
But nowadays LC will accept all video formats that your operating system can play like MP4.
Best
Klaus
unfortunaltey animated GIF is still the only "animation" format compatible with LC.
But nowadays LC will accept all video formats that your operating system can play like MP4.
Best
Klaus
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Animated Characters from External Source
Not quite . . .
You can export frames from an animated GIF in PNG format and then set them as the backGroundPattern
to a rectangular graphic set the the size of the animation frames.
-
You can export frames from an animated GIF in PNG format and then set them as the backGroundPattern
to a rectangular graphic set the the size of the animation frames.
-
- Attachments
-
- Fairy.livecode.zip
- Here's the stack.
- (6.88 KiB) Downloaded 205 times
Last edited by richmond62 on Thu Sep 16, 2021 6:39 pm, edited 1 time in total.
Re: Animated Characters from External Source
Yes, sure, but I would NOT call this an external animation format.
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Animated Characters from External Source
Well, as the frames were exported (with GIMP) from a .GIF image, which IS an
external animation format . . . .
external animation format . . . .
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Animated Characters from External Source
It might be possible, at a squeeze, to import an animated SVG with the SVG widget . . .
https://app.svgator.com/auth/register#/
I wonder why the 'Sample Stacks' stack is glacially slow to load?
Unfortunately James Lynch's wonderful SVG Power Images cannot cope with animated SVG images:
-
https://app.svgator.com/auth/register#/
I wonder why the 'Sample Stacks' stack is glacially slow to load?
Unfortunately James Lynch's wonderful SVG Power Images cannot cope with animated SVG images:
-
Last edited by richmond62 on Thu Sep 16, 2021 6:57 pm, edited 1 time in total.
Re: Animated Characters from External Source
Yes, but come into LC as PNG files, which is not an external animation format!richmond62 wrote: ↑Thu Sep 16, 2021 6:38 pmWell, as the frames were exported (with GIMP) from a .GIF image, which IS an
external animation format . . . .
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Animated Characters from External Source
Well, to be honest, to get animation working in any sort of controllable fashion inwith LiveCode
one has to either mess around with backGroundPattern in a graphic or mess around with visible
and a pile of images layered on top of each other.
Unless, of course, you want to work with Malte's Animation Engine.
https://github.com/derbrill/animationEngine
one has to either mess around with backGroundPattern in a graphic or mess around with visible
and a pile of images layered on top of each other.
Unless, of course, you want to work with Malte's Animation Engine.
https://github.com/derbrill/animationEngine
Re: Animated Characters from External Source
- 1. create a spritesheet
2. import to livecode
3. group the image
4. resize group to the size of your 'sprite'
5. set the lockloc of the group to true
6. in an init handler set the hScroll and vScroll to frame N of your sprite sheet
7. send a message to your animation handler
8. increment the hScroll of the sprite sheet by the Width of your sprite bounding area
9. reset the hScroll to 0 when you hit the width of your image source
10. control onscreen movement of your group via scripts
Code: Select all
on mouseUp
set the vScroll of group "zombie" to 512 -- position to last line of spritesheet
set the hScroll of group "zombie" to 1 -- first frame of fifth row
walkZombie
end mouseUp
on walkZombie
if the tool is not "browse tool" then exit walkZombie -- exit for scripting
put the thumbPosition of scrollbar "AnimationRate" into tRate
put the width of image "zombie"-128 into w
put the hScroll of group "Zombie" into hS
if HS < w then
add 64 to hS
else
put 1 into hS
end if
set the hScroll of group "zombie" to hs
send walkZombie to me in tRate milliseconds
end walkZombie
TexturePacker standalone tool
Spritesheet via imagemagick
Or roll your own in Livecode
-
Re: Animated Characters from External Source
Or you could use JimL's cel animation technique he links to here: viewtopic.php?f=7&t=36110&p=207185&hili ... on#p207171