LUA Mobile - Crear x Iphone y Android,Nook,Kindle en 10min

Tus experiencias con la informática, o fuera de la informática
Responder
Avatar de Usuario
BasicOs
Site Admin
Mensajes: 2083
Registrado: 21 Nov 2006, 19:24
Ubicación: El Internet - (Canarias, España)
Contactar:

LUA Mobile - Crear x Iphone y Android,Nook,Kindle en 10min

Mensaje por BasicOs »

Mobile_App_Development_with_Corona_-Sample.pdf
1er capitulo para configurar Corona - Luego seguier en learningcorona.com
(698.81 KiB) Descargado 392 veces
¿Para qué sirve Corona SDK?
Con algo de programación podrás crear tus videojuegos para iPhone, iPad, iPod Touch... y más tarde, si quieres, ponerlos en la AppStore (pagando)
¿Es gratis?
El programa tiene su fase gratuita, y otra que hay que pagar.
Para descargar Corona SDK: http://developer.anscamobile.com/downloads/windows
Te registras, y lo descargas. (Hay que registrarse y pagar aparte en los diferentes App Store para publicar en su caso)
Para Crear requerimientos (además de tener un aparato físico que es muy recomendable):
Android: Java JDK (Java Developers Kit), http://www.oracle.com/technetwork/java/ ... index.html
IOS: Mac y Apple iOS SDK - Xcode (solo para publicar), se puede desarrollar en Windows (posteriormente necesitas mac para poder instalar--eg: Mac Mini o Vmware Win o http://www.macincloud.com/)
Otros enlaces con corona-lua del foro y :
Tutoríal español corona para windows, una vez instalado corona sdk (Requerimientos bajos: XP,W7, 1GHZ, 38MB, OpenGl 1.3)
http://campamentoweb.blogspot.com/2011/ ... k.html?m=1
También se puede usar el Scite u otro editor, como el que viene con http://www.coronaprojectmanager.com o el Eclipse y su plugin-Corona-lua :
crear un documento de bloc de notas, renombrarlo con "main.lua", y allí colocar la programación para luego probarlo?
Eso es lo que hay que hacer para ejecutar el programa en el simulador!!

Aquí otro Hello World Más complicado que el del ejemplo, cada vez que hago un tap en la pantalla como un click con el dedo cambia el color del hola Mundo, automáticamente:
local textObject = display.newText( "Hola Mundo!", 50, 50, nil, 24 )
textObject:setTextColor( 255, 0, 0 )
--- creo la variable txtObject al mostrar con display el texto , luego con :setTextColor cambio el color
--- esta función es la que se llama del EventListener que es como un hotkeyset() que llama a la función taplistener:

function EscuchadordeTaps( event )
local r = math.random( 0, 255 )
local g = math.random( 0, 255 )
local b = math.random( 0, 255 )

textObject:setTextColor( r, g, b )
print('tap detectado')
end
--- aqui una llamada como el hotkeyset() esperando por "la tecla" tap
Runtime:addEventListener( "tap", EscuchadordeTaps )
Ya instale el instalador gratuito CoronaSDK-2011.704 que instala un grupo de programas con las utilidades. Arrancando el Corona simulator puedes modificar el txt del main.lua, y retocar en un editor de txt, cualquier programa de la carpeta samples .lua, y previsualizar los cambios (run) en el simulador. Parece que ya hice mi primer programa compatible con moviles, cambié el texto del "Hello World" por "Hola que tal", y lo arranqué en el simulador. Impresiona que he hecho mi primera aplicación para móviles entendiendo el código fuente, aunque se vea en el simulador y no en mi movil.

Como crear en 10 minutos y tener tu aplicación para Android o Iphone:
Hay varios ficheros en cada proyecto, pero el que nos va interesar es el main.lua donde podemos programar el Script, verás que facil es lo que está en negrita es el código, lo demás son explicaciones que puede que no necesites:

Fuente: http://learningcorona.com/
Corona for Newbies, Part 1 - Introduction
Corona for Newbies, Part 2 - Sounds and Music
Corona for Newbies, Part 3 - Dragging and Practical Usage
Corona for Newbies, Part 4 - Physics
----------------------------------------------
-- THE STATUS BAR --
----------------------------------------------
display.setStatusBar(display.HiddenStatusBar)
-- Para esconder la barra de estado
----------------------------------------------
-- COMMENTING --
----------------------------------------------
local background = display.newImage ("background.png")
-- Colocando la imagen del fondo
--[[
Here, we say that we are adding something to the project and calling it "background".
We are then saying that this is a new image and then stating which image from our project's folder we would like to use.

We don't need to specify coordinates as the background image should always be the same size as
our screen, which is 320 x 480.
--]]


----------------------------------------------
-- A SIMPLE IMAGE --
----------------------------------------------
local peachpic = display.newImage ("peach.png")
peachpic.x = 160
peachpic.y = 230


--[[
Hi! That's me :3

As you can see we are creating the image in the same way we did the background;
We state that we're adding a new image, calling it "peachpic" and that the file name is "peach.png".

Because this is not our background we need to state where the image should be on the page using
our new image's name.

I have centered it for the iPhone using numbers, because I like numbers - but to center an image you
could also use;

peachpic.x = display.contentWidth / 2
peachpic.y = display.contentHeight / 2
Un poco más avanzado:
----------------------------------------------
-- SETTING UP --
----------------------------------------------
display.setStatusBar(display.HiddenStatusBar)

local background = display.newImage ("background.png")

local peachpic = display.newImage ("peach.png")
peachpic.x = 160
peachpic.y = 230


--[[
The above is what we have already covered.
The below is what we're now learning!
--]]

----------------------------------------------
-- A FUNCTION --
----------------------------------------------
local function killpeach (event)
peachpic:removeSelf()
end


--[[
Here we state that we're creating a new function, (an event), and we are naming that event "killpeach".

One of the most common things to do when creating a game is to remove things, so that is what we're
doing here; in this event peachpic (our image) is going to remove itself.

But wait! How will the function work? When will the image remove itself? We need to define that as well.
--]]

----------------------------------------------
-- THE LISTENER --
----------------------------------------------
peachpic:addEventListener ("touch", killpeach)

--[[ si tocamos con el dedo - touch se ejecuta la función killpeach
Here we tell our image to "listen" for the function being called.

We state that when the image receives a "touch" it should perform the function killpeach.

If you try this now, clicking me will remove the picture.
--]]
Otra función:
----------------------------------------------
-- SETTING UP --
----------------------------------------------
display.setStatusBar(display.HiddenStatusBar)

local background = display.newImage ("background.png")

local peachpic = display.newImage ("peach.png")
peachpic.x = 160
peachpic.y = 230


--[[
The above is what we have already covered.
The below is what we're now learning!
--]]

----------------------------------------------
-- A FUNCTION --
----------------------------------------------
local function killpeach (event)
peachpic:removeSelf()
end


--[[
Here we state that we're creating a new function, (an event), and we are naming that event "killpeach".

One of the most common things to do when creating a game is to remove things, so that is what we're
doing here; in this event peachpic (our image) is going to remove itself.

But wait! How will the function work? When will the image remove itself? We need to define that as well.
--]]

----------------------------------------------
-- THE LISTENER --
----------------------------------------------
peachpic:addEventListener ("touch", killpeach)

--[[
Here we tell our image to "listen" for the function being called.

We state that when the image receives a "touch" it should perform the function killpeach.

If you try this now, clicking me will remove the picture.
--]]
Añadiendo movimiento:
----------------------------------------------
-- SETTING UP --
----------------------------------------------
display.setStatusBar(display.HiddenStatusBar)

local background = display.newImage ("background.png")

local peachpic = display.newImage ("peach.png")
peachpic.x = 160
peachpic.y = 230


--[[
The above is what we have already covered.
The below is what we're now learning!
--]]

----------------------------------------------
-- A FUNCTION --
----------------------------------------------
local function killpeach (event)
peachpic:removeSelf()
end

--[[
Here we state that we're creating a new function, (an event), and we are naming that event "killpeach".

One of the most common things to do when creating a game is to remove things, so that is what we're
doing here; in this event peachpic (our image) is going to remove itself.

But wait! How will the function work? When will the image remove itself? We need to define that as well.
--]]

----------------------------------------------
-- THE LISTENER --
----------------------------------------------
peachpic:addEventListener ("touch", killpeach)

--[[
Here we tell our image to "listen" for the function being called.

We state that when the image receives a "touch" it should perform the function killpeach.

If you try this now, clicking me will remove the picture.
--]]
Haciendo play a media - un sonido:
----------------------------------------------
-- THE STATUS BAR --
----------------------------------------------
display.setStatusBar(display.HiddenStatusBar)
-- Here we are hiding the iPhone's status bar; as covered in CFN Part 1

----------------------------------------------
-- COMMENTING --
----------------------------------------------
local background = display.newImage ("background.png")
-- Here we set our background, also covered in part 1

----------------------------------------------
-- A SIMPLE IMAGE --
----------------------------------------------
local peachpic = display.newImage ("peach.png")
peachpic.x = 160
peachpic.y = 230


--[[
And here I am again!

The code below is new, so now is the time to start paying attention!
--]]

----------------------------------------------
-- A SIMPLE SOUND --
----------------------------------------------
local ouch = media.newEventSound ("ouch.wav")
-- 1

local function playouch (event)
media.playEventSound (ouch)
end

-- 2

peachpic:addEventListener ("touch", playouch)
-- 3

--[[
1. This is us stating that ouch is a sound and that sound is ouch.wav. (This can be found in the folder)

2. It's all well and good to have a sound, but it's useless without a function to make it play. Here
we create a function to play "ouch".

3. We add a listener to my picture telling it that when touched, it should perform the function and
thus play the sound. We could use anything to make it play, collision, the position of my picture, etc.
but for simplicities sake we're using touch today.
--]]
Un poco más avanzado:
----------------------------------------------
-- THE STATUS BAR --
----------------------------------------------
display.setStatusBar(display.HiddenStatusBar)
-- Here we are hiding the iPhone's status bar; as covered in CFN Part 1

----------------------------------------------
-- COMMENTING --
----------------------------------------------
local background = display.newImage ("background.png")
-- Here we set our background, also covered in part 1

----------------------------------------------
-- A SIMPLE IMAGE --
----------------------------------------------
local peachpic = display.newImage ("peach.png")
peachpic.x = 160
peachpic.y = 230


--[[
And here I am again!

The code below is new, so now is the time to start paying attention!
--]]

----------------------------------------------
-- A SIMPLE SOUND --
----------------------------------------------
local ouch = media.newEventSound ("ouch.wav")
-- 1

local function playouch (event)
media.playEventSound (ouch)
end

-- 2

peachpic:addEventListener ("touch", playouch)
-- 3

--[[
1. This is us stating that ouch is a sound and that sound is ouch.wav. (This can be found in the folder)

2. It's all well and good to have a sound, but it's useless without a function to make it play. Here
we create a function to play "ouch".

3. We add a listener to my picture telling it that when touched, it should perform the function and
thus play the sound. We could use anything to make it play, collision, the position of my picture, etc.
but for simplicities sake we're using touch today.
--]]
Música de fondo:
----------------------------------------------
-- THE STATUS BAR --
----------------------------------------------
display.setStatusBar(display.HiddenStatusBar)
-- Here we are hiding the iPhone's status bar; as covered in CFN Part 1

----------------------------------------------
-- COMMENTING --
----------------------------------------------
local background = display.newImage ("background.png")
-- Here we set our background, also covered in part 1

----------------------------------------------
-- A SIMPLE IMAGE --
----------------------------------------------
local peachpic = display.newImage ("peach.png")
peachpic.x = 160
peachpic.y = 230


--[[
And here I am again!

The code below is new, so now is the time to start paying attention!
--]]

----------------------------------------------
-- A SIMPLE SOUND --
----------------------------------------------
local ouch = media.newEventSound ("ouch.wav")
-- 1

local function playouch (event)
media.playEventSound (ouch)
end

-- 2

peachpic:addEventListener ("touch", playouch)
-- 3

--[[
1. This is us stating that ouch is a sound and that sound is ouch.wav. (This can be found in the folder)

2. It's all well and good to have a sound, but it's useless without a function to make it play. Here
we create a function to play "ouch".

3. We add a listener to my picture telling it that when touched, it should perform the function and
thus play the sound. We could use anything to make it play, collision, the position of my picture, etc.
but for simplicities sake we're using touch today.
--]]
Arrastrar una imagen:
----------------------------------------------
-- THE STATUS BAR --
----------------------------------------------
display.setStatusBar(display.HiddenStatusBar)
-- Here we are hiding the iPhone's status bar; as covered in CFN Part 1

----------------------------------------------
-- COMMENTING --
----------------------------------------------
local background = display.newImage ("background.png")
-- Here we set our background, also covered in part 1

----------------------------------------------
-- A SIMPLE IMAGE --
----------------------------------------------
local peachpic = display.newImage ("peach.png")
peachpic.x = 160
peachpic.y = 230


--[[
You should understand the above code from Corona For Newbies Part 1 and Part 2.

These can be found on http://techority.com
--]]

----------------------------------------------
-- DRAGGING PEACH --
----------------------------------------------
local function dragpeach (event)
peachpic.x = event.x
peachpic.y = event.y
end
peachpic:addEventListener ("touch", dragpeach)


--[[
The above function says that while "touch" is on peachpic, we want to match the event coordinates.

Because this is a touch event, event.x will be wherever the touch is, providing it is on peachpic.
--]]
Limitar que la imagen no se salga de la pantalla:
----------------------------------------------
-- THE STATUS BAR --
----------------------------------------------
display.setStatusBar(display.HiddenStatusBar)
-- Here we are hiding the iPhone's status bar; as covered in CFN Part 1

----------------------------------------------
-- COMMENTING --
----------------------------------------------
local background = display.newImage ("background.png")
-- Here we set our background, also covered in part 1

----------------------------------------------
-- A SIMPLE IMAGE --
----------------------------------------------
local peachpic = display.newImage ("peach.png")
peachpic.x = 160
peachpic.y = 230


--[[
You should understand the above code from Corona For Newbies Part 1 and Part 2.

These can be found on http://techority.com
--]]

----------------------------------------------
-- DRAGGING PEACH --
----------------------------------------------
local function dragpeach (event)
peachpic.x = event.x
peachpic.y = event.y
end
peachpic:addEventListener ("touch", dragpeach)


--[[
This was covered in the previous section. If you don't understand the function please go back
and look over it again!
--]]

----------------------------------------------
-- KEEP IT ON SCREEN --
----------------------------------------------
local function wrapit (event)
if peachpic.x < 30 then
peachpic.x = 30
elseif peachpic.x > 290 then
peachpic.x = 290
elseif peachpic.y < 30 then
peachpic.y = 30
elseif peachpic.y > 450 then
peachpic.y = 450
end
end
Runtime:addEventListener("enterFrame", wrapit)


--[[
The above adds a function tied to a Runtime listener, meaning it's basically constantly triggering.

We are stating that if peachpic moves outside of the coords we've set (around the edges of the screen)
that it must be moved back inside these coordinates.

You will notice I have called the function "wrapit", this is my own habit. We are not wrapping the
screen; wrapping would mean having peachpic pop up at the bottom when it went too high, or from the
left when it went too far right, etc.

I'm a creature of habit, but I encourage you to find appropriate function names for your own projects.
--]]
Ejemplo práctico:
----------------------------------------------
-- THE STATUS BAR --
----------------------------------------------
display.setStatusBar(display.HiddenStatusBar)
-- Here we are hiding the iPhone's status bar; as covered in CFN Part 1

----------------------------------------------
-- COMMENTING --
----------------------------------------------
local background = display.newImage ("background.png")
-- Here we set our background, also covered in part 1

----------------------------------------------
-- A SIMPLE IMAGE --
----------------------------------------------
local peachpic = display.newImage ("peach.png")
peachpic.x = 160
peachpic.y = 230


--[[
You should understand the above code from Corona For Newbies Part 1 and Part 2.

These can be found on http://techority.com
--]]

----------------------------------------------
-- DRAGGING PEACH --
----------------------------------------------
local function dragpeach (event)
peachpic.x = event.x
peachpic.y = event.y
end
peachpic:addEventListener ("touch", dragpeach)


--[[
This was covered in the previous section. If you don't understand the function please go back
and look over it again!
--]]

----------------------------------------------
-- KEEP IT ON SCREEN --
----------------------------------------------
local function wrapit (event)
if peachpic.x < 30 then
peachpic.x = 30
elseif peachpic.x > 290 then
peachpic.x = 290
elseif peachpic.y < 30 then
peachpic.y = 30
elseif peachpic.y > 450 then
peachpic.y = 450
end
end
Runtime:addEventListener("enterFrame", wrapit)


--[[
The above adds a function tied to a Runtime listener, meaning it's basically constantly triggering.

We are stating that if peachpic moves outside of the coords we've set (around the edges of the screen)
that it must be moved back inside these coordinates.

You will notice I have called the function "wrapit", this is my own habit. We are not wrapping the
screen; wrapping would mean having peachpic pop up at the bottom when it went too high, or from the
left when it went too far right, etc.

I'm a creature of habit, but I encourage you to find appropriate function names for your own projects.
--]]
Avatar de Usuario
BasicOs
Site Admin
Mensajes: 2083
Registrado: 21 Nov 2006, 19:24
Ubicación: El Internet - (Canarias, España)
Contactar:

Re: LUA - 10 min. Crear Script x Iphone y Android,Nook,Kindl

Mensaje por BasicOs »

Eventos físicos, colisiones, pequeños escenarios, etc..
-- Hide the status bar
display.setStatusBar(display.HiddenStatusBar)

-- Set the background
local background = display.newImage ("background.png")

-- Put in the traditional picture of me and position it
local peachpic = display.newImage ("peach.png")
peachpic.x = 160
peachpic.y = 230


----------------------------------------------
-- PHYSICS TIME! --
----------------------------------------------

-- 1
local physics = require ("physics")
-- 2
physics.start()
-- 3
physics.setGravity(0,8.5)


--[[
1. We require physics; this is easy and doesn't need any additional files in our project folder

2. We start physics; it's no good having it if it isn't running!

3. We set the gravity.
The first number is the X gravity, it is 0.
The second number is the Y gravity, it is 8.5.
You can experiment with these as you wish.
--]]

-- Make "peachpic" a physics body with no bounce and a density of 1
physics.addBody (peachpic, {bounce=0, density=1.0})


-- And that's our first physics body! Move on when you're ready.
-- Hide the status bar
display.setStatusBar(display.HiddenStatusBar)

-- Set the background
local background = display.newImage ("background.png")

-- Put in the traditional picture of me and position it
local peachpic = display.newImage ("peach.png")
peachpic.x = 160
peachpic.y = 230


----------------------------------------------
-- PHYSICS TIME! --
----------------------------------------------

-- 1
local physics = require ("physics")
-- 2
physics.start()
-- 3
physics.setGravity(0,8.5)


--[[
1. We require physics; this is easy and doesn't need any additional files in our project folder

2. We start physics; it's no good having it if it isn't running!

3. We set the gravity.
The first number is the X gravity, it is 0.
The second number is the Y gravity, it is 8.5.
You can experiment with these as you wish.
--]]

-- Make "peachpic" a physics body with no bounce and a density of 1
physics.addBody (peachpic, {bounce=0, density=1.0})


-- And that's our first physics body! Move on when you're ready.
Detector de colisiones:
-- Hide the status bar
display.setStatusBar(display.HiddenStatusBar)

-- Set the background
local background = display.newImage ("background.png")

-- Put in the traditional picture of me and position it
local peachpic = display.newImage ("peach.png")
peachpic.x = 160
peachpic.y = 230


----------------------------------------------
-- PHYSICS TIME! --
----------------------------------------------

-- 1
local physics = require ("physics")
-- 2
physics.start()
-- 3
physics.setGravity(0,8.5)


--[[
1. We require physics; this is easy and doesn't need any additional files in our project folder

2. We start physics; it's no good having it if it isn't running!

3. We set the gravity.
The first number is the X gravity, it is 0.
The second number is the Y gravity, it is 8.5.
You can experiment with these as you wish.
--]]

-- Make "peachpic" a physics body with no bounce and a density of 1
physics.addBody (peachpic, {bounce=0, density=1.0})


-- And that's our first physics body! Move on when you're ready.
Aquí si quieres cambiar de escenas, que consiste basicamente que en cada fichero.lua hay un grupo de imágenes y de características físicas, y por ejemplo pulsando un botón cambia. (por ejemplo al cambiar de nivel, de pantalla, de fase) red.lua es un escenario.
Como cambiar de home.lua a red.lua que son dos escenarios con director:changeScene() :
local function pressRed (event)
if event.phase == "ended" then
director:changeScene ("red")
end
end
http://techority.com/2010/11/19/how-to- ... in-corona/


Usar el acelerometro:
-- Hides the status bar

local physics = require ("physics")
physics.start()
physics.setGravity(0,0)
-- start physics engine and set the gravity (I'm using 0 to start, you might want to change this.)

background = display.newImage ("background.png")
-- Sets the background

ball = display.newImage ("ball.png")
ball.x = 160
ball.y = 200
physics.addBody(ball, {friction = 1.0, bounce=0.6})
-- Adds the ball and adds physics to the ball

local motionx = 0
local motiony = 0

local function onAccelerate( event )
motionx = 35 * event.xGravity
motiony = 35 * event.yGravity
end
Runtime:addEventListener ("accelerometer", onAccelerate)

local function moveball (event)
ball.x = ball.x + motionx
ball.y = ball.y - motiony
end
Runtime:addEventListener("enterFrame", moveball)

-- Control motion with tilt
Más completo aquí:
http://techority.com/2010/11/19/control ... lerometer/

Acceso a bases de datos sqlite, nada nuevo en el mundo comparado con Autoit:
-- include sqlite db
require "sqlite3"
-- set the database path, here its the same folder where main.lua file resides.
local path = system.pathForFile("country_capital.sqlite", system.ResourceDirectory)
-- open db

db = sqlite3.open( path )

-- a variable to dynamically change the Y coordinate
local count = 1
-- sql query

local sql = "SELECT * FROM tbl_country_capital"

-- looping through result set and printing the output.

for row in db:nrows(sql) do
-- los .. son como & para unir los string
local text = row.country..", "..row.capital.." "
local t = display.newText(text, 50, 50 +(40 * count), native.systemFont, 30)
t:setTextColor(255,255,255)
count = count + 1
end
Aquí http://www.burtonsmediagroup.com/blog/2 ... -database/ y Aquí en video:

de aquí

Otros ejemplos diferentes aquí:
http://developer.anscamobile.com/sample ... ationtime1
Salu22:)
Avatar de Usuario
BasicOs
Site Admin
Mensajes: 2083
Registrado: 21 Nov 2006, 19:24
Ubicación: El Internet - (Canarias, España)
Contactar:

Re: LUA - 10 min. Crear Script x Iphone y Android,Nook,Kindl

Mensaje por BasicOs »

Si ya sabeis programar, posiblemente quereis compilar y tener funcionando el programa, por ejemplo que al tocar con el dedo un cuadrado, salga la foto de algún familiar, o que al colisionar dos objetos se creen otros dos rotos, o recuperar de una base de datos de productos, etc...

Página principal: http://www.anscamobile.com/
Bajar el IDE y compilador:
Te registras aquí: https://developer.anscamobile.com/user/ ... /coronasdk y accedes al instalador de prueba (full con una marca de agua). El trial sirve para hacer programas, y tiene un simulador del movil:
Comparación de prestaciones. http://www.anscamobile.com/pricing/whysubscribe.html

Ver como se puede conseguir la licencia sin trial:

[quote]Las licencias son cuotas anuales, cada año hay que renovarlas, que incluyen publicación en los Apple/Android Stores, :
  • 199$ euros (155€) para Iphone.
  • sumar otros 199$ si quieres crear en Android
  • O una licencia completa todo en uno: Iphone (IOS), Android, Kindle Fire, B&N NOOK Color, 349$ (270€)
    5x más rápido
También está la opción de comprar la licencia con unas reglas definidas entre un grupo de varios programadores, para dividir costes.(Entre varios para pagarse las licencias y que salga más económico para poder publicarlas en los App/Andr Stores)
Salu22:)
Avatar de Usuario
BasicOs
Site Admin
Mensajes: 2083
Registrado: 21 Nov 2006, 19:24
Ubicación: El Internet - (Canarias, España)
Contactar:

Re: LUA Mobile - Crear x Iphone y Android,Nook,Kindle en 10

Mensaje por BasicOs »

Mejoras en el tutorial y fichero pdf añadido,
Salu22:)
Jonny
Profesional del Autoit
Mensajes: 1042
Registrado: 30 Jun 2008, 20:08

Re: LUA Mobile - Crear x Iphone y Android,Nook,Kindle en 10

Mensaje por Jonny »

Wooooow.

Entonces, para todo esto hay que saber programar en Lua ¿no?.

Digamos que la base es Lua, y el sdk de iOS/Android lo lleva Corona.
¿Es así?.

Leí, que Lua es un lenguaje... de extensión o algo así.
¿que quiere decir eso?.

Yo pensaba, que sólo se podía publicar en Apple store (en la de Android no lo se) si se tenía un mac, o quizá más bien un dispositivo de Apple...
¿Corona lleva documentación de todo el SDK ¿no??.

Salu2!
Avatar de Usuario
BasicOs
Site Admin
Mensajes: 2083
Registrado: 21 Nov 2006, 19:24
Ubicación: El Internet - (Canarias, España)
Contactar:

Re: LUA Mobile - Crear x Iphone y Android,Nook,Kindle en 10

Mensaje por BasicOs »

Entonces, para todo esto hay que saber programar en Lua ¿no?.

Digamos que la base es Lua, y el sdk de iOS/Android lo lleva Corona.
¿Es así?.
Lua es muy parecido a AUTOIT. La curva de aprendizaje es muy pequeña solo teniendo en cuenta algunos detalles
Si. Lua es el lenguaje y ese SDK de corona es mas avanzado q el propio del iOS y android, q lo reemplaza para programar.

Leí, que Lua es un lenguaje... de extensión o algo así.
¿que quiere decir eso?.
q es como un plugin. Como en el caso del scite o el c que complementa. Pero en muchos casos va solo como el corona o bien cuando creas algo en C y luego realmente usas Lua dentro de C
Yo pensaba, que sólo se podía publicar en Apple store (en la de Android no lo se) si se tenía un mac, o quizá más bien un dispositivo de Apple...
¿Corona lleva documentación de todo el SDK ¿no??.
Es cierto, par apple store pero solo a la hora de enviar click. El resto puedes hacerlo en windows. Yo veo esto factible mejor x equipos o grupos xq es la cuota anual de corona mas la cuota anual de aPple mas la cuota de un Mac remoto q se alquila. Y el tiempo pasa rápido. Puedes estar meses para hacer una aplicación con proyección o con gusto y éxito.
Y un equipo de programadores q sea eficiente puede ir en semanas
.
Si. El corona esta bien documentado en los enlaces q puse.
El saber no ocupa lugar

Salu2
Avatar de Usuario
BasicOs
Site Admin
Mensajes: 2083
Registrado: 21 Nov 2006, 19:24
Ubicación: El Internet - (Canarias, España)
Contactar:

Re: LUA Mobile - Crear x Iphone y Android,Nook,Kindle en 10

Mensaje por BasicOs »

Hola, Aquí hay otrA herramienta de desarrollo para los móviles.

Esta no es en LUA si no SE ESCRIBE en HTML5 CSS Y JAVASCRIPT (Necesitas un mac os x snow Leopard), un aparato con IOS, y estar como desarrolador IOS, Android, Blackberry, WinPhone, WebOs y Symbian.

O sea haces una pagina html y le puedes conectar con funciones el gps, acelerometro etc..

Parece sencillo por si alguien lo quería probar y comentar:

http://phonegap.com/start

Salu22:)

