Search found 265 matches

by xNick1
Fri Dec 15, 2017 9:19 am
Forum: Support and Development
Topic: Saving a game
Replies: 6
Views: 1693

Re: Saving a game

You're welcome!
Don't be afraid to ask for more help if you need it!
Obviously try to figure it out on your own first :crazy:
by xNick1
Fri Dec 15, 2017 8:48 am
Forum: Support and Development
Topic: Saving a game
Replies: 6
Views: 1693

Re: Saving a game

I attached the lib you need. Obviously adapt the code to what you need, I tried to make it as easy as possible. Basically you create a table and populate it with the data you want and then you save it. When loading it, you check if the saving file already exists and if it doesn't just create it with...
by xNick1
Thu Dec 14, 2017 8:22 pm
Forum: Support and Development
Topic: Saving a game
Replies: 6
Views: 1693

Re: Saving a game

I made something similar a while ago using a library called ser. It's not that hard. If you just want to save a score it's even easier. You just want to write that number in the file. So create a file, write the number on the file and save it. Then read that number every time you start the game and ...
by xNick1
Thu Dec 14, 2017 8:16 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 5027

Re: Game with separate files tryout

It says the second parameter you're passing is nil.
So try to put 100 instead of square.x and see if it solves the problem. If it does try to print square.x to see if it's nil. Then try to understand why it's nil xD
by xNick1
Thu Dec 14, 2017 5:30 pm
Forum: Support and Development
Topic: Layer order
Replies: 8
Views: 1750

Re: Layer order

Can't you draw the mountain with a darker color, instead of overlaying a transparent rectangle? I thought it would have worked if I applied the effect on every single object. It didn't work either cause the sprite was something like 100x200 but the object doesn't fill every pixel. So I got dark are...
by xNick1
Thu Dec 14, 2017 5:21 pm
Forum: Support and Development
Topic: Making LÖVE on Lunix/CentOS
Replies: 8
Views: 1629

Re: Making LÖVE on Lunix/CentOS

My bad, they're packaged as .deb :(
by xNick1
Wed Dec 13, 2017 6:42 am
Forum: Support and Development
Topic: Making LÖVE on Lunix/CentOS
Replies: 8
Views: 1629

Re: Making LÖVE on Lunix/CentOS

There are some kind of precompiled packages in the repo, otherwise you have to install some tools to compile the whole thing. You'll also have to install the dependencies. I think I installed everything with the -dev "flag" when I compiled it myself on Debian. Some of the dependencies were Lua and o...
by xNick1
Tue Dec 12, 2017 7:44 pm
Forum: Support and Development
Topic: Layer order
Replies: 8
Views: 1750

Re: Layer order

Yeah, it would solve the problem, but I would have to do that for every object but the sun.
It's 15 or more objects.
Drawing a whole rectangle affects the sun anyway and I can't think of any different solution.
I'll probably apply a lower alpha channel to every object then.

Thanks for the help guys
by xNick1
Tue Dec 12, 2017 3:24 pm
Forum: Support and Development
Topic: Layer order
Replies: 8
Views: 1750

Re: Layer order

I'm attaching a .love file.
I draw everything, and then on top I put the filter to make everything darker.
Then I want only the player not to be affected by the dark thing
by xNick1
Tue Dec 12, 2017 3:12 pm
Forum: Support and Development
Topic: Layer order
Replies: 8
Views: 1750

Re: Layer order

Nixola wrote:
Tue Dec 12, 2017 2:55 pm

Code: Select all

function love.draw()
	lg.setColor(255, 255, 255)
	sun:draw()
	mountain:draw()
	blackRectangle:draw()
end
Black rectangle is being drawn on top of everything, and it draws something like setColor(0, 0, 0, 200), so the sun is still dark :/