A Corona Simulator of a different kind.

I had a question on the #gameai IRC channel about my game. One person asked me if it’s possible to run my game in a simulator because he didn’t have an iOS device.

Well we all know that’s possible if he downloads Coorona and has access to my source code. But what I’d like is a simulator that allows running my app after it’s compiled. Maybe an intermediate format that is between source code and compiled app.

Now that would come in handy. [import]uid: 295 topic_id: 14571 reply_id: 314571[/import]

If the other person has a developer License *from Apple* then you can build for the device and send that to them, they can sign the app and run it on their device, so eliminates that *intermediate* format you are after.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 14571 reply_id: 53917[/import]

It is possible to byte-encode lua scripts : http://lua-users.org/wiki/LuaCompilerInLua

Basically it renders the source code unreadable by the human eye.

I haven’t tested whether or not Corona will load byte-encoded lua files however, I know back in the PSP days with an app I made that was similar to Corona (but for PSP) LuaPlayer Euphoria it did handle byte-encoded lua files.

I will try and test this myself, but if someone beats me to it post your results :slight_smile: [import]uid: 84637 topic_id: 14571 reply_id: 53921[/import]

Or, we keep pounding on Carlos (I mean, sending him cookies!) to include an option to build to Mac or Windows desktop. That would solve the problem. :slight_smile:

Jay
[import]uid: 9440 topic_id: 14571 reply_id: 53985[/import]

jayantv, I’m not sure I understand that. Is this the same thing as getting their UDID and building with that then sending them a build via TestFlight? [import]uid: 295 topic_id: 14571 reply_id: 53986[/import]

Danny It’s not just a bytecode of a Lua script that I need. It’s a bytecode version of the complete game which includes all the Corona API calls. Here’s what I mean…

The person wants to develop a Lua AI module for my game. The AI module is pure Lua and runs on his own server which has the Lua interpreter installed.

Now he needs a platform on which to test his AI module. He can run my game on his iOS device to do that. My game allows the IP address of his sever to be entered. This will then enable him to play against his AI that resides on his server

Or he can download Corona, I can give him my game source code, then inorder to test his AI module he can run my game, and enter the IP address of his server

That’s the catch. I don’t want to give him my source code and he doesn’t want to buy an iPhone.

So if there’s a way he can run an intermediate bytecode version of my game (pure Lua + Coronal API calls and all) in the Corona simulator, it would solve my problem. [import]uid: 295 topic_id: 14571 reply_id: 53988[/import]

By the way. If anyone wants to see this in action. I can set you up with the server AI module and a build of my game that will allow you to connect to your own custom-built AI on your own server. It’s actually pretty cool to see your server play a game against you on your iPhone. The AI server can handle multiple game connections too. [import]uid: 295 topic_id: 14571 reply_id: 53989[/import]

When you build for Xcode Simulator does it spit out a file that the Xcode simulator loads? Or does it send a data stream to the simulator?

If it’s the former you should be able to build for the Xcode Simulator and send him that file – he can install Xcode and then run what you send him.

I think. :slight_smile:

Jay
[import]uid: 9440 topic_id: 14571 reply_id: 53990[/import]

Thanks Jay,

I don’t know which, but I think it’s the 1st.

Stupid of me to ask, but does he need to be an Apple developer to get Xcode? Been so long that I forget. [import]uid: 295 topic_id: 14571 reply_id: 53991[/import]

Here are some steps you can use.

Person 1 (Corona App Developer)

  1. Build your app for the Xcode simulator. The dialog will ask where you want to store file.
  2. Look in the directory from step 1 for yourapp.ap, this is actually a directory and not a single file.
  3. Ship yourapp.app to your friend. You might want to zip it up since it’s a directory containing many files.

Person 2 (Non-Corona Developer)

  1. Receive app and store it someplace ( like desktop)
  2. Install Xcode (if they haven’t already).
    3 Download iphonesim from https://github.com/jhaynie/iphonesim
  3. iphonesim is a mac app. What you download is step 3 is the source code and you still have to build it. Look for iphonesim.xcodeproj and double click to start xcode.
  4. Build a standalone mac app by doing a build for archive and archive (check google for help on building and archiving a mac app in xcode if you have trouble)
  5. Look in the directory where you told the archive to store the files. For example, /Users/lbp/desktop/iphonesim.20 PM/usr/local/bin
    In that directory should be a file named iphonesim
  6. Open a command line window
  7. cd to the directory from step 6
  8. Run the following command
    ./iphonesim launch /Users/user/desktop/yourapp.app
    substitute in the correct path for where you stored file in step 1.
    This works for me but I’m both person 1 and 2, so I could be missing something. I suggest you try it yourself and clean and clarify where needed. [import]uid: 67839 topic_id: 14571 reply_id: 54003[/import]