Edit: otro sistema parecido: http://www.lungojs.com/
Jonny
Profesional del Autoit
Mensajes: 1042
Registrado: 30 Jun 2008, 20:08

Re: LUA Mobile - Crear x Iphone y Android,Nook,Kindle en 10

Mensaje por Jonny »

Vaya, ¡eso si que mola!.

Lástima que no tengo un mac para programar con esa herramienta...

¿No habrá nada así para Windows?.

Digo yo ¿Y como se ve el programa en el dispositivo, como una página web?.

Salu2!
Avatar de Usuario
BasicOs
Site Admin
Mensajes: 2083
Registrado: 21 Nov 2006, 19:24
Ubicación: El Internet - (Canarias, España)
Contactar:

Re: LUA Mobile - Crear x Iphone y Android,Nook,Kindle en 10

Mensaje por BasicOs »

Se ve como si portaras un html a win32, con mejor vista y puedes acceder al hardware y almacenar, etc...

Puedes usar el mac solo para programar/compilar o alquilarlo online.

Salu22
Jonny
Profesional del Autoit
Mensajes: 1042
Registrado: 30 Jun 2008, 20:08

Re: LUA Mobile - Crear x Iphone y Android,Nook,Kindle en 10

Mensaje por Jonny »

puf, pero ¿cuánto vale alquilarlo?...

