Page 1 of 1

Items and travel

Posted: Sun Mar 23, 2014 5:22 pm
by dave3460
I guys and girls Not sure if this has be asked before?

My question is what is the best was to have a item used for travel i.e boats/ creatures to ride
which way should i be looking at this issue ?
as for coding i have not really done any on this feature yet just after ideas on best way to look at it.

the boat/sailing part i am hoping to if item is equipped then you can sail if not you could swim i suppose which is another way it could be looked at.

Thanks for any help you can give

Re: Items and travel

Posted: Mon Mar 24, 2014 10:47 pm
by Callan S.
Is this in a text based browser game?

It depends on how you do traveling - do players just go from A to B or do they actually travel on a grid map while on the sea?

Do you want them to keep their boat at a port, or can they carry their boat around in their pocket? :)

If a port, you could just check if they have a boat at this port, then if so allow them to travel.

Re: Items and travel

Posted: Mon Mar 24, 2014 10:58 pm
by dave3460
Is this in a text based browser game?

semi graphical and text

It depends on how you do traveling - do players just go from A to B or do they actually travel on a grid map while on the sea?

yes would be from port to port (so location would be held in db)

Do you want them to keep their boat at a port, or can they carry their boat around in their pocket? :)

Both have a port for players without boats but also be able to build boats thats they can use on water maybe even fish or dive from it

If a port, you could just check if they have a boat at this port, then if so allow them to travel.

yes thats also a way am looking at.

Re: Items and travel

Posted: Mon Mar 24, 2014 11:04 pm
by Jackolantern
If you want them to actually move around the sea in the boat, then you would probably just want to do a check whenever they are in a water area to make sure they have the boat (probably as a flag in the database). If they don't have a boat, they either drown and die, or automatically swim back to shore.

Re: Items and travel

Posted: Sun Mar 30, 2014 1:48 am
by Klown
Hi Dave!

I have a game similar - space based. So when my guys travel from planet to planet, I setup a table which holds the mission information, this includes number of ships of each type of ship, time they departed, time they should arrive, and other pertinent information.

I suggest possibly adding a table or a column to one of your already created tables which shows the players boat status, for example, you can setup your table like follows:

id, name, location, mount

where the column "mount" can either be a simple: "1" or "0" for a yes there is a boat, or no there is not a boat. or you could have this store the type of mount: swim, boat, car, horse, walk, none.

You can make this as simple as calling an "if" statement in the code to determine what mode of travel the player has the ability to perform, or you can make it very complex by adding new tables to give the speed of each type of transport, the possibilities are only limited by your imagination!

Good luck and I hope this helps!

Re: Items and travel

Posted: Sun Mar 30, 2014 11:45 am
by dave3460
Thanks all
Klown that makes sense will try that.