Game Development Community

dev|Pro Game Development Curriculum

Moving Objects that players can ride on!

by Cinder Games · 07/03/2006 (2:24 am) · 31 comments

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
img60.imageshack.us/img60/2087/screenshot001000034la.jpg
Riding the wind!
img60.imageshack.us/img60/5866/screenshot001000025nh.jpg

Ditto!

img213.imageshack.us/img213/6127/screenshot001000017sq.jpg

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
Page «Previous 1 2
#1
07/03/2006 (2:51 am)
Just wanted to say I'm very impressed and that I know many will appreciate your efforts.
#2
07/03/2006 (3:03 am)
Is it networked Ramen?

Nice work anyway.. should give some fun ideas a chance.
#3
07/03/2006 (3:05 am)
I'm not sure if it's networked. It's updating both client side and server side... i think :p

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.
#4
07/03/2006 (3:10 am)
Glad you've improved my PathShape resource... that's something I've always wanted to do and never found the time for - great work! :)
#5
07/03/2006 (3:37 am)
Thanks for doing work on this and hopefully releasing it to the community, I hardly get any time to work on my demo anymore apart from the artwork so this will come in handy - thanks again.
This will go perfect with my single person dropships.


-Wob
#6
07/03/2006 (5:26 am)
Let's go for plateform games!!!
Thank you Ramen!

Christophe
www.frogames.net
#7
07/03/2006 (10:58 am)
Great, resource!. Thinking of creating a tranportation system in-game. Like a mono-rail or train system. that runs on regular intervals. The one example that comes to mind is the Deeprun train in warcraft. A large moving platform that moves back and forth between stops.

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!
#8
07/03/2006 (11:43 am)
@Ramen

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.
#9
07/03/2006 (12:01 pm)
This is cool. It would be great for a subway car or train cars.
#10
07/03/2006 (2:45 pm)
Glad everyone likes this. My next step it to do some more fixes, specifically where the players render position is updated. Currently it's just updating the position, and not rotation. now that i know this is posible, i'll rewrite that section so the player rotates along with the object.
#11
07/03/2006 (8:35 pm)
Just saw the video, cool ! will try this code soon.
#12
07/04/2006 (4:53 am)
Yes Ramen,

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
#13
07/04/2006 (2:22 pm)
Everyone, my zip was updated to support platform rotation affecting players! nice addition. Check out the updated zip file.
#14
07/04/2006 (6:25 pm)
This works really well, great job!!!!
Compiled and tested - works like a charm.
#15
07/05/2006 (11:08 am)
This is very cool!
#16
07/16/2006 (2:02 pm)
Great Stuff!!! Hmmmm...... Capital Space Ships.... ;)
#17
09/18/2006 (9:11 am)
I was working on a similar project when I just noticed this code. Great work and thanks for the ideas :)
#18
10/11/2006 (12:21 am)
Does this work with both filetypes? (dif & dts)
#19
10/11/2006 (9:28 pm)
No. This is only for supported filetypes of the pathshape class. Which currently is DTS only.
#20
10/14/2006 (9:36 am)
@Ramen somehow when i copied your code to the correct places and everything, i spawn in the dock "correct"

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?
Page «Previous 1 2