Re: iPhone publishing

good to know for the text,

about getTouchPosition etc, it's normally on, as a function call in lua,
or using MInputContext in cpp. You can see where the lua function is declared inside "trunk/dev/Maratis/Common/MScript/MScript.cpp".

and about the StandardRenderer, it's not incompatible, but we didn't had time to include and test the openglES2 context inside the xcode project. In dev/Additional/OpenGLES/MContexts are the GLES1 and GLES2 contexts (only GLES1 is included for now).

If you want you can try to include the GLES2 context, it still untested so your feedback will be a great help to improve the iphone port.

Re: iPhone publishing

http://www.maratis3d.org/wp-content/uploads/2011/06/iphoneShadows.jpg

I just added OpenGLES2 and a simplified Standard renderer smile
Shaders and dynamic shadows are now working on iOS !

But of course pixel shaders and dynamic shadows are slow, specially for the iPad (because of the fillrate).
There is still some optimization to do, but if you want to use the StandardRenderer and not the FixedRenderer, the best is to write custom shaders with a special care to optimization depending on the object (use simple vertex lightning for characters and small objects, reduce the lights number and the texture passes, etc).

For your shaders to run both on desktop and embedded system, add this on top :

#ifdef GL_ES
precision highp float;
#endif

Cheers !

Re: iPhone publishing

dybbuk wrote:

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)

Guys, I want to emphasize that YAW, PITCH and ROLL are orientation-independent, so they won't change with device rotation. YAW will always be around {0, 1, 0} of the device and so on for the other axis.

Re: iPhone publishing

Hi,

I am just wondering, is there any button to publish our game for iOS directly ?
After following this tutorial made by Nistur
http://nistur.com/projects/maratis-3d/tutorials/

, I want to have the tutorial running on an iPhone (a simulator would be fine too).
Any idea how to do this ?

FYI, I tried downloading and building the iPhonePublishing branch mentioned above, but it seems that it have a few linking errors.
http://codepad.org/BZOa6VgB

I am a C++ programmer but I am not too familiar with iPhone programming, so I don't want to delve further, yet.
Any ideas ?

Re: iPhone publishing

Hi, there is no button for iOS publishing,
you can use the iPhonePublishing branch.

The linking error is because someone added a new class (MLog) to the engine and didn't update the xcode project,
I'll update it and commit on svn.

Re: iPhone publishing

It's done, try updating from svn, the linking error should be corrected

Re: iPhone publishing

Thank you, the linking error is now gone, and I can build the project successfully.
But the problem is, nothing except a purple screen is shown in the simulator.
Any ideas ?

I am using XCode3 on Mac OSX Snow Leopard (10.6.8), and the build target is iPhone Simulator 4.3
Maybe this is a problem ? Like, too old ?

Anyway, so if I get this correct, the workflow to publish the game to iPhone, is to make the game as if we are going to publish it for Mac/PC first, and then use iPhonePublishing to publish it to iPhone ?

Last edited by zaraasran (2012-10-31 13:37:27)

Re: iPhone publishing

I'm also using iPhone Simulator 4.3 and it's working,
are the ressources correctly linked to the xcode project ?

About the workflow yes, you can make all the game using the editor and then publish it on iOS using this xcode project,
just replace the ressources with your own project and modify EAGLView.mm to open your project name (replace "Demos.mproj" with your project name).
- There is also some specific script function for iOS (like the touch and accelerometer)

Re: iPhone publishing

I did some debugging, and I found out that it seems the application can't load the scene
"levels/ballTest.level"

Maybe the levels aren't copied to the simulator properly ?
I haven't changed anything, so I guess the resources are linked correctly too.
That is, they appear under the "Resources" folder in xcode.
Unless I have to do another thing to do the linking properly.

Any ideas ?

[Update]

I think I found the reason. It seems that the resources are set up correctly, but the paths aren't.
So for example, I can load
"ballTest.level"

but not "levels/ballTest.level"

And of course the same goes for the other resources as well.
Any idea why it's like this ? The levels are still grouped under "levels" in the "Resources" folder

[Update2]

