0.6.0 Update
Re: 0.6.0 Update
What can we do to make our 0.5.0 games work also with 0.6.0 withowt rewriting every script? (i know we could make the .exe file with 0.5.0, but then the source will be unreadable)
Re: 0.6.0 Update
Some of your code should be compatible going forward - how much exactly depends on what features your program uses. However, there's inevitably going to be some rewriting to make your code work properly.napco wrote:What can we do to make our 0.5.0 games work also with 0.6.0 withowt rewriting every script? (i know we could make the .exe file with 0.5.0, but then the source will be unreadable)
Here's ten changes off the top of my head:
- Built-in love functions must now be prefixed with "love.". So, instead of load() or keypressed(), it's love.load() and love.keypressed().
- Any love.graphics.draw() calls for drawing text need to be replaced with love.graphics.print() or love.graphics.printf().
- Colors have been removed. Replace any Colors with their equivalent in separate red, green, blue, and alpha values.
- Animations have also been removed. There's no immediate replacement for that in LÖVE 0.6.0, but supposedly there's a library to help replicate its functionality coming soon.
- love.graphics.setCenter() no longer exists - you specify the center of an image as two extra parameters in its love.graphics.draw() function instead.
- love.default_font has been replaced with love._vera_ttf.
- love.system is gone. Completely. Bye bye!
- Some constants have been renamed - love.color_normal is now love.color_replace, and love.blend_normal is now love.blend_alpha.
- Speaking of color modes, love.color_modulate is now the default color mode.
- Images now have their origin default to the top left of the image instead of the center.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: 0.6.0 Update
You mean the other way around?anjo wrote:Any love.graphics.draw() calls for drawing text need to be replaced with love.graphics.print() or love.graphics.printf().
I assume this means instead of:Colors have been removed. Replace any Colors with their equivalent in separate red, green, blue, and alpha values.
love.graphics.setColor(love.graphics.newColor(255,255,255,255))
We just use:
love.graphics.setColor(255,255,255,255)?
I only had one anyway, for testing, it was water, but I was probably just going to create my own animation feature anyway to make it easier on myself. (I want to put all the animations in one file, instead of having to use individual images for each animation.)Animations have also been removed. There's no immediate replacement for that in LÖVE 0.6.0, but supposedly there's a library to help replicate its functionality coming soon.
So, what, Restart and Exit are simple exit() and restart()? Or what have they been changed to?love.system is gone. Completely. Bye bye!
I was wondering about that. I literally just changed all my code to paste images at 16 pixels offset anyway. Now I'll just remove that 16 pixel offset.Images now have their origin default to the top left of the image instead of the center.
Cannot wait to get this puppy ported. I assume the engine will blue screen if/when it encounters an older command that was depreciated to make it easier to track it all down?
-
- Party member
- Posts: 101
- Joined: Mon Aug 11, 2008 5:19 am
Re: 0.6.0 Update
Half of my pleasure comes from this confession, and half comes from the fact that I know 6.1 will be _all about_ a rewrite of the font system.rude wrote:Then you'll be delighted to hear, Mr Strange, that fonts are just as horrible as before.
How much would you charge to support formatted text which is also rotated? I'll send you $300 right now if that would do it.
--Mr. Strange
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: 0.6.0 Update
I don't use the font system for real fonts. I just make my own as images. Painstakingly.
Re: 0.6.0 Update
No, I mean it the way I said - love.graphics.draw() is overloaded in 0.5.0 to draw both strings and images. In 0.6.0, drawing strings requires the use of the love.graphics.print[f] function.Jasoco wrote:You mean the other way around?
Correct.Jasoco wrote: I assume this means instead of:
love.graphics.setColor(love.graphics.newColor(255,255,255,255))
We just use:
love.graphics.setColor(255,255,255,255)?
Restart no longer exists, sorry. love.system.exit() has been replaced with love.event.quit().Jasoco wrote:So, what, Restart and Exit are simple exit() and restart()? Or what have they been changed to?
Depends. For example, if you forget to change keypressed() to love.keypressed(), you won't be able to tell that something's wrong until you press a key and nothing happens, since LÖVE will simply not see a function to call when a key is pressed and ignore it. However, if you forget to change a love.graphics.draw to love.graphics.print, LÖVE will blue screen and complain about you passing the wrong type of argument to love.graphics.draw(). For the most part, if the change to 0.6.0 breaks something in your code, you'll probably be able to tell where the problem is. (Unless something goes horribly wrong and the program segfaults .)Jasoco wrote:I assume the engine will blue screen if/when it encounters an older command that was depreciated to make it easier to track it all down?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: 0.6.0 Update
Yes, that's where I come in, I have created AnAL, an animation lib which closely resembles the old animation system. It is already done, it works, I just need to upload it.anjo wrote: [*]Animations have also been removed. There's no immediate replacement for that in LÖVE 0.6.0, but supposedly there's a library to help replicate its functionality coming soon.
They are in one file?!I only had one anyway, for testing, it was water, but I was probably just going to create my own animation feature anyway to make it easier on myself. (I want to put all the animations in one file, instead of having to use individual images for each animation.)
Re: 0.6.0 Update
Will there be a quick list of API functions coming soon for 0.6.0? That would really be helpful to start fiddling around with this new version. That way we can start posting some bugs for 0.6.0.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: 0.6.0 Update
But... why? How am I supposed to have the game restart itself when I need it to? I use Restart all the time. Like all the time. I have it bound to a press of the R key for testing without having to touch the mouse to double-click the file every time I want to load the new version. Is there a reason it was taken out?anjo wrote:Restart no longer exists, sorry. love.system.exit() has been replaced with love.event.quit().Jasoco wrote:So, what, Restart and Exit are simple exit() and restart()? Or what have they been changed to?
Re: 0.6.0 Update
I don't know why it was removed (you'd have to ask rude, sorry). Fortunately, not all is lost - it's not impossible to write your own restart() function that goes something like this:
Code: Select all
function restart()
love.load()
end
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 3 guests