Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Three Ideas: Fast Travel & Random Encounter & Karma modifier


Techno 5.0
 Share

Recommended Posts

Okay guys as im going to try and learn source on my own so i can finish this project i need help understanding some ideas i want to implement.

1st. Fast Travel

i want players to be able to fast travel from point A to point B. but only when they have discovered point B
if you havent been to point B you cannot fast travel there.
i understand that fast traveling would just be "teleport player x,y" basically
but i dont understand the limiting part and fast traveling parties
as well as during fast travel a player may encounter

2nd. random encounter

during fast travel players may encounter enemies or traders and merchants on their way from point A to point B
now this random encounter should happen on a random map that no one but the travelers can enter or leave. and when this encounter is done and the players leave the map should be destroyed or discarded.
each map should be different for each person giving the illusion of a big world
what determines encounters you may encounter is the

3rd. Karma Modifier

a player has a karma score -20 to +20 negative beign bad and positive being good. upon initiating fast travel the system will roll a random number between 0 and X randint(0,X,1) this equation says it will roll a random number between 0 and X, X being your Karma score and 1 for 1 number. whatever number it rolls is the ecounter you get.
for example:
0\. Nothing
1\. Trader
2\. Mercenary

say you have a karma score of +2
the system will do the following equation randint(0,2,1)
and say the system rolls a 1
you then encounter a trader and can trade with him

my worry is that multiple players doing this at times will slow the server down as it has to make new maps and discard maps and spawn npcs and remove them.

tell me if im wrong or if this is even possible and what way i should go about doing this
remember im a novice at coding.
Link to comment
Share on other sites

1\. You can make some way of the server to know that the player has finished the task to get the teleport to A-B. Something like an array of all the tasks. It will check whether the player has done it, if not it will just say some message.

2\. I am not sure whether EO can support Random Map Making if it does make a map it won't be proper and might have different tiles at different places. I think you will have to make all the random maps and then you will have to use them. Also deleting the maps will, I think make the other maps continuing it unreadable just as the Character lists.

3\. I think that can be added with lots of coding. You can use rand for randomizing a number. Then set the number to a variable. Then let the game check whether the variable is the specified number if so then do what you want it to do.
Link to comment
Share on other sites

2\. You could always put together a instancing system (Generate a random map, and destroy it after use) That may be a little harder then a regular instance system. And to make the map randomly generated try and look for that random dungeon generator that i believe is in the resources board. Good luck with your project :)
Link to comment
Share on other sites

@abhi2011:

> 2\. I am not sure whether EO can support Random Map Making if it does make a map it won't be proper and might have different tiles at different places. I think you will have to make all the random maps and then you will have to use them. Also deleting the maps will, I think make the other maps continuing it unreadable just as the Character lists.

Wrong, you shouldn't think 'EO can handle this' but 'VB6 can handle this', and everything is possible. ;)

@Ninja-Tech:

> my worry is that multiple players doing this at times will slow the server down as it has to make new maps and discard maps and spawn npcs and remove them.
>
> tell me if im wrong or if this is even possible and what way i should go about doing this
> remember im a novice at coding.

Well, it will slow down the server a bit, but I think with optimized code and a decent server it won't matter that much.
Link to comment
Share on other sites

@Erwin:

> Wrong, you shouldn't think 'EO can handle this' but 'VB6 can handle this', and everything is possible. ;)

Will the map come with the a full tree and a correct place? Will it come in the fringe layer. will the ground come as expected with the same ground texture everywhere?
Link to comment
Share on other sites

@abhi2011:

> Will the map come with the a full tree and a correct place? Will it come in the fringe layer. will the ground come as expected with the same ground texture everywhere?

If you program it correctly yes. Look how the random dungeon generator worked.
Link to comment
Share on other sites

1) In the Player structure, I would add an additional "VisitedMap(1 To Max_Maps) As Boolean". In the map warping procedure (Can't remember which one) I'd flag VisitedMap(CurMap) as true. When the server receives the packet from the client, I would have the server quickly loop the VisitedMap rec, make a quick list of what's set to true, and send that back to the client, from there, how you handle things is down to how you make the interface.

2+2) I'd make a duplicate warping routine for this, but at the end, I'd add a little If Rand(1, 100) <= 25 (To give a 25% chance.) that would warp you to a random pre-made map (I'd use several, to give the illusion of encounters). As for spawning NPCs on them, I would just generate them server-side, based on what you said for 3.

* * *

And, at your generation thing, currently, in The Tower, it takes me ~150ms to generate 1 64x64 map, on my 2.3GHz computer.

I imagine you've probably got a better computer, and if you're generating a map size that's the default size (I think it's 11x14), it's definitely not going to impact you in minimal amounts of generation, however, as your game gets more popular, I would notice a small impact whenever somebody used fast-travel. To solve that, just have a range of pre-made maps.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...