Game Development Community

a few woes

by rennie moffat · in iTorque 2D · 06/17/2010 (9:30 am) · 181 replies

Hi there, anyone who has been following me this week understands my situation. I built, stupidly, my app in TGB, not iTGB, anyhow, essentially I have simply been transferring all I did into iTGB however I have run into two problems.


1. when I run my game it crashes.

2. my player animation (idling) is of the same size (object is 32x32) however in TGB the actual sprite, at least what was visible was only a quarter of that size. It sat, very quietly in the middle, in other words it did not take up the whole 32x32 space. In iTGB however the object is still 32x32 but the animation is bloated. It is stretched out to fill the entire space. I am not sure why, any suggestions?

edit; cont from pt2.
I have just noticed, as I say, my level, opened up, everything appears to be fine. all objects, positions, sizes are correct. However, when I drag in those same elements into the editor fresh, they are a good 20% larger. I think this may have something to do with resolution, but in the level.t2d's I see no "resolution" or something like that to adjust.


3. Images are not being called.
I have redone every image i needed, created animations, etc. Saved then reloaded my game. All images are gone. They still exist in the folder "game/data/images" but are not called into the editor.

3 cont.
I just created a whole new project and loaded in one image, thinking one of my files may have corrupted the project, but the same thing happened. The message i get is...
Quote:
Invalid Project Data
This project contains 1 invalid datablock. This is likely because a referenced image file was deleted from the project directory.

How can this be? I created the image, simply calling into the editor, pulled it onto the level editor, saved, then reloaded the game just to test.







If anyone can help me out with these pressing issues I would greatly appreciate it.

Thanks.




About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.

#61
06/21/2010 (9:00 am)
ok I am currently VERY frustrated.


I have began using 1.3.1

A new project always states, when ran, can not run can not find player executable

So I just duplicated iPhoneExample, renamed accordingly, imported my own images

Images are POT

I place images in editor/level builder.

I run game expecting to see images but all I have is a black screeeen!



What the hell is going on?



#62
06/21/2010 (9:03 am)
PS. is sourceRect part of this. I went to turn it on as the example seems to use it, however, finding the top left and right corners of each object in world space seems awkward, I could not figure out how.


#63
06/21/2010 (9:41 am)
Hi Rennie, can we check off a few things ...

1. Do you have an image in the editor on screen?

2. Does this image appear as a (e.g.) t2dstaticsprite in your level file, game/data/levels/<levelname>.t2d?

3. Have you copied the datablock for the image from game/managed/datablocks.cs to game/data/levels/datablocks/<levelname>_datablocks.cs

#64
06/21/2010 (9:47 am)
It works!.

Hooray, I forgot about that step. Why is it that we have to do that (re: #3)?

However, not all is well in fairly tale land. My behaviors are not showing up either.
I have them in game/data/scripts/behaviors

currently there is no dso to go along with the behavior however no errors are showing and the behavior does work in TGB and iTGB 1.4.1 beta. IS there something I am not doing?


#65
06/21/2010 (9:55 am)
I don't use behaviors, but don't they have to be in game/behaviors ?
#66
06/21/2010 (10:02 am)
YOU ARE RIGHT SIR!!!


Sorry, but in iTGB Beta, they were in scripts.

Cool,
Thanks so much.


#67
06/21/2010 (10:10 am)
Hey, I should get a support job with GG ;-)
#68
06/21/2010 (10:50 am)
You got my recommendation.

30 dollars a year for you!!!


LOL
#69
06/21/2010 (11:02 am)
I'll bump that salary up quite a bit if you can help me with this Scott,


So I got my project into xcode (just a very small level to test), it appears, but when I click anywhere, my player should move there, he does not (he does in iTGB tests) also there is a "stickiness of the mouse", meaning I click somewhere, the mouse arrow stays there almost frozen for a second then releases.

Other than that I am very happy.




#70
06/21/2010 (11:22 am)
If the player moves in TGB on the PC/Mac but not on the iPhone then it normally indicates that UsesPhysics = "1" has not been set on the sprite?
#71
06/21/2010 (11:26 am)
Ok...
I have setPhyicsSuppress on the object in a behavior and in the editor, physics send and recieve are off.


::?
#72
06/21/2010 (11:29 am)
Did you set physics suppress to true, I would set it to false if this is the case.
#73
06/21/2010 (11:30 am)
it is set to true.

But I would think that would be what I want as I want no physics applied. No?


Will check.
#74
06/21/2010 (11:33 am)
I set it to false, in code.


However, it has no effect. My player, still does not move.

#75
06/21/2010 (12:06 pm)
The place where behaviors are meant to be is different between 1.3.x and 1.4, keep that in mind
#76
06/21/2010 (12:08 pm)
right, as I say that is already done.

The problem is my player does not move. So it does in iTGB tests, just not iPHone simulator.


:??
#77
06/21/2010 (12:13 pm)
Post your code for moving the player and I'll take a look.
#78
06/21/2010 (12:29 pm)
physics enabled is active (or better as per 1.3.1, the corresponding checkbox in the editor)
#79
06/21/2010 (9:18 pm)
ok, yes I posted another thread as I thought it might be more helpful as it might help pin point a possible problem, but better to stick to this thread.


I have behaviors working in the iPhone Simulator, I know this because I made one where an object would switch positions on a schedule. Worked fine. However, my main behavior, determining my players movement does not.

Tested in iTGB it works, in XCode it does not.

The behavior is constructed so that where ever I click in worldSpace, the player moves there.

So behaviors, work, but not that, and I can not seem to find other threads that deal with this specifically. My physics are false on the object, collisions are sent and recieved. I don;t think it really matters but I know you had mentioned that Marc, at least setting physics suppress to false. I did and no dice.



: not sure what to do.
#80
06/22/2010 (12:32 am)
I think GG needs to concentrate more on making new versions backwards compatible, so that existing users will be more inclined to use the latest software. Also, I think they need to work on making it more easy to port from one version to another. One of the things that initially drew my attention to Torque is that they claimed that it was very easy to develop software for a number of different platforms. In reality this is clearly not the case, but I think it could be. I've ported things from TGB to iTGB and I didn't find it hard, but I have been developing software for 20+ yrs and I think new comers will probably find it harder. With a few modifications, personally I think it would be easy to have one editor that works for all versions of their software. The different versions are all so similar, I can't believe we have so many frustrations. In my opinion, they are shooting themselves in the foot, and from what I am seeing now I expect things to get worse.

To give you an example, I ported the Breakout Tutorial code from TGB to iTGB in just a couple of days and I found it easy (and that was just after a week or so of working with Torque with no prior experience), but unfortunately no-one seems interested in even looking at my code. In my opinion, people need to think more and search the forums more before posting questions, because most of the answers are already here in the forums and in the documentation.

BTW, for the most part iTGB and TGB are almost the same except for some small differences, so stop making it appear as though they are so different. The original TGB documents are still valid here also.