I have two games I completed recently and both of them were working fine a few days ago. I opened one to look at some code I want to use in a new game. I also tried running the game but it didn't work normally. I ran the other game and it is doing essentially the same unexpected behavior which it didn't do previously.
The games start in a splash screen which has 2 buttons, one to go to an instructions screen and one to start play. Clicking on the buttons changes the game state to the appropriate game state and changes the screen to that game state's screen. The unexpected behavior is that the screen doesn't change to the correct screen. However, it appears the game state IS changed. I say this because the mouse cursor changes according to the clickable areas of the new game states, NOT the clickable areas of the splash screen, which is still showing.
Is it possible this change in behavior is related to an update of lua or love? I think my computer upgraded from lua 5.3.3-2 to 5.3.4-1 a few days ago. I use ZeroBrane IDE.
suddenly game doesn't work
Re: suddenly game doesn't work
OK.
I can't see how to attach files to a reply, so I've uploaded the projects to my domain.
The zipped projects can be downloaded from:
http://rpallen.com.br/washington.zip
http://rpallen.com.br/my_insects.zip
and working versions of the games can be downloaded at:
http://rpallen.com.br/WashingtonDC_Setup.exe
http://rpallen.com.br/Insects4.exe
I can't see how to attach files to a reply, so I've uploaded the projects to my domain.
The zipped projects can be downloaded from:
http://rpallen.com.br/washington.zip
http://rpallen.com.br/my_insects.zip
and working versions of the games can be downloaded at:
http://rpallen.com.br/WashingtonDC_Setup.exe
http://rpallen.com.br/Insects4.exe
Re: suddenly game doesn't work
It appears my suspicion was correct. I downgraded from lua 5.3.4-1 back to lua 5.3.3-2 and the games worked as they had before. I don't know what changes were made that caused the problems, but I'm going to finish this new game in love/lua 5.3.3-2 before I reapply the upgrade.
Re: suddenly game doesn't work
In lua 5.3, integers are introduced.
Your problem might be about this.The main difference between Lua 5.2 and Lua 5.3 is the introduction of an integer subtype for numbers. Although this change should not affect "normal" computations, some computations (mainly those that involve some kind of overflow) can give different results.
You can fix these differences by forcing a number to be a float (in Lua 5.2 all numbers were float), in particular writing constants with an ending .0 or using x = x + 0.0 to convert a variable. (This recommendation is only for a quick fix for an occasional incompatibility; it is not a general guideline for good programming. For good programming, use floats where you need floats and integers where you need integers.)
The conversion of a float to a string now adds a .0 suffix to the result if it looks like an integer. (For instance, the float 2.0 will be printed as 2.0, not as 2.) You should always use an explicit format when you need a specific format for numbers.
(Formally this is not an incompatibility, because Lua does not specify how numbers are formatted as strings, but some programs assumed a specific format.)
The generational mode for the garbage collector was removed. (It was an experimental feature in Lua 5.2.)
Re: suddenly game doesn't work
Your game washington works fine on my PC. When I click the buttons, the screen changes as expected.
BTW, love includes its own lua, your lua version shouldn't affect your love game.
BTW, love includes its own lua, your lua version shouldn't affect your love game.
Re: suddenly game doesn't work
I just tried your other game, my_insects, and it works as expected too.
Re: suddenly game doesn't work
Also I have lua 5.3.4 installed on my system, and your games work just fine. I think the problem is elsewhere.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: suddenly game doesn't work
LÖVE uses it's internal Lua version, which is LuaJIT 2.0.4 which is based on Lua 5.1. External Lua distributions shouldn't affect the way LÖVE works unless you specifically change the dependency
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 3 guests