moveing objects

Make suggestions for improving one of the best games on the net!
Post Reply
User avatar
hutty
Private First Class
Private First Class
Posts: 227
Joined: Thu Jul 02, 2009 8:09 pm

moveing objects

Post by hutty »

I have an idea for how to make movable objects in bzflag. They wuld work a lot like the current physics drivers.

lets say we have a moving cube. while the object moves according to a predefined path it comes in contact with a tank. The direction the cube is moving is the front, if the tank hits the front it's movement speed in the direction the cube is moving is added to the current movement

For example:
The cube is moving Y+ at speed 25.
It hits a tank going X- at speed 12.
now the tank is going both X- 12 and Y+ 25 (diagonal)
once the tank is ends contact with the moving object its Y+ speed is restored to normal.
note:: this is assuming that the tank player is moving X- 12 the entire time and gets hit on the side.

As for server and lag
the client would control the object. When a player first joins a server the server downloads the map to the client. The client build the map along with the moving objects. Then the server tells the client where the object currently is. the player joins. while the player is playing every minute or so the server resend the position of the moveing objects in order to maintain perfect synchronization.

I would code this myself but currently i dont know how to program things this advanced.
For all of you who have asked what a hutty is, there is one as my avatar.

instant map... just add water
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: moveing objects

Post by blast »

Moving objects have been discussed before many, many times. The game state would need to be synced between all clients and the server. Plus, SomeOne(tm) has to write all the code to handle it.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
hutty
Private First Class
Private First Class
Posts: 227
Joined: Thu Jul 02, 2009 8:09 pm

Re: moveing objects

Post by hutty »

I cannot code it myself yet, but i was stating how it could be done for anyone who has to code it.

and the game state already has to be synced with the server. otherwise the tanks would be all over the place.

if that is not what you meant, the moving objects would be controlled by the client. The server would tell the client where they are, where they are going and the predefined path, and then the client would take over, only double checking every now and then.

this would destroy any issues with lag ect. because interactions would be the same type as boxes and pyramids


unless i am entirely wrong and have no idea what i am talking about
For all of you who have asked what a hutty is, there is one as my avatar.

instant map... just add water
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Re: moveing objects

Post by JeffM »

The game state is NOT currently synced with the server, that is why the tanks ARE all over the place (ever shoot someone and they not blow up?). You would not want the client to control the object. the server would have to do it, and have the clients sycn to that. It becomes more complex because unless they are in PERFECT sync, shots won't rico the same on every client, and that will make them really go all over the place. THe server doesn't actually KEEP a gamestate right now.

This is a feature that we would like to be able to add, but sadly the back end of bzflag is not setup to do it in a clean and secure way(as in to minimize cheating exploits). Once the backed is updated to be a proper server side state, then lots of fun things like this can be done.
ImageJeffM
User avatar
Spazzy McGee
Sergeant Major
Sergeant Major
Posts: 1405
Joined: Mon Mar 21, 2005 4:59 pm
Location: Planet MoFo, Sheffield Division; United Kingdom

Re: moveing objects

Post by Spazzy McGee »

huttymuncher wrote:For example:
The cube is moving Y+ at speed 25.
It hits a tank going X- at speed 12.
now the tank is going both X- 12 and Y+ 25 (diagonal)
once the tank is ends contact with the moving object its Y+ speed is restored to normal.
note:: this is assuming that the tank player is moving X- 12 the entire time and gets hit on the side.
This would feel really weird to the person driving the tank - there is no conservation of momentum. I know there is nothing 'realistic' about jumping tanks, but it would feel distinctly strange not having your momentum conserved (or a close approximation of it) when colliding with moving objects. This of course throws up further questions: What is the mass of a BZFlag tank? How do you calculate the mass of the block?

BZFlag is very good at simple gameplay that is based around simple (and very familiar) rules, which allow you to judge and predict the behaviour of tanks and shots in various situations with some accuracy. Perhaps it's more trouble than it's worth?
"Life is what happens to you while you're busy making other plans." - John Lennon
User avatar
hutty
Private First Class
Private First Class
Posts: 227
Joined: Thu Jul 02, 2009 8:09 pm

Re: moveing objects

Post by hutty »

oh, ok
For all of you who have asked what a hutty is, there is one as my avatar.

instant map... just add water
tobylane
Private First Class
Private First Class
Posts: 130
Joined: Thu Jan 29, 2009 4:21 pm

Re: moveing objects

Post by tobylane »

So is this one way to do one thing of many that you can't because of timing, so timing is on the todo list?
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Re: moveing objects

Post by joevano »

tobylane wrote:So is this one way to do one thing of many that you can't because of timing, so timing is on the todo list?
Who's todo list? Yours? The only way it could be done is for Someone (tm) to care enough about it to code it up. I just don't see it happening anytime soon.
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
User avatar
adameros
Private First Class
Private First Class
Posts: 55
Joined: Sat Dec 29, 2007 5:59 am
Location: Bothell, WA
Contact:

Re: moveing objects

Post by adameros »

I would look forward to platforms you can ride.

What happens when you get crushed by a moving object. Do you stop it (might be a nice feature for team play)? Does it kill you? Does it just pass through you?

If movable objects come in to being, maybe tanks having mass would follow. Be able to push people out of the way (and in to the lava. :-p) Or land on a team mate, and ride around acting like a turn-able turret (your team mate could be at the bottom of the trench dodging bullets for you, while you shoot that enemy).
User avatar
hutty
Private First Class
Private First Class
Posts: 227
Joined: Thu Jul 02, 2009 8:09 pm

Re: moveing objects

Post by hutty »

That sound good, but as explained above it is complicated.

mabye later :D
For all of you who have asked what a hutty is, there is one as my avatar.

instant map... just add water
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Re: moveing objects

Post by joevano »

Or never...
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
User avatar
hutty
Private First Class
Private First Class
Posts: 227
Joined: Thu Jul 02, 2009 8:09 pm

Re: moveing objects

Post by hutty »

could you at least try to be optimistic?

I am learning how to code, (look at my random map editor) and I hope to someday help with the project.
For all of you who have asked what a hutty is, there is one as my avatar.

instant map... just add water
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: moveing objects

Post by blast »

That's not a feature the project is likely to ever have.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
hutty
Private First Class
Private First Class
Posts: 227
Joined: Thu Jul 02, 2009 8:09 pm

Re: moveing objects

Post by hutty »

nexuiz has moving objects


edit---

The game state is NOT currently synced with the server, that is why the tanks ARE all over the place (ever shoot someone and they not blow up?). You would not want the client to control the object. the server would have to do it, and have the clients sycn to that. It becomes more complex because unless they are in PERFECT sync, shots won't rico the same on every client, and that will make them really go all over the place. THe server doesn't actually KEEP a gamestate right now.
oops should think before i speak
srry
For all of you who have asked what a hutty is, there is one as my avatar.

instant map... just add water
alezakos
Private First Class
Private First Class
Posts: 82
Joined: Thu Sep 16, 2010 1:24 pm

Re: moveing objects

Post by alezakos »

What about Planet Mofo? I think I saw some moving objects there
User avatar
Cobra_Fast
Dev Monkey
Dev Monkey
Posts: 322
Joined: Sat Oct 07, 2006 11:51 am
Location: Germany
Contact:

Re: moveing objects

Post by Cobra_Fast »

It's no problem to create moving objects in BZFlag.
BUT: Tanks can't interact with them while they are moving.
That means: if you drive against a moving object you will go straight through it (like it was passable) because object movements are not synchronized between the clients. Another player might see you 50 units away the moving objects as you hit it.
Post Reply