Vaya, no es que lo vaya a hacer, encuentro exagerado tener que alquilar una máquina sólo para compilar un programa, pero ... curiosidad xdd

Salu2!
Avatar de Usuario
BasicOs
Site Admin
Mensajes: 2083
Registrado: 21 Nov 2006, 19:24
Ubicación: El Internet - (Canarias, España)
Contactar:

Re: LUA Mobile - Crear x Iphone y Android,Nook,Kindle en 10

Mensaje por BasicOs »

Es una maquina virtual online a través de un usuario / pass,
Salu22:)
Avatar de Usuario
BasicOs
Site Admin
Mensajes: 2083
Registrado: 21 Nov 2006, 19:24
Ubicación: El Internet - (Canarias, España)
Contactar:

Re: LUA Mobile - Crear x Iphone y Android,Nook,Kindle en 10

Mensaje por BasicOs »

Aquí un programa que porta basic -> JAVA.
http://www.jabaco.org/product.html
También usa como Autoit un lenguaje tipo basic, con lo que LO PODEMOS usar si deseamos exportar un programa Autoit a java haciendo algunos retoques. ;) :smt023 :smt023

Tambien importa casi sin modificar aplicaciones vBasic en JAVA:
http://www.jabaco.org/index.php?page=webcast

Salu22:)
Jonny
Profesional del Autoit
Mensajes: 1042
Registrado: 30 Jun 2008, 20:08

