1

(47 replies, posted in Engine)

After adding those bits, the .font loader is indeed working.

This bit of code in my Text.lua now displays the accelerometer data.

mx = getAxis("ACCEL_X")
my = getAxis("ACCEL_Y")
mz = getAxis("ACCEL_Z")

    text = "x = " .. string.format("%.3f", mx) .. "\ny = " .. string.format("%.3f", my) .. "\nz = " ..  string.format("%.3f", mz)

    setText(Text0, text)

2

(47 replies, posted in Engine)

I'm guessing the getTouchPosition(id)", "getLastTouchPosition(id)", "getTouchPhase(id) commands in iPhonePublishing aren't yet committed to svn, as I searched through the code for those strings and find nothing. I did see that a touchPoints dictionary is created in EAGLView.mm.

3

(47 replies, posted in Engine)

Hmm, I suppose I could try uncommenting "//engine->getRendererManager()->addRenderer(MStandardRenderer::getStaticName(), MStandardRenderer::getNew);" and see if the StandardRenderer works in iOS. I'd have guessed it was commented out due to incompatibility, but maybe not?

4

(47 replies, posted in Engine)

Ah, I'll try adding those lines and files.

Is there a list somewhere of what Maratis features are and aren't yet supported on iOS? I'd be happy to start compiling one.

TTF font loading would be on the not supported list.

The StandardRenderer is also not supported in iOS? I got an error when I changed "FixedRenderer" in EAGLView.mm to "StandardRenderer".

5

(47 replies, posted in Engine)

Interesting. Thanks for the info!

I opened the Text.level file in Maratis and changed each text item to use GenR102.TTF.font instead of GenR102.TTF. They looked fine in Maratis, but again are invisible when compiled into an app with xcode and sent over to the iPhone.

After switching the text items to use the GenR102.TTF.font rather the .TTF, I tried duplicating one of the text items in Maratis. I moved the duplicate and noted that it was not visible -- the .font not rendering? I changed that text item to use the .TTF and it appeared, I then changed it back to use the .font and it remained visible. I'm not sure what this means.

I suppose if I can't get the text generators to work on the iPhone, maybe I can store the sensor input in variables in lua and somehow pass them to an NSLog command and read them in the xcode console? Though eventually I'd love to be able to display text, right now I'm just trying to see what the sensor values look like so I can decide how best to use them.

I'm impressed by the power built into Maratis and hope I can figure it out. The rendering speed and built-in physics engine are great. I'm curious whether anyone has developed apps that are available on Apple's app store using it.

Thanks again for developing Maratis, and for all your help.

6

(47 replies, posted in Engine)

A look through the code led me to think "ACCEL_X", "ACCEL_Y", and "ACCEL_Z" might store accelerometer values, so I changed Text.lua to the following:

-- get objects
Text0 = getObject("Text0")
Text1 = getObject("Text1")

-- scene update
function onSceneUpdate()
    

mx = getAxis("ACCEL_X")
my = getAxis("ACCEL_Y")
mz = getAxis("ACCEL_Z")

    text = "x = " .. mx .. ", y = " .. my .. ", z = " .. mz
    setText(Text0, text)

    text2 = "testing accelerometer input"
    setText(Text1, text2)

end

Installation of the Text project on the iPhone results in a blue screen with no visible text. Maybe either the font's not rendering, or some other problem has occurred?

Thanks for any help or info.

7

(47 replies, posted in Engine)

Hi,

I checked out the latest from svn and am able to compile the example.xcodeproj and install it on my iphone. I'm also able to change which level is loaded by altering the "Start file=" line in Demos.mproj and recompiling. So far so good!

What I can't seem to figure out is how to use the accelerometer or touch input. For example, I'd like to be able to tilt the iphone or touch the screen to pilot the car in Physics.level. Is there a magic incantation, a predefined variable I can use in the script to access these iOS inputs?

Thanks for any help.

-Zach