Welcome!

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!

Sevii - A Pokemon Server Development

That one pokemon thing
Loyal Member
Joined
Apr 3, 2010
Messages
1,766
Reaction score
621
Update:

- The use of dialogues has been revised. The world now updates one object with text.
- Selections can be made (yes, no, anything). Works the same as the menu and updates the size according to the amount of selections.
- SFML Text has been replaced here and there with RichText. Every word can now be styled by the use of the following commands:

Colors:
-
#r (Red)
- #w (White)
- #c (Cyan)
- #m (Magenta)
- #y (Yellow)
- #b (Blue)
- #g (Green)
- #n (Neutral - Black)

Styles:

- $i (Italic)
- $s (Strikethrough)
- $r (Regular)
- $b (Bold)
- $u (Underlined)

Selections:
- Usage: #S<ID>#Text for selection#l

Every command aside from selections are processed per word and will continue to apply unless reset.
 
That one pokemon thing
Loyal Member
Joined
Apr 3, 2010
Messages
1,766
Reaction score
621
Quick question. Would wild pokemon encounters be processed by the server (as in a percentage of encouter rate per patch of grass), or by values in the Tiled maps? I'm considering the server, but sending a packet each time the player enters a patch of grass seems a bit excessive, because I already do that per move. Unless I combine those, but that wouldn't be very modular, would it?
 
Moderator
Staff member
Moderator
Joined
Jan 13, 2013
Messages
1,186
Reaction score
359
It would be indeed but if we to think back on some other old sources like PokeMMO < It had a Register Server and a server and used a similar system I'm sure yet it ran perfectly fine?
 
That one pokemon thing
Loyal Member
Joined
Apr 3, 2010
Messages
1,766
Reaction score
621
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?
 
That one pokemon thing
Loyal Member
Joined
Apr 3, 2010
Messages
1,766
Reaction score
621
Update:

Only server updates this time. No visuals.

- Wild Encounter calculation implemented as
- Wild Pokemon per map implemented as (Currently only Route 1, Kanto, Gen 3)
- Pokemon stats, IV's, EV's, level up calculation implemented as
- 151 pokemon saved to the database (base stats only! Think of stats, gender ratio, etc. Further calculation is done by the server when pokemon appears or is caugh
- Formulas applied in such a way that changing a single method will change the entire system (because who wants to change something and then change 10 files because of dependency)
- LevelUp will directly affect the stats (no "You have level up! +x stats" message. Would just create extra work. Maybe later.)
- Pokemon and maps now loaded once, static lists are kept and pokemon are copied using a copy constructor.
 
Junior Spellweaver
Joined
Oct 19, 2014
Messages
108
Reaction score
6
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?

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)
 
That one pokemon thing
Loyal Member
Joined
Apr 3, 2010
Messages
1,766
Reaction score
621
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)
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.
 
Junior Spellweaver
Joined
Oct 19, 2014
Messages
108
Reaction score
6
But 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.
 
That one pokemon thing
Loyal Member
Joined
Apr 3, 2010
Messages
1,766
Reaction score
621
But 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.
According to there'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.
 
Moderator
Staff member
Moderator
Joined
Jan 13, 2013
Messages
1,186
Reaction score
359
According to there'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.
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?
 
That one pokemon thing
Loyal Member
Joined
Apr 3, 2010
Messages
1,766
Reaction score
621
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?
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.

 
Junior Spellweaver
Joined
Oct 19, 2014
Messages
108
Reaction score
6
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.
 
That one pokemon thing
Loyal Member
Joined
Apr 3, 2010
Messages
1,766
Reaction score
621
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.
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.
 
Back
Top