Re: LUA Mobile - Crear x Iphone y Android,Nook,Kindle en 10

Mensaje por Jonny »

Hola,

Después de ponerme en serio a aprender Java, con la idea de desarrollar para Android, creo que prefiero buscar otras alternativas... Java es la leche; y no tanto por su sintaxis, que podría aprendérmela como la de cualquier otro lenguaje, sino por la POO... No he encontrado ningún buen libro (en español) que trate a fondo la POO. Todo lo que he visto, al final, está relacionado con algún lenguaje (normalmente con Java) y así me cuesta bastante que me entre la POO en sí, que nunca me gustó y por más que todo el mundo le vea únicamente ventajas, para mí es casi más caótica que la programación clásica...

La cuestión es, que estos días, estoy mirando LUA y CoronaSDK, porque además de ser infinitamente más sencillo que Java y el SDK de Android, de paso, pueden "matarse dos pájaros de un tiro" ;)

Si he de elegir, prefiero desarrollar para Android. Pero si puedo hacerlo también para iOS, sin meterme en lenguajes complejos como Objective, no me importaría. :)

Por eso, el mirar LUA y CoronaSDK.

Pero LUA me recuerda a AutoIt, en cuanto a la documentación... A penas hay en español. Y digamos, la oficial que hay traducida, es un manual de referencia, igual, o más escueto que el de AutoIt :)

