Port Corona games to Windows?

Is there any way to build a Corona app to run as a windows desktop application? Obviously the simulator already runs on Windows but I would like to be able to package an application and deliver it to users as a desktop app.

Anyone have any info or thoughts on this?

[import]uid: 11540 topic_id: 27655 reply_id: 327655[/import]

This is a brilliant idea and shouldn’t be to difficult to incorporate since, as you say, it already runs on the simulator.
+1
[import]uid: 129287 topic_id: 27655 reply_id: 112232[/import]

Nice request. We have mac app support planned. I suggest you continue to vote this up if you guys really want windows support.

Alternatively for the time being it should be relatively straight forward to port your game to LOVE: https://love2d.org/ [import]uid: 84637 topic_id: 27655 reply_id: 112348[/import]

Thanks for the reply.

I have seen Love but haven’t looked at it long enough to see what the porting process would look like, now I will.
[import]uid: 11540 topic_id: 27655 reply_id: 112355[/import]

@bpollet: Your welcome. I know it’s not the best solution but for the time being it’s probably the most straight forward method since love also uses lua and has similar features and api’s to corona.

Basically you would do the following

  1. Download love
  2. Learn the sdk (similar to corona)
  3. Port your game, test test test
  4. Download the source code for love along with visual C++ (obviously your going to need a windows machine)
  5. Build love using visual C++ including your project so you get a compiled binary so no one has access to your source.

I’m sure these details are listed on there wiki [import]uid: 84637 topic_id: 27655 reply_id: 112357[/import]

+1 for windows desktop builds [import]uid: 147305 topic_id: 27655 reply_id: 112395[/import]

+1 to desktop builds.

Seems to me you could do it dirty in probably a single afternoon by simply providing a way to launch an app in the simulator via command line (specify a directory and it automatically launches main.lua for example) and if such a command line option is specified, launch the simulator in a chromeless window (vis a vis, no menu or anything like that) or full-screen (a separate command line option?).

Maybe provide a “Corona Player” download that is nothing but the simulator stripped of all the developer-oriented stuff… just enough to launch and run an app. Then people could package that player along with their app, sort of like a VB/VC++ runtime (or instead require it be installed separately ala Flash, but I’d prefer the first option myself since it’s more friendly for end-users that way).

Again, that’s the quick-and-dirty way to go, and if nothing else could provide a way for developers to ship demos out to people easily… there’s still problems though to making it something you’d want to use for a “real” project… the first that comes to mind is keyboard/mouse events. I don’t recall, but do we currently get mouse move events in the simulator if you HAVEN’T clicked and held the mouse button? I think not, but I’m not sure. That would be required to make desktop games work properly if mouse-controlled. Also, being able to receive keyboard events would be necessary in many cases. Obviously these two things are probably a bit more work. [import]uid: 10600 topic_id: 27655 reply_id: 112569[/import]

+1 for evolving further with Windows desktop build.
[import]uid: 131700 topic_id: 27655 reply_id: 112882[/import]

+1

make it happen

+1

make it happen

+1

Make this happen :) 

As for now I think the best way to go is really LOVE…

I would approach it differently… Map the API calls you use in corona (display.newImage, display.newGroup, native.*, etc)

Implement the corona objects and function you used for example:

display = {} display.newImage = function( ... )   --implementation for newImage in LOVE --in the returning object you'll need to implement the ImageObject functions --like :removeSelf, :translate and properties like .x, .y end display.newGroup = function()   --implementation for newGroup in LOVE end . . .  

Once you have the ‘Corona’ main objects like ‘display’, ‘native’, ‘system’, ‘graphics’, ‘audio’, ‘Runtime’ and any other object you use you will not only port your game with less bugs (because it’s much easier to test that each of these functions works correctly) but you will also have in hand a generic wrapper that will allow you to automagically port ANY future Corona game you develop to windows.

We have done the same thing with MOAI when we thought to replace Corona and didn’t want to port the games we have one by one but eventually abandoned the project because we decided to stick with Corona SDK (and we havn’t looked back since!) 

The tricky part is to implement all the Corona object methods like :removeSelf, but even trickier is the part of writing the properties like .x, .y, we had to convert setting .x, .y to function calls in MOAI and it required using a metatable with a __newIndex and __index functons…

It’s quite magical to write such a bridge and then run your application in a different SDK with no code changes and see it runs :slight_smile:

+1

Make this happen :) 

As for now I think the best way to go is really LOVE…

I would approach it differently… Map the API calls you use in corona (display.newImage, display.newGroup, native.*, etc)

Implement the corona objects and function you used for example:

display = {} display.newImage = function( ... )   --implementation for newImage in LOVE --in the returning object you'll need to implement the ImageObject functions --like :removeSelf, :translate and properties like .x, .y end display.newGroup = function()   --implementation for newGroup in LOVE end . . .  

Once you have the ‘Corona’ main objects like ‘display’, ‘native’, ‘system’, ‘graphics’, ‘audio’, ‘Runtime’ and any other object you use you will not only port your game with less bugs (because it’s much easier to test that each of these functions works correctly) but you will also have in hand a generic wrapper that will allow you to automagically port ANY future Corona game you develop to windows.

We have done the same thing with MOAI when we thought to replace Corona and didn’t want to port the games we have one by one but eventually abandoned the project because we decided to stick with Corona SDK (and we havn’t looked back since!) 

The tricky part is to implement all the Corona object methods like :removeSelf, but even trickier is the part of writing the properties like .x, .y, we had to convert setting .x, .y to function calls in MOAI and it required using a metatable with a __newIndex and __index functons…

It’s quite magical to write such a bridge and then run your application in a different SDK with no code changes and see it runs :slight_smile: