Lizard Attack

Show off your games, demos and other (playable) creations.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Lizard Attack

Post by Nixola »

It should work - KeyConstant
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Lizard Attack

Post by coffee »

Nixola wrote:It should work - KeyConstant
I actually understand his problem/confusion. All other non-alphanumerical keys use a real name (tab,right,home...). Space key is the only one that for fun uses something out-of-box and don't follow same naming protocol. Also even that the wiki seems straightforward the (space) in left column can induce in error those who just quick look. Because in the first time no one usually doubt that "space" won't work.
(space) Space key Replace (space) with the actual space character
I also still make the mistake of mechanically type "space" instead of " ", because it's more logic and intuitive. Dual acceptance of " " and "space" would be nice and would end that confusion.

EDITED: Also find/replace = " " than = "space" could have more probability of end in bad replacements.
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Lizard Attack

Post by qaisjp »

coffee wrote:
Nixola wrote:It should work - KeyConstant
I actually understand his problem/confusion. All other non-alphanumerical keys use a real name (tab,right,home...). Space key is the only one that for fun uses something out-of-box and don't follow same naming protocol. Also even that the wiki seems straightforward the (space) in left column can induce in error those who just quick look. Because in the first time no one usually doubt that "space" won't work.
(space) Space key Replace (space) with the actual space character
I also still make the mistake of mechanically type "space" instead of " ", because it's more logic and intuitive. Dual acceptance of " " and "space" would be nice and would end that confusion.

EDITED: Also find/replace = " " than = "space" could have more probability of end in bad replacements.
keypressed should relate to the actual key, and not the character.
so pressing space would give "space", and enter would be "enter" (or "return")

then love.characterpressed would give the character pressed, so that multiple locales are supported (other country keyboards, with accents). So holding shift+m would make key=="M" (case sensitive)
Lua is not an acronym.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Lizard Attack

Post by Nixola »

function love.keypressed(key, unicode)
local characterpressed = string.char(unicode)
end
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
azonicrider
Prole
Posts: 14
Joined: Mon Sep 03, 2012 7:05 am
Location: Canadaka

Re: Lizard Attack

Post by azonicrider »

coffee wrote:
Nixola wrote:It should work - KeyConstant
I actually understand his problem/confusion. All other non-alphanumerical keys use a real name (tab,right,home...). Space key is the only one that for fun uses something out-of-box and don't follow same naming protocol. Also even that the wiki seems straightforward the (space) in left column can induce in error those who just quick look. Because in the first time no one usually doubt that "space" won't work.
(space) Space key Replace (space) with the actual space character
I also still make the mistake of mechanically type "space" instead of " ", because it's more logic and intuitive. Dual acceptance of " " and "space" would be nice and would end that confusion.

EDITED: Also find/replace = " " than = "space" could have more probability of end in bad replacements.
I agree.
azonicrider
Prole
Posts: 14
Joined: Mon Sep 03, 2012 7:05 am
Location: Canadaka

Re: Lizard Attack

Post by azonicrider »

Roland_Yonaba wrote:
azonicrider wrote:however the Space bar just didn't want to cooperate.
Maybe because you made the wrong test. Have you tested key == " " ?
I thought about it, but didn't try it, as it just seemed crazy.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Lizard Attack

Post by Robin »

azonicrider wrote:I thought about it, but didn't try it, as it just seemed crazy.
(Insert facepalm here.)
There are a lot of things out there much crazier than that and yet they are still true.
Help us help you: attach a .love.
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Lizard Attack

Post by qaisjp »

Robin wrote:
azonicrider wrote:I thought about it, but didn't try it, as it just seemed crazy.
(Insert facepalm here.)
There are a lot of things out there much crazier than that and yet they are still true.
yeah like meatspin
It is still an unexpected string.
Lua is not an acronym.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests