Game Development Community

TGB and iTGB: compatability, controls and other questions...

by Jereis Zaatri · in iTorque 2D · 05/08/2010 (10:55 pm) · 6 replies

Hello,

So I just purchased iTGB recently and I'm working with a group of people using TGB and I have a few questions in regards to that.

1. We are making an iPhone game, so how much of an issue will it be if some people are working on it from TGB and others from iTGB? Is it just better off to do it in TGB and then port it?

2. Is there something that needs to be changed from TGB to run under iTGB? I tried running the game we're making, but it hangs right after you go from the menu screen into the game.

3. What are the top 10 things that separate iTGB from TGB other than obvious fact it's for iPhone?

4. In terms of controls, for some one making the game from TGB, what considerations need to be made so it can be smoothly ported over. In terms of TGB objects and functions how different are they?

5. Any iTGB touch screen control related tutorials you recommend to check out?

6. Lastly, we currently have the controls done through keyboard. I'm planning to have the controls such that the player walks towards the spot you tapped. Is there a tutorial where you have a character walk to a set point while going around obstacles?

#1
05/09/2010 (11:04 am)
@Jereis -

1. I highly recommend everyone work with iTorque 2D. While doable, it's not a good idea for a team to be working with different versions of the tech. This way, you will save development time and not run into compatibility issues.

2. Tough to say without seeing your project. Are you running from the editors, stand alone, simulator, or device? I believe any of the following could be a problem:

  • You have not compiled DSOs or you are using TGB's version of DSOs (not compatible with iT2D)
  • You are not using the level datablocks system (covered in the PDF docs that ship with iT2D)
  • Your assets are not optimized and you are chewing up too much memory
  • You are calling an object or function that exists in TGB, but iT2D

3. Top 10? Eesh...let me see if I can narrow it down to just 10.

1. Lots of engine (C++) changes to optimize the engine's execution of script

2. ImageMap has been optimized to the point where settings need to be strictly adhered to. For example, DO NOT use filter pad. Try to keep your imageMap texture resolutions square and in powers of 2. Use the optimized flag on them if this is the case. Avoid going above 512x512 for any texture

3. Physics must be enabled on a per object basis. This helps decrease how much CPU scene objects chew up per tick. The only objects that should have physics enabled are ones that move or collide

4. Development process is pretty much the same, except iT2D has the additional deployment process. This is used for both testing and packaging. This requires each project to have its own Xcode solution with the appropriate resources and frameworks added, plus a provisioning profile

5. Optimizations for iT2D are a lot more important, some even necessary. Writing complex behaviors or any heavy logic in C++ is recommended.

6. Input systems are drastically reduced to touch and accelerometer. I guess there is an option for Bluetooth keyboard support with the iPad some day, but we haven't gotten to that point yet.

7. All datablocks you create can be loaded and unloaded on a per-scene basis. Greatly helps with loading times

8. No more 3D shapes

9. New project settings tabs/settings in the editor that help manage your iPhone project

10. Hooks for iPhone specific APIs and 3rd libs, such as OpenFeint

Back to the questions...

4. During development, mouse clicks are touches. Joysticks represent accelerometer. For gestures, you will pretty much have to test on the device. No real way to test those on OS X or Windows.

5. There is one, but it is not up to date. We are releasing new docs and examples with v1.4

6. There are several approaches to this. One idea is to use a move-to routine. Again, you will be utilizing touch, gestures, and accelerometer. However, as I mentioned earlier that might be some access to bluetooth keyboard...but we haven't gotten that far yet.

I hope these answers help. Let me know if you have anymore
#2
05/09/2010 (11:50 am)
Thanks for the help,

Going back to #1, how hard would it be to work on it using TGB and at the end port it over to iTGB, assuming we keep all the optimizations in mind? The game doesn't really use any of the iphone specific controls. So in terms of scripting, a click translates to a touch without any need to rephrase any of the call backs, functions.. etc?

As for #2, the hang happened when I opened the project in iT2D with windows and ran it.

Also whats the easiest way to find where the user clicked on the screen in terms of x,y coordinates in the game?
#3
05/09/2010 (12:30 pm)
it would be a significant work as various things like source rect etc are not present on tgb. also components aren't present nor do you have support for pvr present.

that are things that will require large parts of the asset or better their datablocks to be redone.
#4
05/09/2010 (12:57 pm)
I'm a little confused... so is the problem that iTGB does not have some things that TGB has? I don't see the problem if iTGB has something that TGB doesn't as I won't be using it. The game is designed such that all you're doing is clicking (tapping) your way through it. Sorry if I'm sounding naive, but I'm still learning everything there is to TGB.
#5
05/09/2010 (1:02 pm)
@Marc - Up until 1.7.5, you are right. However, TGB 1.7.5 received several upgrades based on work Luma did for iT2D. TGB 1.7.5 has source rects now. Similarly, we are going to merge some 1.7.5 improvement from TGB into iT2D.

You are on par with the work load, though.

@Jereis - Going from TGB to iT2D is going to require a lot of extra work one could save if they just work in iT2D.
#6
05/09/2010 (2:04 pm)
Any tutorial recommended for porting something over from TGB? At this point I may as well port whatever has been done already.

Also I was skimming a few threads and noticed some people recommending not to even having particle effects. Are particle effect impractical to run on the iphone?