Search found 77 matches

by unixfreak
Tue Aug 20, 2019 1:12 pm
Forum: Support and Development
Topic: Camera panning not so smooth in map object
Replies: 1
Views: 1791

Re: Camera panning not so smooth in map object

Looks like you're missing deltatime when the camera position changes; Something like this: Map:update(dt) function Map:update(dt) --moves the map 1 pixel in any direction if input:down('PAN_RIGHT') then self.camX = self.camX + 2 *dt print(self.camX) elseif input:down('PAN_LEFT') then self.camX = sel...
by unixfreak
Thu Aug 01, 2019 4:13 pm
Forum: Libraries and Tools
Topic: Metaballs
Replies: 4
Views: 1962

Re: Metaballs

Looks nice! I played around with it for a bit and made some optimizations. The calculation is now done in a shader, and the texture is not recreated every frame. It's quickly hacked in though, so the code is far from optimal and not very pretty. ;) Hey, that's cool. Yeah, runs much faster as a shad...
by unixfreak
Wed Jul 31, 2019 6:01 pm
Forum: Libraries and Tools
Topic: Metaballs
Replies: 4
Views: 1962

Metaballs

https://raw.githubusercontent.com/Jigoku/love2d_metaballs/master/preview.gif This module creates a drawable surface with some HSL bouncing metaballs. Maybe someone will find this useful as a starting point for something else. Code can be found here: https://github.com/Jigoku/love2d_metaballs Basic ...
by unixfreak
Mon Jul 22, 2019 8:03 pm
Forum: Support and Development
Topic: Row of enemies
Replies: 2
Views: 1018

Re: Row of enemies

You'll want to loop over some rows and columns, which place an enemy into a table. That way you can loop over the table easily; One way to setup a grid of enemies is something like this; function love.load() enemies = {} enemies.w = 50 -- width of enemy enemies.h = 30 -- height of enemy enemies.rows...
by unixfreak
Sat Jul 20, 2019 11:01 pm
Forum: Support and Development
Topic: Trace a curve which pass through all of the points.
Replies: 8
Views: 1337

Re: Trace a curve which pass through all of the points.

Not sure if this is any use, but a while back i was trying to understand the use of moving an object along a bezier curve (typically a rocket/missile), this example that someone fixed for me may be useful in plotting the points along the curve: https://love2d.org/forums/viewtopic.php?f=4&t=83825&sta...
by unixfreak
Thu May 30, 2019 6:39 pm
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1701
Views: 488098

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

Red screen flashing is annoying as hell. Could replace with cracked screen or something else. It's just the flashing thats overdone. Agreed with you on that. Really was just an idea i had at the time. Cracks are a good idea... although i will probably make the flashing more subtle (hardly noticable...
by unixfreak
Tue May 28, 2019 10:54 pm
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1701
Views: 488098

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

Here's a top-down/side scrolling space shooter, with infinite gameplay. (will eventually have a story mode too). All the background scenery is procedurally generated. I abandoned this for a while, but got motivated to fix some of the broken enemies, and recently reworked many visuals; hopefully i'll...
by unixfreak
Thu Feb 28, 2019 6:14 pm
Forum: Support and Development
Topic: Shaders: having trouble porting existing shaders
Replies: 2
Views: 2165

Re: Shaders: having trouble porting existing shaders

Many thanks for all of that information, sorry for the late reply. This will be very useful to me, although, i think i'm going to go and look at GLSL shaders to try and understand things more about how shaders are generally put together. Your shader example does work, although i'm not sure how to im...
by unixfreak
Sat Feb 09, 2019 9:55 pm
Forum: Support and Development
Topic: Shaders: having trouble porting existing shaders
Replies: 2
Views: 2165

Shaders: having trouble porting existing shaders

I've been digging through the net looking at simple shaders on websites such as shadertoy and others. Trying to implement those examples into a love project to understand things; however they never seem to work and i get all kinds of errors, or broken/visual changes when applied. Even with shaders t...
by unixfreak
Wed Aug 15, 2018 3:49 pm
Forum: Support and Development
Topic: [SOLVED] How can i rewind a sound source, now that love.audio.rewind(source) has been removed?
Replies: 2
Views: 489

Re: [SOLVED] How can i rewind a sound source, now that love.audio.rewind(source) has been removed?

Found a solution... turns out it was quite simple. Now it seems :stop() on an audio source automatically rewinds. Solved.

Code: Select all

function sound:play(fx)
	fx:stop()
	fx:play()
end