Game Development Community

Moving Objects Players can Ride on, code inside.

by Cinder Games · in Torque Game Engine · 07/03/2006 (3:35 am) · 105 replies

This is a continuation of this thread....
www.garagegames.com/mg/forums/result.thread.php?qt=44667

for pictures....
www.garagegames.com/blogs/11127/10822

Alright everyone, here's some files you can add to add this spiffy feature.

This zip file contains all the needed files to convert your STOCK 1.4 torque.

I do not have the time to do a "resource" right now, so i just threw all the files i modified in a directory tree.

Save this zip in your base torque folder....

C:\Torque or whatever you are using.

Extract the zip where it is and it should overright all the correct files.

You will need to add pathshape.cc and pathshape.h to your Project as well.

Included in a replacement stronghold.mis file. it should put you on the dock when you load it up. the pathshape object is "docked" there. simple fall onto it to begin the ride.


There is currently one small limitation. As of now the moving platform is only affecting the POSTION of the player, and not rotations or anything. I was having a hell of a time trying to get the matrix.mul stuff working. That'll be updated later to fix.

Please post any comments/suggestions/questions.
If something doesn't work, let me know cause i didn't test to make sure all the files were put in the archive :p

I should state this is based on a resource by Anthony Lovell
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9093
MANY of the functions in sceneobject.cc, he wrote are including in this, however not all of them. I found use in some of his code, but decided to go a different way in many other places

The Zip::
ramensama.dyndns.org:8000/temp/torque.zip

PS, i'd like to mirror this since i'm hosting it off my computer. If you can mirror this, please let me know.
Page «Previous 1 2 3 4 5 6 Last »
#1
07/03/2006 (4:39 am)
Fixed the archive. added in the main.cs file, just made it point to "starter.fps" as the default game. Also updated the pathshape.cs file.
#3
07/03/2006 (6:52 am)
This is just utter awesomeness!! Fantastic job. I've been wanting this forever!!!
#4
07/03/2006 (10:22 am)
Ramen,

The vid looks amazing. I'm looking forward to trying this out.
#5
07/03/2006 (2:50 pm)
Anyone else give this a shot yet?
#6
07/03/2006 (2:54 pm)
I havn't looked at the sources yet.. but first question - is it fully network-compatible?
I'll play with it within a few days, after I finish with some other urgent tasks..
#7
07/03/2006 (2:55 pm)
If you look at my latest blog, there's some testimony that states it's working in a networked environment. :)
#8
07/03/2006 (2:59 pm)
Blah... ;) sorry, didn't pay attention to that.. actualy, I read it just right after I woke up, so I was not really "clear"... :) So far as I can see - this is really great resource!
If this is going to be implemented in our project - you are on the "credits"!
#9
07/03/2006 (3:01 pm)
Well you can't just put me in there. Anthony Lovell wrote alot of the core sceneobject functions. But i had to deviate from his logic of world and local space.
#10
07/03/2006 (3:02 pm)
Nice work Ramen! I dove into player platform riding one evening last year, but never had the time to get the jerkiness worked out. I'm opening up your sources now to take a look at your approach. This has been a much needed feature that TGE has needed for some time. Thanks for sharing, both you and Anthony.
#11
07/03/2006 (3:04 pm)
Now that the basics have been implemented, i'm going to be adding in support for other objects to attach in similiar ways. I'm sure each object type will require a couple extra functions to assit them. But maybe this will be something that could be cleaned up and made a new "feature" for the next update to torque :)
#12
07/03/2006 (3:13 pm)
Ramen - as I said I havn't looked at the resource deeply, but the question I have now is:
If, for example, player is in a WheeledVehicle, and driving onto the "place" (moving object) - will it work? I mean, if player attached to the vehicle, and vehicle is on the "object"... Got my idea?
#13
07/03/2006 (3:25 pm)
Well, as of now, only pathshapes are supported. to get this to work, you'd need to add in a matrix that keeps track a parent objects transform changes from frame to frame like pathshape does. it's an easy addition.
Then you'd need to add in a couple similiar functions player does. Maybe today i'll work on expanding this so more objects will support this feature.


BUT to really answer you question, you're talking about a parented player, riding in a parented vehicle.
THis logic should work. Assuming the process after function is working correctly. In this example the first object to get processed would be the "place", then somewhere down the line the child(wheeled vechicle) will be processed, and then later it's child(the player) will be.

So following this logic, as long as the code is added to update players transforms exist, you should be able to stack these as much as you like.

In earlier tests i attached some AMMO to my player and rode around on the moving platform. But i'm currently using some different code. But the parenting scheme that Anythony wrote is pretty good. it does checks to ensure that you are unable to parent something that is parented to one of the child objects. With my addition of the ProcessAfter() added in, it should work out.
#14
07/03/2006 (3:31 pm)
Okay.. thanks for info..
as soon as I'll have a time to play with it - I'll check how is it working and what is possible.. if I'll have anything to say - I'll post it here.
#15
07/03/2006 (3:41 pm)
This is fantastic! It beats pathed interiors any day.
#16
07/03/2006 (11:56 pm)
Hrm... maybe its just me? but it compiles fine.. but when i load up the mission it shows the path but no platform... am i doing something wrong?
#17
07/04/2006 (4:56 am)
Im so impressed,

We just finished a long weekend here in canada and I came onto my machine to find this has happened.
I could'nt be happier thanks so much to Ramen-Sama big credits in my games to you.


-Surge
#18
07/04/2006 (10:15 am)
If there is no platform, you did not add the pathshape.cc and pathshape.h file you your project.
#19
07/04/2006 (11:01 am)
Hrm.... i added them... i will try a clean rebuild
#20
07/04/2006 (11:04 am)
Check the console for errors. look where pathshape.cs is being compiled and see if there's an error there.
Page «Previous 1 2 3 4 5 6 Last »