Search found 264 matches

by Sheepolution
Sat Apr 27, 2013 3:00 pm
Forum: Support and Development
Topic: Centering Images Perfectly
Replies: 4
Views: 4676

Re: Centering Images Perfectly

love.graphics.draw(image,x-position,y-position,rotation,xscale,yscale,width,height) So let's say you have a screen of 200 by 200, and you want to put it in the center: img = love.graphics.newImage("image") x = 100 y = 100 w = img:getWidth()/2 h = img:getHeight()/2 love.graphics.draw(img,x...
by Sheepolution
Wed Apr 24, 2013 10:39 pm
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1791
Views: 1500145

Re: What's everyone working on? (tigsource inspired)

tQqdrNJ.png
tQqdrNJ.png (27.93 KiB) Viewed 430 times
Ropes! So far it can clip on the points. Only need to add the phyics stuff.
by Sheepolution
Wed Apr 17, 2013 9:54 am
Forum: Support and Development
Topic: SOLVED Checking collision between objects in multiple arrays
Replies: 23
Views: 9421

Re: Checking collision between objects in multiple arrays

This makes so much sense! Thanks! And when I want to check, let's say, the enemies, as the player, I need to go through the listOfObjects and check if the object's tag is "enemy"? Then it probably makes sense to keep a separate table for the enemies, that also keeps track of the enemies. ...
by Sheepolution
Wed Apr 17, 2013 7:43 am
Forum: Support and Development
Topic: SOLVED Checking collision between objects in multiple arrays
Replies: 23
Views: 9421

Re: Checking collision between objects in multiple arrays

This makes so much sense! Thanks!

And when I want to check, let's say, the enemies, as the player, I need to go through the listOfObjects and check if the object's tag is "enemy"?
by Sheepolution
Tue Apr 16, 2013 2:20 pm
Forum: Support and Development
Topic: SOLVED Checking collision between objects in multiple arrays
Replies: 23
Views: 9421

Re: Checking collision between objects in multiple arrays

But then I only know the kind of object. I need the x and y position, and it's width and height to check if there is collision of both colliding objects. Or I am getting you wrong? You can store everything in a table. You then have the player and an enemy in the same table. Each object inside the a...
by Sheepolution
Mon Apr 15, 2013 10:45 pm
Forum: Support and Development
Topic: SOLVED Checking collision between objects in multiple arrays
Replies: 23
Views: 9421

Re: Checking collision between objects in multiple arrays

But then I only know the kind of object. I need the x and y position, and it's width and height to check if there is collision of both colliding objects. Or I am getting you wrong? You probably have it split up this way, because each type of object moves differently, right? Well no, because of their...
by Sheepolution
Mon Apr 15, 2013 3:42 pm
Forum: Support and Development
Topic: SOLVED Checking collision between objects in multiple arrays
Replies: 23
Views: 9421

Re: Checking collision between objects in multiple arrays

Okay so for now I have 3 different objects. - Player - Multiple enemies - Multiple bullets There is no exact number of enemies (since they spawn) There is no exact number of bullets (since you can shoot) So I made an array for the player (even though there is only 1 player), an array for the enemies...
by Sheepolution
Mon Apr 15, 2013 8:50 am
Forum: Support and Development
Topic: SOLVED Checking collision between objects in multiple arrays
Replies: 23
Views: 9421

Re: Checking collision between objects in multiple arrays

Okay so I played around with it. Now I have this: for i=1,#arrayObject-1,1 do for j=i+1,#arrayObject,1 do for k=1,#arrayObject[i],1 do for m=1,#arrayObject[j],1 do if (checkCollision(arrayObject[i][k].posX,arrayObject[i][k].posY,arrayObject[i][k].w,arrayObject[i][k].h,arrayObject[j][m].posX,arrayObj...
by Sheepolution
Thu Apr 11, 2013 8:31 am
Forum: Support and Development
Topic: SOLVED Checking collision between objects in multiple arrays
Replies: 23
Views: 9421

SOLVED Checking collision between objects in multiple arrays

So normally, if I want to check collision between to objects, I'd do something like this: i=1 while (i<=#arrayPlayers) then j=1 while (j<=#arrayEnemies) then if (collision) then arrayPlayers[i].collision = true arrayEnemies[j].collision = true i = arrayPlayers.length+1 j = arrayEnemies.length+1 --or...
by Sheepolution
Wed Apr 03, 2013 7:48 am
Forum: Support and Development
Topic: Testing LOVE Projects
Replies: 22
Views: 7829

Re: Testing LOVE Projects

Here's the magic: You can drag your folder on a shortcut of love.exe!

With WinRAR you can also edit the files while zipped, then check winRAR asking if you want to save the edited files.