Search found 17 matches

by ErvinGamez
Wed Apr 16, 2014 11:15 am
Forum: Support and Development
Topic: Shaking love.graphics.drawn objects
Replies: 5
Views: 2350

Re: Shaking love.graphics.drawn objects

If you make each wall tile a separate object with its own properties, you could create them all with random shake values and in their update callbacks handle the movement. If I did it, this is my method: blockObject = {} function blockObject:init(v) local _i = {} setmetatable(_i, {__index = self}) ...
by ErvinGamez
Wed Apr 16, 2014 11:02 am
Forum: Support and Development
Topic: Shaking love.graphics.drawn objects
Replies: 5
Views: 2350

Re: Shaking love.graphics.drawn objects

If you make each wall tile a separate object with its own properties, you could create them all with random shake values and in their update callbacks handle the movement. If I did it, this is my method: blockObject = {} function blockObject:init(v) local _i = {} setmetatable(_i, {__index = self}) ...
by ErvinGamez
Wed Apr 16, 2014 7:46 am
Forum: Support and Development
Topic: Shaking love.graphics.drawn objects
Replies: 5
Views: 2350

Re: Shaking love.graphics.drawn objects

Anyone?

Or is this literally impossible?
by ErvinGamez
Tue Apr 15, 2014 7:51 pm
Forum: Support and Development
Topic: Shaking love.graphics.drawn objects
Replies: 5
Views: 2350

Shaking love.graphics.drawn objects

Hard to explain, but I'll try nevertheless... Now, I used the gridlocked player tutorial, and changed it a little bit, but what I'm trying to do, is make the walls (smoothly) shake/move about (like, give it an effect that it is in space), but I tried everything, and nothing worked. Check out the att...
by ErvinGamez
Tue Apr 15, 2014 7:42 pm
Forum: Support and Development
Topic: 2 backgrounds (moving) at the same time [SOLVED]
Replies: 13
Views: 5224

Re: 2 backgrounds (moving) at the same time [SOLVED]

Well for smooth scrolling, you would actually need to have two background 2s. Something like this function love.load() background=love.graphics.newImage('space1.png') background2=love.graphics.newImage('space2.png') background1x = 0 background2x1 = 0 background2x2 = background2:getWidth() dir = -16...
by ErvinGamez
Tue Apr 15, 2014 4:51 pm
Forum: Support and Development
Topic: 2 backgrounds (moving) at the same time [SOLVED]
Replies: 13
Views: 5224

Re: 2 backgrounds (moving) at the same time [SOLVED]

davisdude wrote:

Code: Select all

if math.abs( background2x ) >= background2:getWidth() then
    x = 0
end
Well, it kinda works, but I'm not going to ask for more help, since it feels like I'm asking for too much, I'll tweak it.
by ErvinGamez
Tue Apr 15, 2014 4:12 pm
Forum: Support and Development
Topic: 2 backgrounds (moving) at the same time [SOLVED]
Replies: 13
Views: 5224

Re: 2 backgrounds (moving) at the same time

Ah. No, they are not actually "merged", I just meant that they were both being drawn. To get the scrolling effect, you can just set the x value for the images, and use it as the second argument in love.draw. function love.load() background=love.graphics.newImage('space1.png') background2=...
by ErvinGamez
Tue Apr 15, 2014 4:07 pm
Forum: Support and Development
Topic: 2 backgrounds (moving) at the same time [SOLVED]
Replies: 13
Views: 5224

Re: 2 backgrounds (moving) at the same time

Ah. No, they are not actually "merged", I just meant that they were both being drawn. To get the scrolling effect, you can just set the x value for the images, and use it as the second argument in love.draw. function love.load() background=love.graphics.newImage('space1.png') background2=...
by ErvinGamez
Tue Apr 15, 2014 3:58 pm
Forum: Support and Development
Topic: 2 backgrounds (moving) at the same time [SOLVED]
Replies: 13
Views: 5224

Re: 2 backgrounds (moving) at the same time

What do you mean? It should be exactly what you want, if I'm understanding you correctly. It is drawing both of them, with 2 at the top, and 1 at the bottom. Oh, it is! Haha, 1 has stars that look similar to 2, so I thought it was just 1. I asked you how I can separate them because I thought they w...
by ErvinGamez
Tue Apr 15, 2014 3:50 pm
Forum: Support and Development
Topic: 2 backgrounds (moving) at the same time [SOLVED]
Replies: 13
Views: 5224

Re: 2 backgrounds (moving) at the same time

davisdude wrote:It is combining the 2, actually.
I needed the .love to make sure the images were actually transparent, etc.
Hm, so is there anyway to separate them 2?