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
Items and travel
Re: Items and travel
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.
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
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.
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.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Items and travel
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.
The indelible lord of tl;dr
Re: Items and travel
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!
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!
if( $myGames != "Crap" ) {
- please_donate( $money );
- just_enjoy();
Re: Items and travel
Thanks all
Klown that makes sense will try that.
Klown that makes sense will try that.