Help with pictures and such

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
AnDwHaT5
Prole
Posts: 2
Joined: Fri Sep 27, 2013 1:43 am

Help with pictures and such

Post by AnDwHaT5 »

Hello i am AnDwHaT5. I am a bit new here atm so let me begin with my question of noobie-ness.

I would like to use a character sprite on a picture that i have. Though when i rendered it in it took out my picture and replace the entire thing with the sprite.
What i wish to do is make the sprite movable on the background picture. I have tried the wiki however it needs a small amount of work such as example codes. There arnt many of them but when i get them they are very helpful ^_^. Also while i am asking when i use the audio it dosnt work right. It comes out all echoy. I have tried .ogg and mp3 both came out the same. Some assistance on this would be nice. (I used stream)
User avatar
DaedalusYoung
Party member
Posts: 413
Joined: Sun Jul 14, 2013 8:04 pm

Re: Help with pictures and such

Post by DaedalusYoung »

Could you post a .love file?

If you're using a spritesheet, I'd recommend using quads, which allow you to only draw a small part of an image. Check out the functions related to quads on the love.graphics page.

As for the audio, I have no clue, we'd need to examine your files for that.
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Help with pictures and such

Post by davisdude »

Yeah, we can't really help you without a .love.
Are you trying to do an animation? Or just move the character along a background picture?
Additional clarification helps us help you! :)
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
User avatar
Sheepolution
Party member
Posts: 264
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

Re: Help with pictures and such

Post by Sheepolution »

You can load in images and store these in variables.

Code: Select all

 variableName = love.graphics.newImage("url/to/image.png")
What you might have done is assigning both images to the same variable. Make sure you use different ones.

Code: Select all

 background = love.graphics.newImage("background.png")
 sprite = love.graphics.newImage("sprite.png")
If that is not your problem, please explain better.
AnDwHaT5
Prole
Posts: 2
Joined: Fri Sep 27, 2013 1:43 am

Re: Help with pictures and such

Post by AnDwHaT5 »

What i want to do is when i use if keypress.isDown("right") then is i want it to replace the current sprite with a different image in the spot defined by using say x = x + 1. My issue is it updates it but then defaults back when the if then statement is over.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 6 guests