Game Development Community

Upgrade/Downgrade

by Craig Perko · in Torque Game Builder · 01/12/2006 (1:32 pm) · 8 replies

I can't seem to find a clear list of things that have been changed in these new alphas. I'm pretty adept at Torque2D 1.0whatever system, so I'm hesitant to change unless the upgrades are significant.

Can someone point me to a list of what the alpha(s) have changed?

-Craig

#1
01/13/2006 (4:00 am)
Have you looked at the change-log document in the "docs" folder?

- Melv.
#2
01/13/2006 (6:24 am)
Hm. I'll go download it, then. I hope it has a list of changes for each iteration, rather than only the most recent.

I don't know why I assumed there would be one online...

-Craig
#3
01/14/2006 (11:47 am)
We just append the change-log so there's a list of stuff all the way back to the changes that moved up to v1.0.2.

Quote:so I'm hesitant to change unless the upgrades are significant
The updates are significant. Don't forget that v1.0.2 wasn't a stable product release, it's no different than the existing release except it had more bugs and less features.

One of the biggest changes was the renaming of the objects from fx<>2D to t2d<>.

- Melv.
#4
01/14/2006 (1:44 pm)
I've been working with the Alpha2 release for a day or two, now, and the code conversion seems to be going very smoothly. Aside from a weird sprite initialization problem. Not sure what that was, but I just rewrote that bit of code and it all works again.

Thanks for your hard work.

-Craig
#5
01/14/2006 (1:48 pm)
BTW, the collision physics are VERY much improved. I like that.

-Craig
#6
01/23/2006 (5:30 am)
I guess this is as good a thread as any to detail my experience with the conversion from 1.0.2 to Alpha 2.

For the most part I just had to search and replace fx(.*)2D with t2d\1. In my datablocks I had to change mode and textureName to imageMode and imageName. For my collision material datablocks I dropped relaxation and in one case added immovable. I had to change setCollisionScale to setCollisionPolyScale in a couple of places. I didn't need to make any changes at all to my main .gui file.

And well, that's all the changes I needed to make! But maybe I need to make some more because I'm having some really strange problems, and maybe it's just something simple I'm overlooking.

First of all, I have a series of balls that are supposed to bounce against each other. But in Alpha 2 they don't work correctly. Those that are already moving will bounce off the others, but the ones they hit don't move at all. I've tried several different collision materials with no effect.

Secondly, my routine for zooming the game board no longer works correctly. I was able to fudge it, but it looks like setCurrentCameraArea is broken in Alpha 2 - or relies on some other factors I haven't yet set up. Here's the different code I had to use to make my game-board zooming work ($editorZoom slides between 0.75 and 1.0.):

The original 1.0.2 code doesn't work properly in Alpha 2:
%width = 1024 / $editorZoom;
%height = 768 / $editorZoom;
%top = 384 - %height;
gameWindow.setCurrentCameraArea("-512" SPC %top SPC %width SPC %height);

The Alpha 2 workaround sets zoom and position instead:
gameWindow.setCurrentCameraZoom($editorZoom);
%zfac = 1.0 - $editorZoom;
%campos = (680 * %zfac) SPC (-510 * %zfac);
gameWindow.setCurrentCameraPosition( %campos );

The workaround doesn't produce the same smooth transition, but it's close enough. What I'd like to know is, is this a bug in Alpha 2, something I'm misusing, or something I'm forgetting to initialize? The change log for Alpha 2 says: 18. Fixed t2dSceneWindow "setCurrentCameraArea()", "getCurrentCameraArea()" and "setTargetCameraArea()" to be compatible with all other "area()" functions. Does this mean the behavior was changed in some way to make it incompatible with 1.0.2? And if so, just how were these functions altered, and how are they supposed to now behave?
#7
01/23/2006 (9:39 am)
Scott,

As of Alpha 2, those functions did change from (x y w h) to (x1 y1 x2 y2). From the reference pdf:

x1/y1 Top-Left position of camera area.
x2/y2 Bottom-Right of camera area.
NOTE:- It is perfectly acceptable to pass the top-left and bottom-right in the wrong
order as described above; T2D will automatically correct this for you. All commands
that begin with setCurrentXXX instantaneously set the camera to the specified values.
Commands that begin with setTargetXXX are setting-up a move ready to be executed.
#8
01/23/2006 (3:45 pm)
Ah, that makes sense! I was looking at the Alpha 1 Reference guide, which is what got me confused. I notice, however, that even after correcting it the bottom and right are still off by a pixel or two. But I can adjust for that easily enough.

Now if only I can figure out what's keeping those objects from being affected by collisions, I'll be all set!