Porting love2d to other platforms

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Porting love2d to other platforms

Post 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.
Help us help you: attach a .love.
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: Porting love2d to other platforms

Post 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
Henko
Prole
Posts: 9
Joined: Sun Jan 03, 2010 12:19 pm
Location: Wyk/Föhr, Germany
Contact:

Re: Porting love2d to other platforms

Post 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 ;)
User avatar
toaster468
Citizen
Posts: 77
Joined: Sat Nov 06, 2010 11:30 pm

Re: Porting love2d to other platforms

Post by toaster468 »

j3d1 wrote: Yes, sorry. Was wrong.
tu hablo espanol, no?
j3d1
Prole
Posts: 6
Joined: Sat Oct 30, 2010 1:55 pm

Re: Porting love2d to other platforms

Post by j3d1 »

toaster468 wrote: tu hablo espanol, no?
Hola! Por desgracia, no. I - Rusia. Puedo utilizar Google Traductor :3
User avatar
zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Location: In your head.
Contact:

Re: Porting love2d to other platforms

Post by zac352 »

j3d1 wrote:Google Traductor :3
I know that part! :P
Hello, I am not dead.
Post Reply

Who is online

Users browsing this forum: No registered users and 87 guests