Page 4 of 4

Re: Porting love2d to other platforms

Posted: Tue Nov 16, 2010 7:58 pm
by Robin
Henko wrote:Even if the games began to depent on wii-only features, it is still the lover's decision. If he wants to break compatibility with PC, we should let him do that. On the other hand, those features can be extremly useful to improve the game experience. For example, hearing a gunshot out of the controller can be nice, but certainly is not neccessary. Also, lovers should always be aware that if they want to use the exclusive features of the wii, they should think of alternating mechanisms for the PC...
Yeah, like I stated in that last quote, as long as there is no extra effort for the lover to make things work on the Wii as well as on other platforms, I see no problems. It's somewhat inelegant to have an extended API for the Wii, but as long you don't need to think every line you write: "Would this run on the Wii?", it's not an issue.

Re: Porting love2d to other platforms

Posted: Tue Nov 16, 2010 9:22 pm
by thelinx
Henko wrote:

Code: Select all

if love.keyboard.isDown(iif(love.system == "wii", "wiihome", "return")) then
with iif() being the equivalent to C's ternary operator (or vb's iif):

Code: Select all

function iif(cond, truePart, falsePart)
   if cont then return truePart end
   return falsePart
end

Code: Select all

if love.keyboard.isDown(love.system == "wii" and "wiihome" or "return") then

Re: Porting love2d to other platforms

Posted: Tue Nov 16, 2010 9:25 pm
by Henko
thelinx wrote:
Henko wrote:

Code: Select all

if love.keyboard.isDown(iif(love.system == "wii", "wiihome", "return")) then
with iif() being the equivalent to C's ternary operator (or vb's iif):

Code: Select all

function iif(cond, truePart, falsePart)
   if cont then return truePart end
   return falsePart
end

Code: Select all

if love.keyboard.isDown(love.system == "wii" and "wiihome" or "return") then
hm, true. I should get used to Lua's logic concerning those operators. Still thinking in VB's ways ;)

Re: Porting love2d to other platforms

Posted: Wed Dec 01, 2010 2:27 am
by toaster468
j3d1 wrote: Yes, sorry. Was wrong.
tu hablo espanol, no?

Re: Porting love2d to other platforms

Posted: Wed Dec 01, 2010 4:08 am
by j3d1
toaster468 wrote: tu hablo espanol, no?
Hola! Por desgracia, no. I - Rusia. Puedo utilizar Google Traductor :3

Re: Porting love2d to other platforms

Posted: Wed Dec 01, 2010 4:54 pm
by zac352
j3d1 wrote:Google Traductor :3
I know that part! :P