Para lo que es la sintaxis del lenguaje, puedo apañarme. De hecho, con algunas cosas que he ido viendo, ya sabría hacer alguna cosilla en LUA.
Pero hay cosas, sobre las que no he visto nada de documentación: Por ejemplo, sobre cómo compilar: Sé que puede hacerse como en AutoIt: Pasarle un archivo con el código fuente al intérprete y ver los resultados... Pero he visto que es posible compilarlo. Pero ¿cómo?.

No me queda claro, si es como una compilación de AutoIt: Un ejecutable independiente, o como Python, que se necesita de todas formas un intérprete para ejecutar el bytecode...

¿cómo se compila con CoronaSDK? ¿Las aplicaciones que genera ése SDK son compiladas realmente, son independientes o necesitan algo instalado en el dispositivo donde se ejecute la APP?.

Sobre todo esto, no he visto nada. Al menos en español...

Y bueno: Una cosa que resta (para mí) muchos puntos a LUA: Por lo que he visto, no tiene sentencias Switch ni continue. ;)

Hombre: Puede uno hacerse, a trabajar sin threads en AutoIT... ;)
No ha de ser imprescindible. Sin "Switch"... ¡Pero sin Continue! :)

Claro que podría hacerse un programa sin Switch's ni Continue's, pero me parecen sentencias muy básicas... Y creo que habría que hacer muchas chapuzas, para conseguir los mismos efectos que estas sentencias. Y en el caso del Continue, ni eso :)

En fin, pongo esto, a ver que os parece... Quizás, LUA esté bien usarlo como extensión, pero viendo lo visto, no sea la mejor opción para hacer todo un programa únicamente con este lenguaje, pese a que en muchas WEB's aseguran que muchos lo usan para grandes proyectos ;)

salu2!
Responder