iPhone-Simulator for Windows/Linux/Mac OS X available (pre-alpha)

Hello!

After several distractions, numerous problems and other challenges, there is now a (very) pre-alpha version of my iPhone-Simulator for Windows, Linux and Mac OS X available for public preview!

See

Please note, that this software is “work-in-progress” and still very pre-alpha. If you want to test it, just try to run my “alternative ‘Hello World’” application (with animation and sound)

I am currently preparing a web page which will state what parts of the simulator already work and which not - together with a road map of foreseen extensions (I plan to have the “beta” ready before Whitsun - together with an iPad simulator and a DESKTOP version for Window/Linux/Mac OS X!

You may already start sending bug reports - but it might be better to wait until Monday next week as I plan to have most of the Corona 2.0 beta environment working til then (including the “native” stuff which is currently mostly missing)

Kind regards,

Andreas Rozek [import]uid: 4331 topic_id: 987 reply_id: 300987[/import]

Hi Andreas,

question: what is the purpose for this app? Can I use it with corona scripts?

Michael [import]uid: 5712 topic_id: 987 reply_id: 2292[/import]

Ok, I just saw it. Made with BlitzMax? [import]uid: 5712 topic_id: 987 reply_id: 2295[/import]

Mike,

yes - it will be able to run Corona scripts (not much unlike the Corona simulator for Mac OS X that comes with the Corona SDK) under Windows, Linux and Mac OS X (both within a “Simulator” environment (i.e. “sandboxed” and with fixed stage dimensions) and on the desktop (with multiple stages (i.e. windows) of varying size))

I am prepared to extend the current application with 3D graphics and Box2D physics (what means, that I may also “simulate” the upcoming “game edition”)

Currently, I am going to implement all features of the SDK 2.0

Kind regards,

Andreas Rozek [import]uid: 4331 topic_id: 987 reply_id: 2297[/import]

Nice,

are you using zeke’s LuaJit module for it? It really speeds things up. Don’t laugh but I was thinking about something similar. More an engine like, also made with BlitzMax to be able to use my corona script as a desktop application. But now I wait and see how far you bring this.

Michael [import]uid: 5712 topic_id: 987 reply_id: 2299[/import]

Michael,

thanks - before migrating to s.th. like a JIT (which could be done, of course) I would like to

  • complete the implementation of the Corona feature set (including 3D graphics and physics),
  • wait for Corona bug fixes and
  • fix my bugs

first.

While developing the Simulator I found quite a number of principal bugs in the Corona environment when I tried to understand how, e.g., the display model works. Even worse, BlitzMAX turned out to be full of (difficultly to be isolated) errors - and much of the delay was caused by locating these bugs and finding workarounds.

The whole system first has to be stabilized before I am going to add another layer of complexity (which might introduce unforeseen problems)

On the other hand, I plan to add a slightly distributed devlopment system to the simulator which simplifies development of Corona applications - but that’s s.th. for the second half of this year.

Kind regards,

Andreas Rozek
[import]uid: 4331 topic_id: 987 reply_id: 2301[/import]

Hi Andreas. I let two scripts run. There is no graphic output so far, right? [import]uid: 5712 topic_id: 987 reply_id: 2304[/import]

There *IS* graphics output - did the console window show any error message?

Graphics and sound - no video yet (and I did not yet test polylines) In detail, there may be differences between Coronas and my way of computing stage bounds (I do not yet take StrokeWidths into account, e.g.) [import]uid: 4331 topic_id: 987 reply_id: 2305[/import]

I downloaded your simulator and run the Corona HelloWorld sample and it worked except the font was different (Helvetica) and the “Hello, World” ran off the screen. The background image looked good. Interesting idea and I’m looking forward to seeing your progress.

Tom [import]uid: 6119 topic_id: 987 reply_id: 2306[/import]

Nope, no errors. I ran the rotation bug example here from the forum.

http://developer.anscamobile.com/forum/2010/05/04/texture-tearing-and-stuttering-rotations

On my own game it choked already at the first line which is just the beginning of a multiline comment.

–[[****************************************************************
[import]uid: 5712 topic_id: 987 reply_id: 2308[/import]

Nope, no errors. I ran the rotation bug example here from the forum.

http://developer.anscamobile.com/forum/2010/05/04/texture-tearing-and-stuttering-rotations

On my own game it choked already at the first line which is just the beginning of a multiline comment.

–[[****************************************************************
[import]uid: 5712 topic_id: 987 reply_id: 2309[/import]

Mike,

I fetched the example you mentioned and will have an eye on it (but not before tomorrow morning (german time)).

Concerning your own code: did you get an error message? Which one? I am using the official Lua distribution 5.1.4 - similar to COrona, as far as I know

Kind regards,

Andreas Rozek [import]uid: 4331 topic_id: 987 reply_id: 2313[/import]

When loading up a simple script that include ui.lua, I get the following error from your console:

Welcome to Andreas Rozek's iPhone Simulator for Corona
error while evaluating the given Lua script
Reason: [string "-- ----------------------------------------..."]:6: attempt to call global 'require' (a nil value)
stack traceback:
 [string "-- ----------------------------------------..."]:6: in main chunk

The start of my code is as follows (note the error listed is on the require line (6), but the reason string is line 5 ("-- --------…"):

-- ---------------------------------------------------------------------------
-- ---------------------------------------------------------------------------
-- MODULES
-- ---------------------------------------------------------------------------
-- ---------------------------------------------------------------------------
local ui = require("ui");

[import]uid: 5659 topic_id: 987 reply_id: 2320[/import]

The console window says

error while evaluating the given script
Reason: [string “–[[************************************…”]:9: attempt to callglobal ‘require’ (a nil value)

I think it is not choking on the comment but on this line:

ui = require(“ui”)

[import]uid: 5712 topic_id: 987 reply_id: 2321[/import]

Oops,

that was a really silly mistake from my side - I fixed it and will upload a new version in an hour from now.

Sorry for that bug!

Kind regards,

Andreas Rozek [import]uid: 4331 topic_id: 987 reply_id: 2337[/import]

Good morning!

I am currently uploading a slightly modified version of my simulator which now respects the different alpha ranges (0…1) or (0…255) in different contexts.

The rotation bug test should now be running (albeit it currently looks awful) when modified slightly:

[code]local rotationSpeed = 2;

local radarGroup = display.newGroup();
–radarGroup.xReference = 160;
–radarGroup.yReference = 160;

– Load Blue Image

local imageRadarBlue = display.newImage(“imageRadarBlue.png” , 10,10);
imageRadarBlue.alpha = 1.0;
radarGroup:insert(imageRadarBlue)
radarGroup[“imageRadarBlue”] = imageRadarBlue

radarGroup:setReferencePoint(display.CenterReferencePoint);

local globalRadarTimePrevious = 0;

function radarRotation()
local localRadarTimePrevious = globalRadarTimePrevious;
globalRadarTimePrevious = system.getTimer();

---- calculate rotation angle based on the elapsed time ----

local timeDelta = globalRadarTimePrevious - localRadarTimePrevious;

local newRotation = rotationSpeed * 0.03 * timeDelta;
radarGroup.rotation = radarGroup.rotation + newRotation;
end;

Runtime:addEventListener( “enterFrame” , radarRotation );
[/code]

I am using Cairo underneath which currently seems to have problems with the “imageRadarBlue.png” (although other PNG images work fine) - I will have to investigate that. In addition, my simulator currently prefers “setReferencePoint” over setting x/yReference directly (but this is definitely a problem I will have to solve as soon as I have fully understood Corona’s display and transform model)

Kind regards,

Andreas Rozek [import]uid: 4331 topic_id: 987 reply_id: 2343[/import]

  1. The display of the source string in the console still does not display the source. You give correct line numbers for your stack trace, but none of the actual source is correct.

  2. I get past require now, but fail when accessing display.newGroup in ui.lua.

  3. I would suggest a great set of test cases to be simply download all the samples on the corona site and get them to run. Once you’ve got them all running, then post us a new binary to play with. :slight_smile: [import]uid: 5659 topic_id: 987 reply_id: 2350[/import]

I would agree with testing your simulator against the Corona sample programs. I ran a few of the Getting Started samples on your previous simulator (before you updated it last night) and found some programs ran correctly and some had obvious problems.

I understand that you are calling this “pre-alpha” but it would be better to get the sample programs working and then posting the simulator in order to get better feedback.

Tom [import]uid: 6119 topic_id: 987 reply_id: 2354[/import]

Thanks for testing the current version!

I agree with your complaints and will try to provide you with another (improved) version by tuesday next week!

Kind regards,

Andreas Rozek [import]uid: 4331 topic_id: 987 reply_id: 2489[/import]