Moving Platforms in TGEA 1.8.1
by Nicolai Dutka · in Torque Game Engine Advanced · 04/27/2009 (12:32 pm) · 27 replies
I was doing some searches on how to do the whole 'moving platform' thing, and all I could find was old posts dating back around 2005 that stated it was all being implemented in TGE 1.4...
In college, I worked with TGE 1.5.2 and moving platforms still was not working...
I am wondering if we have a working solution in TGEA 1.8.1?
My understanding of a 'moving platform':
1. Any static shape can be a 'mover' and its 'path' is determine in the editor by setting path nodes.
2. The shape will move along its path and the speed can be adjusted as well as wait times/stops at each node.
3. The player can jump/walk onto the 'mover' at ANY point and "ride" the mover, and jump off at any point.
If this is already working, can someone direct me to a walkthrough/guide or just tell me how? I can't find anything about it in my Documentation...
In college, I worked with TGE 1.5.2 and moving platforms still was not working...
I am wondering if we have a working solution in TGEA 1.8.1?
My understanding of a 'moving platform':
1. Any static shape can be a 'mover' and its 'path' is determine in the editor by setting path nodes.
2. The shape will move along its path and the speed can be adjusted as well as wait times/stops at each node.
3. The player can jump/walk onto the 'mover' at ANY point and "ride" the mover, and jump off at any point.
If this is already working, can someone direct me to a walkthrough/guide or just tell me how? I can't find anything about it in my Documentation...
#2
The port was not difficult - i used WinMerge as well.
04/28/2009 (12:13 pm)
Pathshape works well on TGEA.The port was not difficult - i used WinMerge as well.
#3
04/28/2009 (12:28 pm)
Picasso, you ported Ramen-sama's resource to TGEA just fine with WinMerge huh? I'll have to give it a shot soon! :D
#4
04/28/2009 (3:39 pm)
Picasso, I need your .cc and .h files needed to make this work... I am not good enough with C++ to merge TGE 1.5.2 code into TGEA 1.8.1... I did try and I got completely lost more than a few times...
#5
04/29/2009 (12:39 am)
Picasso, which TGEA version ? ..perhaps you can post as an updated resource ?
#6
There was ten files as i remember:
gameBase.cpp
item.cpp
main.cpp
objectTypes.h
player.cpp
player.h
staticShape.cpp
staticShape.h
sceneObject.cpp
sceneObject.h
You need to add pathShape.cpp and pathShape.h with very little corrections from TGE 1.5.2.
You do not need to add the light code fragment from TGE.
Just use WinMerge and watch the code differences (in files above),it is not difficult to do.
04/29/2009 (11:47 am)
I did it on 1.0.3 and then used 1.7.1There was ten files as i remember:
gameBase.cpp
item.cpp
main.cpp
objectTypes.h
player.cpp
player.h
staticShape.cpp
staticShape.h
sceneObject.cpp
sceneObject.h
You need to add pathShape.cpp and pathShape.h with very little corrections from TGE 1.5.2.
You do not need to add the light code fragment from TGE.
Just use WinMerge and watch the code differences (in files above),it is not difficult to do.
#7
04/29/2009 (11:53 am)
I've already tried it and I was not able to do it... I guess I am not able to follow the code well enough to figure out what differences are needed and which I can ignore...
#8
I thing there are no differences on porting it agains 1.7.1
04/29/2009 (1:02 pm)
OK,give me some time and i'll make a PDF documentation on code.I thing there are no differences on porting it agains 1.7.1
#9
04/30/2009 (11:14 am)
Nicolai,you have mail.
#10
any chance you could upload that pdf?
I would also like to get that resource working correctly
04/30/2009 (11:40 am)
Picasso,any chance you could upload that pdf?
I would also like to get that resource working correctly
#11
04/30/2009 (11:56 am)
Or make a resource, im sure I am not the only one who have Moving Platforms on the big TO-DO list...
#12
I can send the code changes to Ramen,anyway i ported his own code.
04/30/2009 (12:23 pm)
Yes,i can share the files,but i am not sure i can use RapidShare or MegaUpload and make it public.I can send the code changes to Ramen,anyway i ported his own code.
#13
All of it was easy enough to follow except for the couple things I emailed you about. I got those taken care of and now have a lot of errors:
04/30/2009 (1:30 pm)
@Picasso,All of it was easy enough to follow except for the couple things I emailed you about. I got those taken care of and now have a lot of errors:
..........enginesourceT3DpathShape.cpp(15) : fatal error C1083: Cannot open include file: 'core/bitStream.h': No such file or directory
..........enginesourceT3DgameBase.cpp(249) : error C2065: 'mLastDelta' : undeclared identifier
..........enginesourceT3DgameBase.cpp(445) : error C2065: 'con' : undeclared identifier
..........enginesourceT3DgameBase.cpp(445) : error C2227: left of '->getGhostIndex' must point to class/struct/union/generic type
type is ''unknown-type''
..........enginesourceT3DgameBase.cpp(497) : error C2059: syntax error : '>'
..........enginesourceT3DgameBase.cpp(497) : error C2143: syntax error : missing '(' before '>'
..........enginesourceT3DgameBase.cpp(497) : error C3861: 'readRangedU32': identifier not found
..........enginesourceT3DgameBase.cpp(497) : error C2143: syntax error : missing ';' before ')'
..........enginesourceT3DgameBase.cpp(497) : error C2143: syntax error : missing ';' before ')'
..........enginesourceT3DgameBase.cpp(595) : error C2001: newline in constant
..........enginesourceT3DgameBase.cpp(596) : error C2146: syntax error : missing ')' before identifier 'subObject'
..........enginesourceT3DgameBase.cpp(596) : error C2664: 'ConsoleConstructor::ConsoleConstructor(const char *,const char *,const char *,bool)' : cannot convert parameter 3 from 'bool (__cdecl *)(SimObject *,S32,const char **)' to 'const char *'
There is no context in which this conversion is possible
..........enginesourceT3DgameBase.cpp(596) : error C2059: syntax error : ')'
..........enginesourceT3DgameBase.cpp(596) : error C2001: newline in constant
..........enginesourceT3DgameBase.cpp(596) : error C2143: syntax error : missing ';' before 'string'
..........enginesourceT3DgameBase.cpp(597) : error C2001: newline in constant
..........enginesourceT3DgameBase.cpp(598) : error C2001: newline in constant
..........enginesourceT3DgameBase.cpp(599) : error C2143: syntax error : missing ';' before '{'
..........enginesourceT3DgameBase.cpp(599) : error C2447: '{' : missing function header (old-style formal list?)
..........enginesourceT3DgameBase.cpp(616) : error C2001: newline in constant
..........enginesourceT3DgameBase.cpp(617) : error C2146: syntax error : missing ')' before identifier 'subObject'
..........enginesourceT3DgameBase.cpp(617) : error C2664: 'ConsoleConstructor::ConsoleConstructor(const char *,const char *,const char *,bool)' : cannot convert parameter 3 from 'bool (__cdecl *)(SimObject *,S32,const char **)' to 'const char *'
There is no context in which this conversion is possible
..........enginesourceT3DgameBase.cpp(617) : error C2059: syntax error : ')'
..........enginesourceT3DgameBase.cpp(617) : error C2001: newline in constant
..........enginesourceT3DgameBase.cpp(617) : error C2143: syntax error : missing ';' before 'string'
..........enginesourceT3DgameBase.cpp(618) : error C2001: newline in constant
..........enginesourceT3DgameBase.cpp(619) : error C2001: newline in constant
..........enginesourceT3DgameBase.cpp(620) : error C2143: syntax error : missing ';' before '{'
..........enginesourceT3DgameBase.cpp(620) : error C2447: '{' : missing function header (old-style formal list?)
#14
End
04/30/2009 (1:32 pm)
Continued..........enginesourcesceneGraphsceneObject.cpp(2025) : error C2001: newline in constant
..........enginesourcesceneGraphsceneObject.cpp(2026) : error C2001: newline in constant
..........enginesourcesceneGraphsceneObject.cpp(2028) : error C2001: newline in constant
..........enginesourcesceneGraphsceneObject.cpp(2029) : error C2001: newline in constant
..........enginesourcesceneGraphsceneObject.cpp(2031) : error C2001: newline in constant
..........enginesourcesceneGraphsceneObject.cpp(2032) : error C2001: newline in constant
..........enginesourcesceneGraphsceneObject.cpp(2053) : error C2001: newline in constant
..........enginesourcesceneGraphsceneObject.cpp(2054) : error C2001: newline in constant
..........enginesourcesceneGraphsceneObject.cpp(2076) : error C2001: newline in constant
..........enginesourcesceneGraphsceneObject.cpp(2077) : error C2001: newline in constant
..........enginesourcesceneGraphsceneObject.cpp(2083) : error C2001: newline in constant
..........enginesourcesceneGraphsceneObject.cpp(2084) : error C2001: newline in constant
..........enginesourcesceneGraphsceneObject.cpp(2025) : fatal error C1057: unexpected end of file in macro expansion
..........enginesourceT3Dplayer.cpp(4464) : error C2001: newline in constant
..........enginesourceT3Dplayer.cpp(4465) : error C2146: syntax error : missing ')' before identifier 'attempt'
..........enginesourceT3Dplayer.cpp(4465) : error C2001: newline in constant
..........enginesourceT3Dplayer.cpp(4469) : error C2065: 'col' : undeclared identifier
..........enginesourceT3Dplayer.cpp(4469) : error C2227: left of '->scriptThis' must point to class/struct/union/generic type
type is ''unknown-type''
..........enginesourceT3Dplayer.cpp(4469) : error C2665: 'Con::executef' : none of the 20 overloads could convert all the argument types
c:TorqueTGEA_1_8_1enginesourceconsole/console.h(537): could be 'const char *Con::executef(const char *,const char *,const char *,const char *,const char *)'
c:TorqueTGEA_1_8_1enginesourceconsole/console.h(565): or 'const char *Con::executef(SimObject *,const char *,const char *,const char *,const char *)'
while trying to match the argument list '(PlayerData *, int, const char [17], const char *)'End
#15
Possibly there are code changes.
I'll take a look at 1.8.1 source and try to port it.
05/01/2009 (12:12 am)
I told you i've never used 1.8.1Possibly there are code changes.
I'll take a look at 1.8.1 source and try to port it.
#16
05/01/2009 (12:49 am)
It sux when doing something nice for someone turns into working for them...
#17
Later i'll send the files to Nicolai.
05/01/2009 (5:00 am)
After an hour hard work,detecting and fixing tons of engine changes,the PathShape worked and the port is done.Later i'll send the files to Nicolai.
#18
05/01/2009 (5:27 am)
and Nicolai.. will you host it so we all can use this please?
#19
I dropped the files into a vanilla TGEA 1.8.1 and it compiled!
I only got 1 warning (not error):
I will certainly host this file very shortly for everyone. :)
05/01/2009 (7:49 am)
Ok Picasso, you are my hero!!I dropped the files into a vanilla TGEA 1.8.1 and it compiled!
I only got 1 warning (not error):
c:\torque\tgea_1_8_1\engine\source\t3d\pathshape.cpp(397) : warning C4706: assignment within conditional expression
I will certainly host this file very shortly for everyone. :)
#20
nicolaidutka.archongames.com/storage/Misc/PathShape_TGEA_1.8.1.zip
05/01/2009 (8:34 am)
Tested and working!nicolaidutka.archongames.com/storage/Misc/PathShape_TGEA_1.8.1.zip
Associate Scott Burns
GG Alumni