Search found 54 matches

by adge
Sun Jan 31, 2016 6:36 am
Forum: General
Topic: Would these games be possible with Love?
Replies: 20
Views: 9665

Would these games be possible with Love?

I'm still new and still deciding if I will be using Love2d or not. From what i've seen and done, its an extremely cool option. Lua is easy, lightweight but can do complex stuff and feels very fast. Especially in contrast to Game Maker. native OS X is a huge boost. I already think what I will be doin...
by adge
Sat Jan 30, 2016 5:35 pm
Forum: Support and Development
Topic: Alternating alpha value depending on y position
Replies: 15
Views: 5998

Re: Alternating alpha value depending on y position

Thank you for your fast reply guys. @pgimeno, your solution works flawlessly, thank you very much. @Beelz: thank you for commenting through my code. That helped me a lot. Coding small projects and uploading them seems like a good way to learn if people are willing to comment through the code. This h...
by adge
Fri Jan 29, 2016 4:43 pm
Forum: Support and Development
Topic: Alternating alpha value depending on y position
Replies: 15
Views: 5998

Alternating alpha value depending on y position

Hi there! I got a mathematical problem and I cant quite get the solution. I got an raster where the cells are 20x20 pixels big. The whole raster is 300x300 px big. So my raster got 15x15 cells. On pressing the return button, a block at x=random(0,300) y=0 gets spawned with speed = random(1,20). This...
by adge
Thu Jan 28, 2016 11:59 pm
Forum: Support and Development
Topic: Code review?
Replies: 6
Views: 2120

Re: Code review?

Could you maybe share the link to the tutorial? I'm looking for something like that too!
by adge
Thu Jan 28, 2016 9:44 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 411924

Re: "Questions that don't deserve their own thread" thread

Pairs doesn't have a defined order. If you need them to be printed in a specific order, use a sequence and ipairs. Two examples: --do this if you need textual indices in listy; function love.load() listy = {first = 1, middle = 2, last = 3} order = {"first", "middle", "last&...
by adge
Thu Jan 28, 2016 12:39 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 411924

Re: "Questions that don't deserve their own thread" thread

Can someone tell my why the output is always printed backwards if I do this:

Code: Select all

function love.load()
	listy = {first = 1, middle = 2, last = 3}

	for i, v in pairs(listy) do
		print(i, v)
	end
end


function love.update(dt)
end


function love.draw()
end
Consoles output:
last 3
middle 2
first 1
by adge
Sat Jan 23, 2016 7:29 pm
Forum: Support and Development
Topic: Level Editor
Replies: 6
Views: 2241

Re: Level Editor

So since I'm quite new I wanted to ask if the code I wrote makes sense. Now there are just two buttons and if you click on the first one, the gamestate would change to the "editor" state. I'm curious if this is the right way to do buttons. main.lua require "button" --LOAD-- funct...
by adge
Sat Jan 23, 2016 10:57 am
Forum: Support and Development
Topic: Level Editor
Replies: 6
Views: 2241

Re: Level Editor

Yeah. Thats exactly how I would store a map to a txt file. During the tile placement the tiles position and the tile itself would be stored to an 2 Dimensional Array which would then be written into a .txt file. Can I also save the tiles themselves to the .txt? So that I don't have to specify which ...
by adge
Fri Jan 22, 2016 1:51 pm
Forum: Support and Development
Topic: Level Editor
Replies: 6
Views: 2241

Re: Level Editor

I have avsolutely no clue what you are talking about ;D

But thanks for the fast reply!
by adge
Fri Jan 22, 2016 1:19 pm
Forum: Support and Development
Topic: Level Editor
Replies: 6
Views: 2241

Level Editor

Hi there! I'm still quite new so I wanted to start a little platformer project where I can use my own level editor to create the levels. However as expected I don't really know how to start. First thing I would do is to create a single button on an empty screen which takes me to the level editor. Th...