- Joined
- Apr 3, 2010
- Messages
- 1,766
- Reaction score
- 621
Right now I'm using the SFML network library, which uses TCP.
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!I suppose, but wouldn't that be heavy on the server? (imagine 50 players in one map, all moving, sending 100 packets per move)Usually it would be done via the server side yes involving values and percentages I think?
If I could combine the MOVE_PLAYER packet, I could half the packets sent easily. I'm really not that knowledgable regarding server hardware and speed, but I guess it should work? Seeing other MMO's, they all send packets per movement right?
Doesn't that mean that the server should know where there's grass? i suppose that's possible, but that would mean that the server would have to parse portions of the map too. I've implemented the encounter formula already, but right now it's just the location that matters.I dont understand the need to send a packet each time the player enter in a patch of grass... (the next statement depends on your server implementation XD) Since you can check the player position you can know if the player get into grass or not... Then you could check the player's position and calculate the encounter if needed.
You need a good data structure to easy check all the encounter stuff based on player's pos but thinking this way there is no need of extra network consumption(and server stress since it will need to response to extra amount of packets)
According toBut wasnt you thinking about make it using fixed percents on grass tiles? To implement this method I think you need to know (in serverside) if the player gets into grass... So this will be something like I said.
The best part to take note of is if the maps are separate parts then you can easily set the rarities depending each map so for example say if the map was a square 5 x 5 outside that passing the 5 x 5 to a 5 x 6 you would be in a new 5 x 5 map which then would have a new bunch of rarities and pokemon unless this is what you are already referring to?According toYou must be registered to see linksthere's a an encounter rarity per area (thus map) which I could save in a database. The client would only send a boolean whether the player walked into grass or is just wandering about.
Right now each map (having made pallet town and route 1) are separate maps and thus have separate rarities (if a town had one). Each area with its tiles, npcs, objects and players are loaded separately.The best part to take note of is if the maps are separate parts then you can easily set the rarities depending each map so for example say if the map was a square 5 x 5 outside that passing the 5 x 5 to a 5 x 6 you would be in a new 5 x 5 map which then would have a new bunch of rarities and pokemon unless this is what you are already referring to?
I could try that, but that would also mean that every grass tile would need to have an encounter rate (not that hard though, just another map layer to parse). I'm already sending a packet per step, because otherwise other players won't be able to see you move.The Bulbapedia solution is interesting... You can even mix it with Bradley's idea: when you step into grass you can send a packet with an "grass area" ID to start encounter based on that area. This allows you to personalize each grass spot.
When you step out of that area, then you send a new packet saying you leave the grass and stop encounter.
Making it this way you could set even different areas inside the same grass patch. Also you only use 1 packet to start area encounter and another to stop it... There is no need to send a packet for each step you do in the map...
The issue I could think is to leave the encounter check to client (hacks) but maybe using some extra checks serverside this could be solved.