Löve can have many, MANY more thing. It go forward a "professional framework". Look, there are no API for handling sub-process. No compression API, audio/video device API, no IPC API, etc etc.
A pro framework needs many feature, no only features that users see, also features which give powerful abilities to the game. You can do a game right know, but you may need to do many features yourself (like IME input : you need to make your own IME-like system if you want something like this in your game).
By the way, I not only use Löve for games, but also for software, which may need advanced features like IPC, or sub-process handling. Just for example, I am making a game with Löve, and I need an editor which can create ".zip" file. I can't do it with my beloved Löve framework, because there no way, directly in Löve or Lua, to create ZIP files. For me, Löve can go much further.
(And if I need to wait HL3 for this, I'll wait HL3, just for Löve )
Requesting 1.0.0 instead of 0.10.0
Re: Requesting 1.0.0 instead of 0.10.0
Founder of NeoShadow Studio. Currently working on the project "Sirami".
github / linkpy
github / linkpy
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Requesting 1.0.0 instead of 0.10.0
And an expanded (better) audio API in generalbobbyjones wrote:Love can't become 1.0 until is has HTTPS and microphone support lol.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Requesting 1.0.0 instead of 0.10.0
Löve is extremely capable and stable as it is now. It doesn't need a silly version number to be accepted as legit. Things change with every version. It's going to creep towards 1.0 at the pace they want it to.
You want 1.0, feel free to download it from a server in the future.
You want 1.0, feel free to download it from a server in the future.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Requesting 1.0.0 instead of 0.10.0
Since we are talking (more or less) about predictions for breaking things for 1.0.0, here are my expectations/hopes:
- There will be a way to easily play the same source simultaneously multiple times. (I have already suggested one possible way of doing this, by making play() return the source)
- The graphics library will be separated. Object creation (like newCanvas, newQuad), window functions (like setCaption) and system stuff (like getRendererInfo) will remain in love.graphics. Drawing (line, circle) as well as state (push, pop, etc) will be moved to the Canvas object. So you will do canvas:circle(...) instead of love.graphics.circle(...).
- Related to the previous one, love.draw will receive the "default canvas" as a parameter, just like love.update receives dt. The default canvas will be "special" in the sense that the LÖVE loop is the one which maintains it, and also will expand/contract if the window size changes.
- LÖVE will continue to provide a basic default, expandable via libraries. Certainly not going in the direction Linkpy is proposing.
When I write def I mean function.
- slime
- Solid Snayke
- Posts: 3172
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Requesting 1.0.0 instead of 0.10.0
I've actually been thinking about doing something like this. There are a few issues that I can see happening though (which may or may not end up being real issues in practice):kikito wrote:
- The graphics library will be separated. Object creation (like newCanvas, newQuad), window functions (like setCaption) and system stuff (like getRendererInfo) will remain in love.graphics. Drawing (line, circle) as well as state (push, pop, etc) will be moved to the Canvas object. So you will do canvas:circle(...) instead of love.graphics.circle(...).
- Related to the previous one, love.draw will receive the "default canvas" as a parameter, just like love.update receives dt. The default canvas will be "special" in the sense that the LÖVE loop is the one which maintains it, and also will expand/contract if the window size changes.
- It might be less pleasant for libraries and other separated bits of game code to draw things, as a Canvas object would probably have to be passed around everywhere.
- It could involve more code to do some things, as you'd have to set the state for each individual Canvas you want to use. Although you often have to do that anyway.
- Because each Canvas would have its own state, the issue of accidentally using old per-frame state set by something else could turn into accidentally using very old state set once somewhere else, and it might be harder to track down where that happened.
- Due to the way graphics hardware works, it'll be impossible to have reasonable performance unless setCanvas (or something similar) still exists – so there would only be a single Canvas active at any given time, and draws to inactive canvases would have to fail. Which is kind of an unintuitive API to explain.
(also, "setCaption" has been in love.window as love.window.setTitle for a couple years now. )
LÖVE 0.10.0 has some APIs for compression (not zip files though, as it doesn't deal with folders or multiple files) and video playback, and it already has some functions to deal with IME input ([wiki]love.keyboard.setTextInput[/wiki] and [wiki]love.textinput[/wiki]).Linkpy wrote:Löve can have many, MANY more thing. It go forward a "professional framework". Look, there are no API for handling sub-process. No compression API, audio/video device API, no IPC API, etc etc.
A pro framework needs many feature, no only features that users see, also features which give powerful abilities to the game. You can do a game right know, but you may need to do many features yourself (like IME input : you need to make your own IME-like system if you want something like this in your game).
LÖVE will always be game-focused though, and I don't see it getting sub-process or IPC functionality beyond what you can do right now with Lua's APIs and luasocket.
I definitely want this, but I'm not very good at designing audio APIs. Suggestions are welcome!zorg wrote:And an expanded (better) audio API in general
Last edited by slime on Mon Dec 21, 2015 4:39 am, edited 2 times in total.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Requesting 1.0.0 instead of 0.10.0
That argument almost gets cancelled by the fact that canvas:circle is shorter to write than love.graphics.circle. The real one for me is that explicit dependencies are better than relying on globals (which is what setCanvas does right now).slime wrote:
- It might be less pleasant for libraries and other separated bits of game code to draw things, as a Canvas object would probably have to be passed around everywhere.
In the current system, if someone is using several canvases and they forget to call setCanvas once, tracking that bug down can be equally difficult (if they are using a significant number of canvases, in any case).slime wrote:
- Because each Canvas would have its own state, the issue of accidentally using old per-frame state set by something else could turn into accidentally using very old state set once somewhere else, and it might be harder to track down where that happened.
I didn't know that. Very unfortunate, then.slime wrote:
- Due to the way graphics hardware works, it'll be impossible to have reasonable performance unless setCanvas (or something similar) still exists – so there would only be a single Canvas active at any given time, and draws to inactive canvases would have to fail. Which is kind of an unintuitive API to explain.
Heh. You know what I meantslime wrote:(also, "setCaption" has been in love.window as love.window.setTitle for a couple years now. )
My suggestion is: make love.audio maintain a "pool" of "currently playing sources", and make .play() create (and return) one of those sources demand, if none is available. Also, clean up the pool regularly.slime wrote:I definitely want this, but I'm not very good at designing audio APIs. Suggestions are welcome!zorg wrote:And an expanded (better) audio API in general
I made a Lua-only implementation here: https://github.com/kikito/ld-30/blob/ma ... source.lua
It requires a manual "cleanup" call per source, which is not ideal.
When I write def I mean function.
Re: Requesting 1.0.0 instead of 0.10.0
Why not make that optional? Have a canvas.state pointing to the global state, and do this if you want it separate:slime wrote:[*]Because each Canvas would have its own state,
Code: Select all
canvas.state = love.graphics.newState()
Is this too misguided?slime wrote:[*]Due to the way graphics hardware works, it'll be impossible to have reasonable performance unless setCanvas (or something similar) still exists – so there would only be a single Canvas active at any given time, and draws to inactive canvases would have to fail. Which is kind of an unintuitive API to explain.
Code: Select all
function Canvas:circle(...)
love.graphics.setCanvas(self)
love.graphics.circle(...)
end
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Requesting 1.0.0 instead of 0.10.0
My suggestions would be more along the line of how we could allow dynamically generated music (along with access to aural input devices like microphones, though solutions to both do exist, it's just external to love, and it could probably be made internal as well)kikito wrote:My suggestion is: make love.audio maintain a "pool" of "currently playing sources", and make .play() create (and return) one of those sources demand, if none is available. Also, clean up the pool regularly.slime wrote:I definitely want this, but I'm not very good at designing audio APIs. Suggestions are welcome!zorg wrote:And an expanded (better) audio API in general
I made a Lua-only implementation here: https://github.com/kikito/ld-30/blob/ma ... source.lua
It requires a manual "cleanup" call per source, which is not ideal.
On another note, currently the API treats module files just like wave, mp3 and ogg files; they are decoded linearly into streams as well, not allowing more fine-grained access to raw module file data, like position jumping (or even reading out notational data). Then again, i'm only bringing such things up since supporting module files themselves already means having the necessary library included to actually do more with them... at least in a more advanced playback sense. I do see that this would mean that the API would not be homogenous across different audio data types.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
- slime
- Solid Snayke
- Posts: 3172
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Requesting 1.0.0 instead of 0.10.0
Unfortunately that would encourage code that would murder performance for no apparent reason. Switching canvases is probably the most expensive operation love.graphics can do (aside from creating new objects of course.) On mobile devices, even a single additional canvas change per frame can be the difference between vsync'd 60fps and vsync'd 30fps – you generally shouldn't have more than a dozen per frame (and hopefully much fewer), on iOS and Android. On desktops it's still relatively really expensive, but not quite as much.pgimeno wrote:Code: Select all
function Canvas:circle(...) love.graphics.setCanvas(self) love.graphics.circle(...) end
Something as "simple" as this would be far far far more expensive than it seems:
Code: Select all
function love.draw()
for i=1, 10 do
canvases[i]:circle("fill", 10, 10, 10)
end
end
Another issue with having draw calls as methods on Canvases is that in LÖVE 0.9 and 0.10 it's possible (and necessary, for some advanced graphics techniques) to output different things to multiple canvases within the same draw call, whereas that API would kind of make it impossible. LÖVE currently allows you to pass in multiple different canvases to [wiki]love.graphics.setCanvas[/wiki], and Shaders can output different values to each.
If setCanvas returned an object that has drawing and state methods, rather than the drawing methods being part of the Canvas object itself, multi-canvas rendering would still be possible and graphics drawing-related state wouldn't be global, but I think it still might have some usability issues (passing objects around, library functions invalidating the current 'draw pass' object, etc.)
Re: Requesting 1.0.0 instead of 0.10.0
Ouch, and here I was, thinking that Canvas:getImageData trumped them all...slime wrote:Switching canvases is probably the most expensive operation love.graphics can do
I get your point. Shame. Trading the convenience of writing it that way for the performance problems it will bring to unwary users is probably not worth it, then. Even wary users still have to design it so that drawing happens in as big batches as possible. Extending Canvas themselves rather than having it in the API would perhaps be an option for such power users.
Is that even possible? To extend an existing class such as Canvas? Sorry for the novice question, I'm still quite new to Lua.
Who is online
Users browsing this forum: Bing [Bot], Semrush [Bot] and 4 guests