Delete this post

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
jajasuperman
Prole
Posts: 16
Joined: Wed Feb 20, 2013 7:16 pm

Delete this post

Post by jajasuperman »

Delete this post
Last edited by jajasuperman on Tue Feb 13, 2018 10:44 pm, edited 1 time in total.
User avatar
buhb11
Citizen
Posts: 81
Joined: Wed Dec 26, 2012 8:59 pm

Re: How I use sprites?

Post by buhb11 »

If you want to load an image(sprite) you could do this: myImg = love.graphics.newImage("folder/nameofpic.png")
Now your image is load in your computer memory lets display it : Go in love.draw() function and there type this:
love.graphics.draw(myImg,x,y) , myImg = image to draw , x = pos on X axe , y = pos on Y axe
I found Love very enjoyable and nice!
jajasuperman
Prole
Posts: 16
Joined: Wed Feb 20, 2013 7:16 pm

Re: How I use sprites?

Post by jajasuperman »

I am not talking about an image.
For example, mario game. Mario uses sprites to do a walking animations.
That's what I don´t know to do :P
User avatar
Ragzouken
Citizen
Posts: 84
Joined: Fri Aug 10, 2012 7:59 am
Contact:

Re: How I use sprites?

Post by Ragzouken »

Sprite is really just a synonym for image - I guess you mean spritesheets i.e many sprites together in one image. You can use http://love2d.org/wiki/love.graphics.drawq to draw a specific rectangle within an image. Do that in sequence and you have an animation.
Zeliarden
Party member
Posts: 139
Joined: Tue Feb 28, 2012 4:40 pm

Re: How I use sprites?

Post by Zeliarden »

If you are after to animate a sprite, check https://www.love2d.org/wiki/Category:Libraries anim8 or AnAL
jajasuperman
Prole
Posts: 16
Joined: Wed Feb 20, 2013 7:16 pm

Re: How I use sprites?

Post by jajasuperman »

Zeliarden wrote:If you are after to animate a sprite, check https://www.love2d.org/wiki/Category:Libraries anim8 or AnAL
Yes, this is what I was looking for :D
Thanks
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests