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.
Some questions
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- PedroChurro
- Prole
- Posts: 25
- Joined: Tue Oct 09, 2012 8:22 pm
- Location: In my room
Some questions
Last edited by PedroChurro on Fri Oct 12, 2012 10:51 pm, edited 1 time in total.
I try to make games.
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.
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
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.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.
I try to make games.
Re: Some questions
Take a look at anim8 (linked in the original response); it's a library for doing that and the tutorials will probably help.PedroChurro wrote:But I don't know how to code that.
Re: Some questions
This might be a bit hard for a beginner, but for a simple animation system, you could do something like this:
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.
Good luck with your game
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
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.
Good luck with your game
- 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.
Answer no. 2 : Either try ready-made libraries, or just look at the wiki
Answer no. 3 : https://love2d.org/wiki/love.font
Answer no. 2 : Either try ready-made libraries, or just look at the wiki
Answer no. 3 : https://love2d.org/wiki/love.font
Currently designing themes for WordPress.
Sometimes lurks around the forum.
Sometimes lurks around the forum.
- PedroChurro
- Prole
- Posts: 25
- Joined: Tue Oct 09, 2012 8:22 pm
- Location: In my room
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 81 guests