Game Development Community

Setting up for iPhone

by Christian · in Torque 2D Beginner · 05/14/2013 (8:13 pm) · 6 replies

A couple quickies about setting up a project for iPhone development.

Is there a simulator for Torque 2d (or was that just part of iTorque)?

Before getting to the simulating/testing on iPhone part, any other considerations or tutorials I should check out (background sizes, resolutions, etc)?

Would love to hear any other feedback or experiences that Torque 2d devs have had creating for iPhone, that may help.

Thank ya's,
Christian

#1
05/15/2013 (5:19 am)
@Christian - iTorque did not really have a simulator. You could run the game at different resolutions on Windows and OS X, which would match the iOS device you were running on. The buttons in the old editor just automated the resolution setting. This can still be done in script. See the following two scripts:

modules/AppCore/1/scripts/canvas.cs
modules/AppCore/1/scripts/constants.cs

While there isn't a roadmap for it yet, the iOS platform layer will be getting a major cleanup pass in the future.
#2
05/15/2013 (9:02 am)
Alright, sounds good.

#3
05/18/2013 (2:44 pm)
Hi,

i´m new to this forum and this is my first question. I Hope its ok to post in this thread.

My question is related to the IPhone.

When developing a game and setting the resolution for the IPhone 5 the game engine window is more width than height. This is fine so far but if i want to only make a vertical game its not really the nicest way to rotate all the pictures and stuff to match the width.

What i want to ask: Is there a better way to work with the engine resolution instead of making a "vertical" scroller who is "horizontal" aligned in the development?
#4
05/18/2013 (2:54 pm)
Moerk I just went through that a couple days ago.

Goto defaultpreferences.cs
Near the bottom you'll see these two lines:

$pref::Video::defaultResolution = "768 1024 32"; //"640 1136 32";
$pref::Video::windowedRes = "768 1024 32"; // "640 1136 32";

These show my changed values (iPhone 5 is the 640 1136 32, but for some reason that wasn't working correctly, so I switched to 768 1024 32 which is close and works for development purposes.

Hope this puts you in the right direction.
#5
05/18/2013 (3:01 pm)
Hey Christian,

thanks for showing me your code. I already checked out the defaultpreferences.cs and made the same change.

But then i was not sure if this is a correct way. Theres also a problem with the engine window (maybe its more related to my screen resolution ;)) because the engine window is a little bit too high for my screen. But using your smaller resolution is nice so far.

Do you have the possibility to test it on a IPhone?

Thank you, Moerk
#6
05/18/2013 (3:15 pm)
Haven't figured that part out yet, no idea how to run it on iPhone.