Ok, figured this out !
The colors of the folders under the "Resources" folder were all yellow, which seem to mean that the resources are going to be copied to the app root.

Ref: https://iphonedevsdk.vanillaforums.com/ … ories.html

So, I deleted them all first, and added them all again, and it worked. Phew big_smile
But I am not sure why it's like that on my side. Is it just me ?

Last edited by zaraasran (2012-11-01 15:46:01)

Re: iPhone publishing

Hi, thank you zaraasran,

it's probably my fault after modifying the xcode project, I probably linked the ressources in the bad way and send it to svn.
I'll try to update it better soon.

Re: iPhone publishing

Does iOS version above 4.x(5.x, 6.x) no longer support glsl function texture2DLod? When I running the example(load CartoonTPots.level) the log says “Call to undeclared function 'textureLod'”,my dev enviroment is xcode 4.5 + iOS 6.0,thanks!

Re: iPhone publishing

Hi erosnick,
I had a look on the web, nothing sure but yes it seems that iOS 5 doesn't support this function anymore,
strange, is it a bug of the os I don't know.

Re: iPhone publishing

Hi, anael, thanks for your fast reply:). I did a googling and find a note in  “OpenGL ES 2.0 API Quick Reference Card” by Khronos Group,it says texture2DLod "Available only in vertex shaders ". I'm totally confused+_+. I'll do some research for this.

BTW, althrough I'm new to Maratis, I'll say it is really an awesome engne! I like it's cute logo, it's easy to use editor and nice&clean render scene, also the code is easy to follow and it's a good start point to study build an custom game engine, thanks for your 10 long years working!

Re: iPhone publishing

It's a bit confusing yes, I guess you have to use texture2D instead and use a texture with mipmap disabled.

Thanks for the comments : )
welcome to the forum !

Re: iPhone publishing

I know this is late to post here, but, can maratis work on a iPhone 3gs ?
Atm, and likely to stay that way, anything higher is just too expensive.
Apple does love its pricing schemes wink

Also, short of not having ios7 ,  where  is one able to sell games/apps , if not on app store where
only current ios7 stuff is allowed ?

cu
vd

Last edited by VeganDev (2014-02-23 20:58:33)

Re: iPhone publishing

the xcode project might need to be update but it can normally work on all ios,
it's some time I didn't test the build, my mac system is not up to date with the newest emulator.

Re: iPhone publishing

Hey Vegan!

I currently work as an iOS Developer, and I think you can still publish if you're targeting 6.1.

Outside of the iTunes App Store, I don't think there's a distribution channel unless you're willing to cater to Jailbroken iPhones.

Speaking of which, are we considering porting the engine to Android? That would give us an open alternative to Apple. : )

Last edited by sunnystormy (2014-02-24 15:19:01)

Re: iPhone publishing

sunnystormy wrote:

Hey Vegan!

I currently work as an iOS Developer, and I think you can still publish if you're targeting 6.1.

Outside of the iTunes App Store, I don't think there's a distribution channel unless you're willing to cater to Jailbroken iPhones.

Speaking of which, are we considering porting the engine to Android? That would give us an open alternative to Apple. : )

Btw, I'm already working on a port for Android. Just haven't had time to finish it as I've been refactoring some other stuff.

Re: iPhone publishing

Dahnielson wrote:

Btw, I'm already working on a port for Android. Just haven't had time to finish it as I've been refactoring some other stuff.

Awesome, man. Let us know when you finish it. I've got a Nexus 7 that I wouldn't mind using for testing. smile

Re: iPhone publishing

sunnystormy wrote:
Dahnielson wrote:

Btw, I'm already working on a port for Android. Just haven't had time to finish it as I've been refactoring some other stuff.

Awesome, man. Let us know when you finish it. I've got a Nexus 7 that I wouldn't mind using for testing. smile

Yep, got an Nexus 7 myself (the old one with Tegra 3) which was my motivation in addition to getting Maratis onto OUYA.

Re: iPhone publishing

sunnystormy wrote:

Hey Vegan!

I currently work as an iOS Developer, and I think you can still publish if you're targeting 6.1.

Outside of the iTunes App Store, I don't think there's a distribution channel unless you're willing to cater to Jailbroken iPhones.

