Delete this post
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 16
- Joined: Wed Feb 20, 2013 7:16 pm
Delete this post
Delete this post
Last edited by jajasuperman on Tue Feb 13, 2018 10:44 pm, edited 1 time in total.
Re: How I use sprites?
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
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!
-
- Prole
- Posts: 16
- Joined: Wed Feb 20, 2013 7:16 pm
Re: How I use sprites?
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![Razz :P](./images/smilies/ms-razz.png)
For example, mario game. Mario uses sprites to do a walking animations.
That's what I don´t know to do
![Razz :P](./images/smilies/ms-razz.png)
Re: How I use sprites?
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.
Re: How I use sprites?
If you are after to animate a sprite, check https://www.love2d.org/wiki/Category:Libraries anim8 or AnAL
-
- Prole
- Posts: 16
- Joined: Wed Feb 20, 2013 7:16 pm
Re: How I use sprites?
Yes, this is what I was looking forZeliarden wrote:If you are after to animate a sprite, check https://www.love2d.org/wiki/Category:Libraries anim8 or AnAL
![Very Happy :D](./images/smilies/ms-glad.png)
Thanks
Who is online
Users browsing this forum: Google [Bot] and 3 guests