Hi guys!
So i've been messing with LOVE2d, after i decided i wanted something a bit nicer to play with than MOAI. I was just messing around with LOVEframes, and started making a program that i've had on my mind for a long time to test it out, and got kind of carried away and now people are waiting on me to release this thing to the world.
Now i only know how to program in LUA and usually what you know how to use now is usually a pretty good option to make things, but because LOVE is a game engine and not aimed at making art programs, despite it being able to do everything i need internally, it seems to miss some of the core features i need, which is pretty much just being able to load and export images with the clipboard, and save images via the default windows save dialog.
So just a few questions.
I get that i would need to modify the source do to this, but is it something that is going to be possible for me to implement? I see that copying text to the clipboard is implemented, how much harder would images be? I will need to raise the programs permissions to save in places that are not %APPDATA% correct?
Btw this is what the app looks like.
More stuff here. http://polykarbonbbs.com/showthread.php ... post426145
If i'm a complete idiot trying to use a hammer to drive in a screw, i'd also really like to know. Thanks guys!
Using LOVE2d for an art application.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Using LOVE2d for an art application.
I strongly believe that you could use LuaJIT's FFI to include C libs and call C functions that would allow you to do this (both bringing up the default OS saving dialog and putting/getting images in clipboard), but you'd need platform specific code I think.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Using LOVE2d for an art application.
Oh interesting!
It's fine if i need platform specific code, It's better than diving headfirst into learning C++ to use qt!
I'll look into it and try it out. Thanks so much!
It's fine if i need platform specific code, It's better than diving headfirst into learning C++ to use qt!
I'll look into it and try it out. Thanks so much!
Re: Using LOVE2d for an art application.
Ok so i got text loading via clipboard working via FFI. (yes i know this is already in the love functionality)
Now to try and export an image.
Now to try and export an image.
Re: Using LOVE2d for an art application.
So looking more into this.
Am i right in thinking that Winapi has all the functionality i would need? Does that mean that i can drop a Winapi .dll into the same folder as love.exe and get this functionality?
Am i right in thinking that Winapi has all the functionality i would need? Does that mean that i can drop a Winapi .dll into the same folder as love.exe and get this functionality?
Re: Using LOVE2d for an art application.
OK!
So i got this version of WINAPI working.
https://luapower.com/winapi
Sadly the original version of WINAPI doesn't match this version so i'm having to work out things reading through the source. Which is always fun.
So i got this version of WINAPI working.
https://luapower.com/winapi
Sadly the original version of WINAPI doesn't match this version so i'm having to work out things reading through the source. Which is always fun.
Re: Using LOVE2d for an art application.
OK!
So i wasted way too much time not realizing that the luapower winapi library is completly different than the steve donovan dll one. The second one is what i wanted, and it's all working.
So now i have a specific problem that i don't know how to handle.
How would i save a file that isn't just a simple .txt file using the .dll.
So for example is it possible to grab that userdata that is the screenshot and save it using the winapi commands?
So i wasted way too much time not realizing that the luapower winapi library is completly different than the steve donovan dll one. The second one is what i wanted, and it's all working.
So now i have a specific problem that i don't know how to handle.
How would i save a file that isn't just a simple .txt file using the .dll.
So for example is it possible to grab that userdata that is the screenshot and save it using the winapi commands?
Code: Select all
screenshot = love.graphics.newScreenshot( )
require 'winapi'
local U = winapi.uexpand
local encode = winapi.encode
local UTF8 = winapi.CP_UTF8
--winapi.set_encoding(UTF8)
local short = winapi.short_path
local name = short 'OMG.txt'
os.remove(name)
print(name)
local f,err = io.open(name,'w')
if not f then return print(err) end
f:write 'a new file\n'
f:close()
Re: Using LOVE2d for an art application.
The 7th guideline doesn't mention quintuple posting specifically, but i'm sure it's implied. In the future try adding to your reply using the edit button instead of posting a new one.
Re: Using LOVE2d for an art application.
Haha, to be fair it was a at least 2 hours between every post >_>.
Re: Using LOVE2d for an art application.
I don't know if that qualifies as
vrld wrote:an appropriate amount of time.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Who is online
Users browsing this forum: Ahrefs [Bot] and 7 guests