Speaking of which, are we considering porting the engine to Android? That would give us an open alternative to Apple. : )

Im a bit worried about androids fractured hardware base, so in part that was why I was going for the more stable ( in that regard ) iOs base.

BUt I do have a 10" tablet I guess that would be fun getting maratis to run on..its nothing amazing b ut it might be fun tinkering.

I thought about OUYA, but I dont' think the hardware specs are particularly impressive, and I h ear ? the controller is kinda cheap ? <what do others here think ?>

Anyway , the problem I may not have explained well enough, is ( imho anyway) the sad truth of expensive apple hardware , and that to publish, while my current imac 17" meets the requirements np at all, I don't when it comes to age of the imac itself, which is 2006, and minimum ( given mountain lion is bare minimum to get on Ios app store) is mid 2007, so im forced to buy hardware, which is really I think a sad deal apple  has setup, and where its SO much easier to get going with android, unless Ive missed something..I got a Visual Land Prestige  10" tablet for $73 +$10 shipping, and I'm SO pleased with it, though  I had to  'hack' in google app market LOL..easy enough, but major hassle. wink) So my point is,  with the huge market android has though Im unsure of all else, its dreadfully easy to get going and published ( and 3/4's cheaper albeit than apple), even though im a bit more sold on the iOS market and their innovation never ceases to amaze me..but anyway just ideas Im throwing out there to see what others think.



cu
vd

Last edited by VeganDev (2014-02-26 05:09:35)

Re: iPhone publishing

Hey, Vegan.

I wouldn't knock the OUYA quite yet. The Tegra SoC it uses is still quite formidable. The controller also utilizes a nice Bluetooth DSP for sending and receiving signals to-and-from the console.

As somebody who owns a Raspberry Pi, Beaglebone Black, and has a vested interest in ARM-based SoCs, I think the OUYA is a nice piece of hardware, and there's no reason to dismiss it in any way. What's even cooler is the fact that we'll soon have 64-bit ARM CPUs to tinker with, which opens up a whole new world of energy-efficient computing possibilities.

The Apple ecosystem is certainly "stable", but it is also "pay-to-play", which I don't like. I think open-source technology is the natural direction for our industry to go, as it makes everything more accessible for developers and end users.

I'm sorry that you're going to have to upgrade your machine in order to use the latest tools... have you considered just purchasing a MacBook Air? Or the 13-inch MacBook Pro? Both of those are just a little over $1,000, and would give you access to everything you need to continue doing iOS Development/Publishing for the immediate and near future.

I know it's a little pricey, and I definitely feel you. The Mac I'm using is from late 2007, and the cost of new hardware is why I haven't upgraded yet. When I'm not using this machine, I'm using a new Lenovo I recent got which runs Debian "Jessie", so I sort of have one foot in, one foot out.

Anyway, let us know what you decide to do. I always like to hear other peoples' perspectives on technology and what they think.

Cheers! smile

Last edited by sunnystormy (2014-02-26 16:22:52)

Re: iPhone publishing

I've just heard too much 'iffy' about ouya to put my money on it.

I sold my imac 17" today, so I have more options, and Im heavily leaning on buying a MacBook pro so I have mobility  for dev'ing, we'll see.

YOu don't need to upgrade btw, your mac can dev, because you meet the mac hardware requirement at least, but you also need , as you prob. know, 2gb of ram and a intel cpu based system.

I can go android today but Im just not sold on the stability of the market OR the stability of the software ( from my own and friends experience, we know that to be so, unfortunately ) , so atm I truly think mac may be the only option.

I also signed up for PSM via psvita, for free so that option Im definitely pursuing wink,,,The vita is a really kewl device and has amazing visuals, and is portable of course always a plus, but Im not sure how its marketshare is going to hold up given the competition, we'll see. I think it will increase to    game sharing with PS4.

I"d love to see more opinions on this.

Good luck with your mac dev'ing, as you certainly should be good to go, but you need Mountain Lion to 'publish' OR in fact, to use xcode '5'.

cu
vd

Last edited by VeganDev (2014-02-26 22:34:03)