## Future features

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Merkoth
Party member
Posts: 186
Joined: Mon Feb 04, 2008 11:43 pm
Location: Buenos Aires, Argentina

### Re: Future features

Is it possible to implement an image:getPixelColor( x, y ) method? It would be useful to implement masks for example

rude
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

### Re: Future features

Yes, but it would require something like this:

Code: Select all

img = love.objects:newImage("yhellothar.png", love.image_preserve)
img:getPixel(0, 0) -- works

fail = love.objects:newImage("yhellothar.png")
fail:getPixel(0, 0) -- Always returns (0, 0, 0) (Perhaps issue warning?)

Images are deleted from memory after they are sent to the GPU, so unless there is some fast way of getting the pixel color directly from the texture, we need to indicate that we want to keep a copy of the image data.

Merkoth
Party member
Posts: 186
Joined: Mon Feb 04, 2008 11:43 pm
Location: Buenos Aires, Argentina

### Re: Future features

rude wrote:Yes, but it would require something like this:

Code: Select all

img = love.objects:newImage("yhellothar.png", love.image_preserve)
img:getPixel(0, 0) -- works

fail = love.objects:newImage("yhellothar.png")
fail:getPixel(0, 0) -- Always returns (0, 0, 0) (Perhaps issue warning?)

Images are deleted from memory after they are sent to the GPU, so unless there is some fast way of getting the pixel color directly from the texture, we need to indicate that we want to keep a copy of the image data.
It's ok, no problem

rude
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

### Re: Future features

While we're at it, we may want to include img:setPixel as well. Although that will mean even more trouble.

Code: Select all

img = love.objects:newImage("yhello.png", love.image_awesome) -- This enables pixel writes.

for i = 1, img:getSize() do
img:setPixel(0, 0, img:getPixelRed(0, 0), 255, 255, 255)
end

img:awesome() -- This sends the image to the hardware.


Feel free to suggest identifiers for "awesome". We could just use lock/unlock. I'll start adding interface suggestions in the original post, so that people can make further suggestions.

Merkoth
Party member
Posts: 186
Joined: Mon Feb 04, 2008 11:43 pm
Location: Buenos Aires, Argentina

### Re: Future features

Hmm... no idea, image_pushable and img:push()? I sounds kinda stupid though.

alxs
Prole
Posts: 31
Joined: Fri Feb 29, 2008 5:22 pm

### Re: Future features

Hi, guys!

Some notes:
1. Even if most of your tutorials are run in a window the game switches to the full-screen mode for some reason on start and exit (the whole screen goes black for a moment). This is VERY annoying.

2. Alt-F4 doesn't close the window.

3. It would be very nice to have both windowed and full-screen modes that can be toggled by Alt-Enter or Maximize button.

4. Some kind of protection is a must for commercial games (licence keys, nag screens, encryption, etc).

5. Zipped format for games is great, but not so good while you are developing. Is there alternative way to run the games? Like a folder?

6. GUI interface to auto-detect all .love games and display them with their thumbnails. Ability to run any of detected games.

7. Do you need any help with development? I think I could spend some time on it...
Alex

Merkoth
Party member
Posts: 186
Joined: Mon Feb 04, 2008 11:43 pm
Location: Buenos Aires, Argentina

### Re: Future features

alxs wrote:Hi, guys!

Some notes:
1. Even if most of your tutorials are run in a window the game switches to the full-screen mode for some reason on start and exit (the whole screen goes black for a moment). This is VERY annoying.

2. Alt-F4 doesn't close the window.

3. It would be very nice to have both windowed and full-screen modes that can be toggled by Alt-Enter or Maximize button.

4. Some kind of protection is a must for commercial games (licence keys, nag screens, encryption, etc).

5. Zipped format for games is great, but not so good while you are developing. Is there alternative way to run the games? Like a folder?

6. GUI interface to auto-detect all .love games and display them with their thumbnails. Ability to run any of detected games.

7. Do you need any help with development? I think I could spend some time on it...
1. Never noticed this...
2. At least in Ubuntu, Alt-F4 works fine
3. That's a good one guys
5. You can do that right now: just drag the folder containing game.conf and main.lua onto love.exe (in windows) and you're good to go.

mike
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

### Re: Future features

alxs wrote: 6. GUI interface to auto-detect all .love games and display them with their thumbnails. Ability to run any of detected games.
We had a menu before but we started moving in a different direction... more "Source Engine", less "Steam" (if you get my many Valve references).
Now posting IN STEREO (where available)

alxs
Prole
Posts: 31
Joined: Fri Feb 29, 2008 5:22 pm

### Re: Future features

So, as I understand, you don't need any help with development?
Alex

mike