by date
Moving Objects that players can ride on!
Moving Objects that players can ride on!
| Name: | Ramen-sama | |
|---|---|---|
| Date Posted: | Jul 03, 2006 | |
| Rating: | 4.9 out of 5 | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Ramen-sama |
Blog post
I've spent a good week or more trying to come up with a feasible method for a player to "ride" on a platform, elevator, spaceship.. whatever.
And i've finally got something that seems to work. Currently the players are able to dynamically attach to pathshape objects. which can then wisk them around the world. But this is going to be expanding so players can ride in/on ships, flying castles, whatever. it's not gonna matter :) It's a little different then "mounting" As the player still retains his movement and collision abilities, so they can jump off whenever they want. Also they'll be able to jump from one moving object to another.
Soon i'll be expanding this resource to do more attachment to player objects as well. that's already been implemented, but isn't in this code release. Currently that's not too incredibly useful... or is it? if you say attach a crate to a player object...... the player can then push the crate or something, or maybe other things to that effect.
How is this different from this "Pathed Interior" resource? well you don't have to use DIF for one.
You can attach yourself to a animated, flying bird for example... you can be inside an animated DTS that's flying thru space. Really it's up to your imagination.
Here's a little path around the lake for our "hero" to traverse on his flying square

Riding the wind!

Ditto!

SO to prove it. here's a video :P
ramensama.dyndns.org:8000/temp/stronghold.avi
It's 2.09 megs. enjoy and please post some comments.
OK, please go to this thread to download the code::
www.garagegames.com/mg/forums/result.thread.php?qt=47074
And i've finally got something that seems to work. Currently the players are able to dynamically attach to pathshape objects. which can then wisk them around the world. But this is going to be expanding so players can ride in/on ships, flying castles, whatever. it's not gonna matter :) It's a little different then "mounting" As the player still retains his movement and collision abilities, so they can jump off whenever they want. Also they'll be able to jump from one moving object to another.
Soon i'll be expanding this resource to do more attachment to player objects as well. that's already been implemented, but isn't in this code release. Currently that's not too incredibly useful... or is it? if you say attach a crate to a player object...... the player can then push the crate or something, or maybe other things to that effect.
How is this different from this "Pathed Interior" resource? well you don't have to use DIF for one.
You can attach yourself to a animated, flying bird for example... you can be inside an animated DTS that's flying thru space. Really it's up to your imagination.
Here's a little path around the lake for our "hero" to traverse on his flying square

Riding the wind!

Ditto!

