Paralax Scrolling BG + Sprite Animations

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
ninwa
Party member
Posts: 118
Joined: Tue Oct 12, 2010 1:21 am
Location: Metro Detroit
Contact:

Paralax Scrolling BG + Sprite Animations

Post by ninwa »

Hey all!

So I decided, "Hey, I need to learn how to use AnAL." It's a really great library and I recommend everyone who needs animations check it out, that said, here's my little demo that came from learning it. Maybe I'll make it into a game someday (probably not.)

Oh, also, there's paralax backgrounds. It's really simple to do but if you've ever wondered how feel free to look at the code. I drew the backgrounds (not the sprite), so talented, I know.

Screenshot:
Image

Controls:
  • Left/Right Arrow Keys - Move
    'z' - Jump
    'z' while in air - air jump
    'x' - swing sword
    down arrow - fall faster toward the ground
Download: http://www.josephbleau.com/Paralax.love

Let me know what you think!

PS: Ryne, you should make me some enemy sprites! It took me forever to even get a pre-made sprite cut-up how I wanted it! :(
User avatar
arquivista
No longer with us
Posts: 266
Joined: Tue Jul 06, 2010 8:39 am
Location: Insert Geolocation tag here
Contact:

Re: Paralax Scrolling BG + Sprite Animations

Post by arquivista »

HOLY NINJA ANAL CRAP! That guy really can fly forever! :D
It seems very nice. Badies, badies we need badies...

try this ones
http://home.scarlet.be/~lw039750/PD/Ninja%20Generic.PNG
http://home.scarlet.be/~lw039750/PD/Kit ... eneric.PNG

a lot more here http://home.scarlet.be/~lw039750/
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Paralax Scrolling BG + Sprite Animations

Post by kikito »

Looks good, but the animation doesn't seem to work on my comp (Ubuntu with love 6.2)

When keep pressing left or right, the character animation starts, but after the first "step" it freezes.
When I write def I mean function.
User avatar
zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Location: In your head.
Contact:

Re: Paralax Scrolling BG + Sprite Animations

Post by zac352 »

WHOA
6.3 MB? :shock:
Hello, I am not dead.
User avatar
ninwa
Party member
Posts: 118
Joined: Tue Oct 12, 2010 1:21 am
Location: Metro Detroit
Contact:

Re: Paralax Scrolling BG + Sprite Animations

Post by ninwa »

kikito wrote:Looks good, but the animation doesn't seem to work on my comp (Ubuntu with love 6.2)

When keep pressing left or right, the character animation starts, but after the first "step" it freezes.
Hm strange. I'll look into this. Thank you Kikito.

Edit: Actually, this may not be a bug Kikito. Well, not something that only you are experiencing. The character does reach the last frame of his flight animation and "glides." -- I still need to work out how I want to loop between frame 4 and 5 of his flight animation, or if I want to make "beginning to glide" and "gliding" two separate animations.

Anyway, that said, this isn't a Love or platform issue, it's a code issue (assuming the sword animation works for you?)
User avatar
ninwa
Party member
Posts: 118
Joined: Tue Oct 12, 2010 1:21 am
Location: Metro Detroit
Contact:

Re: Paralax Scrolling BG + Sprite Animations

Post by ninwa »

Updated link, added a crate you can bat around, shadows, and sound-effects. I also tweaked how fast you regain flight.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: Paralax Scrolling BG + Sprite Animations

Post by TechnoCat »

It takes a long time to catch up to the crate!
User avatar
zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Location: In your head.
Contact:

Re: Paralax Scrolling BG + Sprite Animations

Post by zac352 »

I have a question about spritebatches... How do you use them?
Do you just do love.graphics.draw(batch,x,y)?
Hello, I am not dead.
User avatar
ninwa
Party member
Posts: 118
Joined: Tue Oct 12, 2010 1:21 am
Location: Metro Detroit
Contact:

Re: Paralax Scrolling BG + Sprite Animations

Post by ninwa »

TechnoCat wrote:It takes a long time to catch up to the crate!
It shouldn't, really. It's velocity is 100-200px/sec on the x-axis and likewise on the y-axis. The character runs at 200px a second so you should be able to keep right up with it, plus there's "friction" so it decelerates pretty quickly. Are you experiencing otherwise? :(
zac352 wrote:I have a question about spritebatches... How do you use them?
Do you just do love.graphics.draw(batch,x,y)?


I'm not using them (directly), nor have any experience with them, so I'm not sure.
Last edited by ninwa on Sun Nov 14, 2010 6:08 pm, edited 1 time in total.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: Paralax Scrolling BG + Sprite Animations

Post by TechnoCat »

ninwa wrote:It shouldn't, really. It's velocity is 100-200px/sec on the x-axis and likewise on the y-axis. The character runs at 200px a second so you should be able to keep right up with it, plus there's "friction" so it decelerates pretty quickly. Are you experiencing otherwise? :(
I see the crate off to the right when it starts, but to get to it. I have to run for a long time as it slowly crawls towards my player.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests