Some questions

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
PedroChurro
Prole
Posts: 25
Joined: Tue Oct 09, 2012 8:22 pm
Location: In my room

Some questions

So, I thought, I have so many questions, and I really don't want to spam the forums, so, can I post the questions I have on this topic? It would be really useful.

Here are some questions to start:

1: So, I'm already trying to make a game, and I'm currently doing the menu. But there is one problem, I have a background I want to use for the menu, but when I use it, it covers up the buttons(Start, quit, etc.). How can I change that?

2:How can I make my character to jump, and do a small animation when walking?

3:The tutorials I followed didn't cover how to make text with a custom font. What's the code for that?

Sorry for being such a noob.
Last edited by PedroChurro on Fri Oct 12, 2012 10:51 pm, edited 1 time in total.
I try to make games.

paritybit
Citizen
Posts: 53
Joined: Thu Sep 06, 2012 3:52 am

Re: Some questions

Drawing order matters. What you draw last is on top. So, you want to draw the background first and the buttons last.

Animations are a more difficult subject, since you're new to this you probably want to use an existing library like anim8. But the very basics are that you want to have a bunch of images that are played in sequence so that it looks like your character is doing some action.

PedroChurro
Prole
Posts: 25
Joined: Tue Oct 09, 2012 8:22 pm
Location: In my room

Re: Some questions

paritybit wrote:Drawing order matters. What you draw last is on top. So, you want to draw the background first and the buttons last.

Animations are a more difficult subject, since you're new to this you probably want to use an existing library like anim8. But the very basics are that you want to have a bunch of images that are played in sequence so that it looks like your character is doing some action.
Thanks, and also, yes, that is what I was planning to do, "have a bunch of images that are playing in sequence". But I don't know how to code that.
I try to make games.

paritybit
Citizen
Posts: 53
Joined: Thu Sep 06, 2012 3:52 am

Re: Some questions

PedroChurro wrote:But I don't know how to code that.
Take a look at anim8 (linked in the original response); it's a library for doing that and the tutorials will probably help.

Nsmurf
Party member
Posts: 191
Joined: Fri Jul 27, 2012 1:58 am
Location: West coast.

Re: Some questions

This might be a bit hard for a beginner, but for a simple animation system, you could do something like this:

Code: Select all

anm = {love.graphics.newImage('lol1.png'), love.graphics.newImage('lol2.png')}
anmon = 1

function love.update(dt)

if anmon < table.getn(anm) then
anmon = anmon + 1*dt
else
anmon = 1
end

end

function love.draw()
love.graphics.draw(anm[round(anmon)])
end

function round(n, deci) deci = 10^(deci or 0) return math.floor(n*deci+.5)/deci end

However, I DO NOT suggest that you use this. To start off with, I would suggest that you use something like anim8, or the newly created MASH.

See this tutorial for fonts.

It's a bit confuzzling, and probably to complex for what you want, but you could use this for drawing order.

OBEY!!!
My Blog
UE0gbWUgd2l0aCB0aGUgd29yZCAnSE1TRycgYXMgdGhlIHN1YmplY3Q=

substitute541
Party member
Posts: 484
Joined: Fri Aug 24, 2012 9:04 am
Location: Southern Leyte, Visayas, Philippines
Contact:

Re: Some questions

Answer no. 1 : Drawing order matters. What's at the bottom goes at the front of everything else.
Currently designing themes for WordPress.

Sometimes lurks around the forum.

PedroChurro
Prole
Posts: 25
Joined: Tue Oct 09, 2012 8:22 pm
Location: In my room

Re: Some questions

Thanks, I think I'll try anim8.
I try to make games.

Who is online

Users browsing this forum: Teo434 and 68 guests