Search found 184 matches

by leiradel
Wed Sep 21, 2011 12:37 pm
Forum: Support and Development
Topic: Grabbing frames from a camera
Replies: 10
Views: 6663

Re: Grabbing frames from a camera

I'm not feeling like taking things from huge projects such as OpenCV and ffmpeg, but libvidcap looks promising. Judging by the included example it's more complicated to use then ESCAPI and comes with no documentation other than the source code. Maybe I'll give libvidcap a try. Cheers, Andre EDIT: I'...
by leiradel
Wed Sep 21, 2011 1:33 am
Forum: Support and Development
Topic: Grabbing frames from a camera
Replies: 10
Views: 6663

Re: Grabbing frames from a camera

Ok, I've added camera support to LÖVE 0.7.2. I'm attaching the patch here with the hope that it'll be scrutinized because I'm not sure I did things the correct way. This patch only works for Windows and uses ESCAPI to do the capturing. There's no source code for the DLL that does the capturing, and ...
by leiradel
Tue Sep 20, 2011 2:14 am
Forum: Support and Development
Topic: Grabbing frames from a camera
Replies: 10
Views: 6663

Re: Grabbing frames from a camera

I did managed to show the camera image inside a LÖVE game but it crashed after some time. I believe I'm running out of texture ids in OpenGL, so I'll try another approach. Question for the developers: Is this reasonable? When a camera device is initialized, a Device is returned to Lua world. This De...
by leiradel
Sun Sep 18, 2011 2:50 pm
Forum: Support and Development
Topic: Grabbing frames from a camera
Replies: 10
Views: 6663

Re: Grabbing frames from a camera

As an Image? ImageData maybe? Could you tell a bit more about your requirements? I'll have a thread in C++ land grabbing frames from an attached camera. In the Lua side of things, I want to be able to call something like love.camera.grab() and receive an love::image::ImageData which I could pass to...
by leiradel
Sun Sep 18, 2011 4:14 am
Forum: Support and Development
Topic: Grabbing frames from a camera
Replies: 10
Views: 6663

Grabbing frames from a camera

Hi All, I'm writing a module to grab frames from a camera but am having trouble deciding how I should implement it. Code to get pixels from the webcam is ready, but how should I return them to LÖVE so that they can be drawn? Cheers, Andre Edit: I'd rather not having to allocate an array of pixels ea...
by leiradel
Mon Jun 06, 2011 2:07 am
Forum: General
Topic: LÖVE mention on #AltDevBlogADay
Replies: 1
Views: 1328

LÖVE mention on #AltDevBlogADay

Hi All,

Today I posted my 5th article at #AltDevBlogADay. It is a very en passant overview of Lua. I mentioned LÖVE in the article and thought about letting other lövers know about it.

Cheers,

Andre
by leiradel
Tue Mar 29, 2011 11:25 pm
Forum: General
Topic: Increasing a counter on sound:isStopped()
Replies: 1
Views: 1279

Re: Increasing a counter on sound:isStopped()

My guess is that there is some latency between love.audio.play( silence ) and silence:isStopped() but I'm not sure. Anyway, if what you're trying to accomplish is to increment a counter every one second, this code will do it (untested): local one_second local count function love.load() one_second = ...
by leiradel
Mon Mar 28, 2011 6:39 pm
Forum: Support and Development
Topic: Post your favorite particle settings...
Replies: 8
Views: 2175

Re: Post your favorite particle settings...

Useless because it's Windows only. Hahaha, sorry, I still don't know what platform people here use. Still, I'd love to see peoples creative use of the particle system. Like what images they use, what colors, speeds, settings. Here's an image and particle settings I'm using to make little trucks lea...
by leiradel
Mon Mar 28, 2011 6:31 pm
Forum: Support and Development
Topic: Camera to view all objects
Replies: 5
Views: 1660

Re: Camera to view all objects

Thanks vrld, for a nice explanation (with graphics!) I've managed to make it work: local dx = self.maxx - self.minx local dy = self.maxy - self.miny local scale, x0, y0 if dx > dy then scale = love.graphics.getWidth() / dx x0 = -self.minx y0 = -self.miny - ( dy - love.graphics.getHeight() / scale ) ...
by leiradel
Mon Mar 28, 2011 1:08 pm
Forum: General
Topic: Anyone gonna help a newbie? Again... yet Again...
Replies: 19
Views: 12592

Re: Anyone gonna help a newbie? Again... yet Again...

But he only sets the element if ""..i==key... A better way to write this is changeBoard(key + 0, 1). key + 0 will convert the string key into a number and add zero to it. I'm wondering about the hacks. What's wrong with tostring() and tonumber()? Good point, it's just that old habits die ...