Game Development Community

Platforms Players can Ride Version 1.1

by Cinder Games · in Torque Game Engine · 01/27/2007 (4:34 pm) · 268 replies

Platforms Players can Ride Version 1.2!!!!!!
with Dynamic object Attachment
###################################
##This post has been edited and updated 2/13/07 ##
##################################

subvoicestudios.com/~ramensama/TorqueDynamicAttachment.jpg

Here's the new and improved files you'd need.
Version 1.2
subvoicestudios.com/~ramensama/torque1.5.2.zip

1.7.2008
What's new? There are several new features and improvements.

1) Removed or reduced jitter caused by multiple players on a platform
2) Support for new items on platforms. Now Items, Shapes, lights, particle emitters, and possibly others!
3) Object to object Attachment. Players can now attach Items, shapes, etc to them. Even the attached objects can attach more objects to themselves!
4) Reduced the number of code changes.... a little.


This must be extracted in the base torque directory where it's installed...
c:/torque

or whatever. it's designed to simply overwrite a stock install of torque.

Afterwards you must add pathshape.cc and pathshape.h to your project in visual studio or whatever.

img292.imageshack.us/img292/9507/addexistingxy9.gif

To attach an object, you must use this syntax:

ParentObject.attachChild(ChildObject);

So if you want to attach an item to the player, move the player towards the object, press F11 to get the object ID. Press ~ and type in $player.attachchild(ObjectID);

The item is now attached to the player.

$player.detachchild(ObjectID); is how to remove the object.






Ancient Versions of the code can be found here.
These are version 1.1, not the newest version and probably have bugs that the newer code does not.
Here's a link to the new updated code. It's for torque 1.4...
subvoicestudios.com/~ramensama/torque.zip

And for Torque 1.5
subvoicestudios.com/~ramensama/torque1.5.zip
#161
02/19/2008 (11:45 am)
Ramen, can you create a quick report only for correcting the transformation matrix for player when the CastRay hits the PathShape type object.
I started a TGEA port, but i am on a half of way, there is a lot of corrections (and work) on SDK.
WinMerge is a friend of mine :)
#162
02/19/2008 (2:32 pm)
Some thoughts on the attachment of objects to the player.....


I figure information from a collided projectile would give information from it's castray it does to detect collision The thing i'm not confident is what information it'd give me. Is the castray done on the client side or server side? if it's the server side, it will not report information properly since Nodes do NOT animate on the server side. I'll investigate it.

But i figure getting information from the collision, finding closest node, and adding a staticshape to the place of impact would do the trick. Then mount that new shape in relation to the closest node.

@Picasso
I haven't done much investigation on pathshape collisions. i figure it could be given a similiar routine to what the player has. But this isn't high on my list of things to do just yet.
#163
02/19/2008 (2:55 pm)
@Ramen - we eventually resorted to using your resource for our monorail transport system. The way we made the monorail cars structure resulted in upto 5 movable players within the car itself. Great resource and worked well... here is a screenshot of the monorail.
server3.uploadit.org/files/julesr-station.jpg
#164
02/19/2008 (2:56 pm)
How does collision work with that? I'm curious about the walls and whatnot inside the monorail, have any issues with players being "pushed" outside?
#165
02/20/2008 (10:28 am)
I got it working in TGEA without the shadow update, but it is a totally useless resource (even needed to do additional corrections to got it compile).

- tons of bugs
- strange jerking
- strange colision
- buggy conform
- need a lot of testing for a commersial use, even i think it is unstable (cause a lot of crashing)
#166
02/20/2008 (2:58 pm)
@Picasso - Well I'm glad you think my donated code is useless. All i can say is i never built this around TGEA and i don't hear other people complaining about it.

Maybe you could provide some fixes for these bugs... or give examples of what code causes crashes, etc.
#167
02/20/2008 (3:18 pm)
@ Picasso: well, good way to tnx people for working (4 free) on things...
First of all I cannot understand why complaining about how it works on TGEA since it isn't intended for TGEA but TGE as Ramen remember you...
I really know little about programming and never thoughts about complaining other people for their resource especially when...
A) are in working progress...
B) intended for another version of the engine...

@ Ramen please keep up the good work and hopefully someone else interested in implementing it in TGEA will have a good start with it ;)
#168
02/20/2008 (3:34 pm)
Well I can say that I got the resource to work right of the bat and I am using the old code from last year. I would say that if your going to use someone elses work to further your own work then you take it for what it is. You sound upset that it didnt just plug and play in your setup, well there is a reason we call our selves independant game developers. If you dont have the skills to begin with then go back to playing the games..

/end rant

TomFeni
#169
02/20/2008 (3:47 pm)
I feel my programming skills are poor to novice. One example is my latest addition. 10 lines, took me 4 hours to write... However I've felt great satisfaction in this little "unoffical resource." I've spent countless nights working on this because at the time i started, there was nothing like this. There was some fabled Pathed Interiors resource which was,at the time, never completed or full implemented. Not to mention it required an enourmous amount of work to merge it into your project.

Not to brag, but i'd be much more willing to believe the issues of crashing and what not are related to codebase difference between TGEA and TGE. The only time i've experienced crashes was due to having a child object deleted and not having it's parent object notified about that. But due to community feedback by Bill Vee, that solved the crashing issue.