SO to prove it. here's a video :P
ramensama.dyndns.org:8000/temp/stronghold.avi
It's 2.09 megs. enjoy and please post some comments.
OK, please go to this thread to download the code::
www.garagegames.com/mg/forums/result.thread.php?qt=47074
Recent Blog Posts
| List: | 02/22/08 - Dynamic Attachment Update - Animated Environments 01/06/08 - Dynamic Attachment to objects 01/03/08 - 3D Painting with Modo 12/25/07 - A* Pathfinding stuffs 02/14/07 - More Platforms, works in 1.5 01/28/07 - Platforms Players can Ride Version 1.1 09/20/06 - Kork's Journey into Lightwave 3D 08/09/06 - More Lightwave stuff. |
|---|
Submit your own resources!| Stefan Lundmark (Jul 03, 2006 at 09:51 GMT) Resource Rating: 5 |
| Phil Carlisle (Jul 03, 2006 at 10:03 GMT) |
Nice work anyway.. should give some fun ideas a chance.
| Ramen-sama (Jul 03, 2006 at 10:05 GMT) |
I'm not really sure about networking and all but it seems to work... i'll pass out my code later for you vultures to test over a networked environment.
| Stefan Beffy Moises (Jul 03, 2006 at 10:10 GMT) |
| Robert Russell (Jul 03, 2006 at 10:37 GMT) Resource Rating: 4 |
This will go perfect with my single person dropships.
-Wob
| Canon (Jul 03, 2006 at 12:26 GMT) Resource Rating: 5 |
Thank you Ramen!
Christophe
www.frogames.net
| Johnny Hill (Jul 03, 2006 at 17:58 GMT) |
But a nice one would be like the flying ships in FF-online, you can build the ships as complex DTS shape. I got a roughed-out one sitting on my HD. Once again great resource Ramen!
| Aaron Ellis (Jul 03, 2006 at 18:43 GMT) |
Let me say how cool this is. You deserve a big thank you!
@Phil
About your networking question. I just tested it out on a less than optimal connection and it works great. Everything was smooth as silk with one player on the platform. It even worked with two players on the same platform . . . however, with two players riding the same shape, I did notice a small player rotation hiccup (in the 'Z').
Of course, that could have been caused by my testing setup. Since I'm at home instead of the office, I had to do this using two instances of the same app on my laptop (one host/one guest) -- all over a 56k modem connection (to the GG testing master server). I'm truly surprised how well everything worked together.
The fact that the code slid comfortably into my heavily modified engine is just icing on the cake.
| Alan Hembra (Jul 03, 2006 at 19:01 GMT) |
| Ramen-sama (Jul 03, 2006 at 21:45 GMT) |
| NewYork Virtual (Jul 04, 2006 at 03:35 GMT) |
| Surge (Jul 04, 2006 at 11:53 GMT) |
Im soooo happy you did this, thanks for finding the thread way back when and doing something about it.
I cant wait to try out your code.
Now I can stop filling the forums with crazy ideas for an elevator and use this one that works.
-Surge
Edited on Jul 04, 2006 12:11 GMT
| Ramen-sama (Jul 04, 2006 at 21:22 GMT) |
| Surge (Jul 05, 2006 at 01:25 GMT) |
Compiled and tested - works like a charm.
| Tom Bentz (Jul 05, 2006 at 18:08 GMT) |
| Tim Muenstermann (Jul 16, 2006 at 21:02 GMT) |
| Pisal Setthawong (Sep 18, 2006 at 16:11 GMT) |
| Juha Eerola (Oct 11, 2006 at 07:21 GMT) |
| Ramen-sama (Oct 12, 2006 at 04:28 GMT) |
| Saska (Oct 14, 2006 at 16:36 GMT) Resource Rating: 5 |
then i see the path in mission editor "correct" but i dont see the platform "WRONG" and when i try put it there through the mission editor it looks like a tiny shape tinier then the player :S "WRONG???" and it doesnt move anywhere
answers?
| Ramen-sama (Oct 14, 2006 at 20:11 GMT) |
| Saska (Oct 15, 2006 at 07:01 GMT) Resource Rating: 5 |
| Saska (Oct 15, 2006 at 07:02 GMT) Resource Rating: 5 |
| Roshan Kuriyan (Dec 14, 2006 at 08:46 GMT) |
how to create a pathed object ,is your pathed object a static shape item class.or a pathedcamera class or a pathshape class.
| Balu (Jan 20, 2007 at 09:44 GMT) |
| Ramen-sama (Jan 27, 2007 at 03:12 GMT) |
you did recompile the torque engine right?
| Balu (Jan 27, 2007 at 04:58 GMT) |
| Ramen-sama (Jan 27, 2007 at 05:00 GMT) |
| Balu (Jan 27, 2007 at 06:36 GMT) |
Maybe I can send you a recording? Will that be useful?
| Ramen-sama (Jan 27, 2007 at 06:41 GMT) |
| Ramen-sama (Jan 27, 2007 at 07:42 GMT) |
if you look at pathshape.cs
function LoopingShape::onCollision(%this,%obj,%col){
%obj.followpath(Path);
}
for that line. i added in an error...
error("A collsion with a loopingshape has occurred");
i noticed that when the glitch occurs, it's cause there was a collision detected. the "collision" with the pathshape is what is triggering the pathshape to follow a path. So when the pathshape restarts it's loop, it's position/rotation is changing slightly, and a collision is being detected. an easy fix would be some sanity checking. Add a variable or something to the player or the pathshape to let it know it's moving, and doesn't need to be restarted.
I'll work on adding some callbacks or something to query the status of the pathshape.....
You must be a member and be logged in to either append comments or rate this resource.


4.9 out of 5