@JoZ, Tom - Anyhow. I appreciate the quick "coming to my defense" by you two. I know some people can get some use of this.
#170
02/20/2008 (4:07 pm)
@Ramen - at some point I'll do a resource on how the monorail car works with your resource to help others understand it, it does require quite a few collision boxes in the right places, there are also things like logic gates used with the doors as they are animated with an invisible collision wall that is mounted to retain the collision while the doors open and close, as at the time of creating the monorail car there was a bug in TGE when animating doors. The monorail does stop players from falling out quite nicely. This was indeed a big project in itself even without the help of your resource to make the car move along the rail, and one of the reasons initially why we did not use your resource was down to it skipping nodes causing the car not to stop at the right stations, but you fixed this in the latest release, and I am sure at some point I did fix this on an old release, but then made too many changes and didn't know what I did to resolve it - so kudos to you on that. Saved me countless days of work.
#171
02/20/2008 (4:16 pm)
@ Julian R - That skipping nodes bug was an issue with the pathshape resource itself i believe.

I've been thinking of adding some real samples of how to use as an elevator or something else like that (such as a monorail,ship,etc) Maybe if i get some free time. So it seems like this will work properly as long as you create all the right number of collision meshes. I'm pretty familiar with that since i do all my stuff as DTS and not DIF.
#172
02/20/2008 (4:23 pm)
I got use out of it and it helped me learn along the way. I think the whole development scene is getting over run by would be modders who think that by getting torque all they have to do is change some code or add some model and they have a full new game.

I myself do this as a hobby, so I am learning all the different parts of game making, not just one area. So when someone comes along and shares their work I try to learn form it and build on it. Not tear it apart and say oh its broken and so it must suck.

I just find it annoying when people cant get something so they resort to tearing down someone else so they feel better about themselves.

Your doing a great service and keep going.
Thanks for the work..

TomFeni
#173
02/20/2008 (4:32 pm)
@Ramen - you've got the idea... you're also right it was the pathshape resource itself (going back some time now). I'll gladly provide you with some screenshots within showtool on where the collision meshes were set, just to add value to your samples. Let me know :)
#174
02/20/2008 (4:32 pm)
I do not say much here but I have to say Ramen your efforts are truly appreciated by many just as the others that take the time to share their efforts and guidance on the forums.

Thank you!


Now can someone find a main.cs that will alter my day schedule and give me more time to get back to my TGE project!

@Julian The monorail looks great! That is one of my goals, to have a monorail. I actually paid a developer a couple of years ago and we created a working monorail but it had issues skipping in multi-player mode that we never resolved (dropped the ball when real life got in the way).
#175
02/20/2008 (4:35 pm)
Also, I believe when something crashes its not always down to the code, its often the DTS model with too many collisions either overlapping, or the way you export the models.
#176
02/20/2008 (4:43 pm)
@Welias D. Not to hijack this thread, but here is more on the monorail and what can be achieved by good resources like this one. Link here - keep up the good work :)
#177
02/20/2008 (5:23 pm)
@ Ramen Don't know what Picasso is talking about. I have used this for TGE and TGEA and even used it in the Juggernaut beta with no problems at all. Very little has to be modified to get it to work in TGEA.

I was going to release this at a later date but here is a video of the results of some of Ramen's code I used for my game.
What you see is a jeep sized vehicle riding a very large vehicle and shows his code is very stable. Do you see any jerkiness or strange colision. I don't.

Ramen I said it once and I will say it again. Your code on this subject is AWESOME.
#178
02/20/2008 (11:11 pm)
Firts of all i'm not complaining, just explained that it's still useless in TGEA - that's all.
This is a TGE resource - it's normal.
Found that the main bug in TGEA is a strange preload in SIM.

I am very interested in movable patforms and i am not refused to correct the resource.
I restored my original files from the backup i think to start again from the beginning, because there was a lot of code to edit (3-4 hours editing) and it is possible even i made a mistake somewhere.
Today i'll try the previous revision of the script.

Bill, i don't think there is a little work to make it work properly in TGEA. May be you misunderstood me. I got it compiled. The problems occur when useing it. That's why i state it's unstable.
#179
02/21/2008 (3:19 am)
Finally i got it working (found the mistake) with the previous revision - no errors at all.
A little thing - the delta is only affected in pocZ, in XY - no at all. I can fix this.
Now i will port the last revision and see if there are no errors.

edit:
Just created a vertical elevator and the player fell down through it :(

edit2:
the revision for torque 1.4 is completely working and portable in TGEA.
I got it working finally, still there is a little jerking when stepping on the edge of the platform.
It is still unstable (not in runtime) an exit/start engine sometimes:
Unhandled exception at 0x00509f7c in TGEA.exe: 0xC0000005: Access violation reading location 0x000000a8
#180
02/21/2008 (12:41 pm)
@Bill Vee
That's an impressive bit of video. Especially liked how you showed rolling the jeep by tilting the platform.

I assume the 'platform' was a vehicle, with Kork in the driver's seat?

Any idea how it would work with Kork driving the platform, and someone else driving the Jeep *on* the platform?