Jump to content

Recommended Posts

Posted (edited)

Long story short, I've written a function that displays a circle around the character when certain conditions are met. However, I can't seem to find a way to make it so that the circle in question is dynamic, or in other words to make it move around with the character. (No matter what I tried, the result was always the same - heavy FPS drop in the client after 15-20 seconds).

Is there a way to update the circle in real time (as the character moves) and if so, how?

I'm looking for a solution that does not involve client modifications. Any ideas, tips, and tricks are more than welcome.

Edited by Bru7aLMike
improved clarity
Posted
1 hour ago, Bru7aLMike said:

Long story short, I've written a function that displays a circle around the character when certain conditions are met. However, I can't seem to find a way to make it so that the circle in question is dynamic, or in other words to make it move around with the character. (No matter what I tried, the result was always the same - heavy FPS drop in the client after 15-20 seconds).

Is there a way to update the circle in real time (as the character moves) and if so, how?

I'm looking for a solution that does not involve client modifications. Any ideas, tips, and tricks are more than welcome.

 

A primitive packet require you to define it using a name.

Basically try send again an empty primitive or to a different location such as 0, 0, 0 with the same name and it will replace it.

Posted (edited)

Well, I did try sending an empty primitive but the client still suffered from an FPS drop.  I'll try sending a point at predetermined coordinates next.

Any idea how to make it so that the circle moves with the character without clearing the existing lines and sending them all over again at different coordinates?

Like, is there a way to basically link the said packet to player's coordinates so that no matter where the character goes, the circle goes with it and the char is always in the middle of the circle (from top-down perspective).


I realise this might be a silly question but I'm still new to this kind of stuff, so... here we go. 😄

What would happen if I simply send another packet with the same name but with different coordinates without clearing the lines of the previous one? Would the old one be replaced?


 

//debug_center: the assigned name of the packet 
//clearDebugPackets: clears all lines and points associated with the packet and sends an empty packet with the same name
//reset(): clears the cached packet server side;

debug_center = activeChar.getDebugPacket("center");
debug_center.reset();
activeChar.clearDebugPackets(debug_center);

 

Edited by Bru7aLMike
additional question in order not to spam the thread
  • Thanks 1
Posted

The only possibility would be to use a Threadpool and call it every X times. That packet DRAWS things on client, there is nothing like "realtime". It stays on screen until you decide it mustn't stay on screen.

 

As you say, more you use forms, laggier your client will be. At this moment, I don't think it's possible to dump all the "hidden" forms, even after a packet reset. Client properly cleanups when the Player actually disconnects to the lobby, which probably cleans all forms from client memory.

  • 3 weeks later...
Posted (edited)
On 12/6/2021 at 7:29 PM, Tryskell said:

The only possibility would be to use a Threadpool and call it every X times. That packet DRAWS things on client, there is nothing like "realtime". It stays on screen until you decide it mustn't stay on screen.

 

As you say, more you use forms, laggier your client will be. At this moment, I don't think it's possible to dump all the "hidden" forms, even after a packet reset. Client properly cleanups when the Player actually disconnects to the lobby, which probably cleans all forms from client memory.

Hello , i am using acis 382 pack and i set when teleporting into town to get rr , select char and enterworld and i am wondering if is there any way to check client memory cache size to set this to happen when is like > 60% full ? because right now i just set to Rnd.get(1,100) > 47 🙂

Edited by arm4729
  • 2 years later...
Posted (edited)

You can LOCK the topic. I have finally found the answer to my problems. It appears to have been here, on the forum, all along.
And more specifically, the following excerpt of Elfo's comment:

"In order to fix that you have to store the original Location (x, y, z) of the player when they EnterWorld.

When you create an ExServerPrimitive package you need to provide a name, an x, a y and a z. These values NEED to be the X of the spawn location and the Y of the spawn location. The Z can be -65535 to ensure that the icon will be below the ground."

 



 

On 12/6/2021 at 7:29 PM, Tryskell said:

The only possibility would be to use a Threadpool and call it every X times. That packet DRAWS things on client, there is nothing like "realtime". It stays on screen until you decide it mustn't stay on screen.

 

As you say, more you use forms, laggier your client will be. At this moment, I don't think it's possible to dump all the "hidden" forms, even after a packet reset. Client properly cleanups when the Player actually disconnects to the lobby, which probably cleans all forms from client memory.



From what I could gather over the years, it appears as if the client replaces the circle based on String "NAME", which you send with the ExServerPrimitive.

Also, I did try your suggestion, albeit slightly altered, and it works like a charm. Namely, creating a runnable that loops through a POOL of players and sends them the updated Circle. A player is added and removed from the pool based on the VIEW FARM ZONE OUTLINE variable status. I'm just not sure if I should stop the runnable when the pool is empty or let it cook, given the fact that it loops only once per second and that I'm using a Flag at the very first check to break execution if the POOL is empty.

Edited by Salty Mike
Posted (edited)
On 6/11/2024 at 6:48 PM, Salty Mike said:

You can LOCK the topic. I have finally found the answer to my problems. It appears to have been here, on the forum, all along.
And more specifically, the following excerpt of Elfo's comment:

"In order to fix that you have to store the original Location (x, y, z) of the player when they EnterWorld.

When you create an ExServerPrimitive package you need to provide a name, an x, a y and a z. These values NEED to be the X of the spawn location and the Y of the spawn location. The Z can be -65535 to ensure that the icon will be below the ground."

 


From what I could gather over the years, it appears as if the client replaces the circle based on String "NAME", which you send with the ExServerPrimitive.

 

You indeed have to save player position over Enterworld to properly clean it up later (if you don't, even trying to delete packet content would eventually keep it up), that's what we do with debug packet (which is a reusable Map of ExServerPrimitive packets) on aCis.

 

It doesn't solve the FPS stuttering - more you draw/delete lines, more your client becomes laggy. It's like if client wasn't deleting drawn points/lines properly, but instead simply hide them and redrawn content above.

 

If you got a solution, I would happy to integrate it.

 

You should check aCis#Player _debug packet integration, it allows very big amount of lines/points to be drawn, it is also reusable.

 

https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java?ref_type=heads

Quote
private Location _enterWorld;
private final Map<String, ExServerPrimitive> _debug = new HashMap<>();


https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java?ref_type=heads

Quote

// Set the location of debug packets.
player.setEnterWorldLoc(player.getX(), player.getY(), -16000);

 

Edited by Tryskell
  • Thanks 1
Posted
On 6/11/2024 at 7:48 PM, Salty Mike said:

You can LOCK the topic. I have finally found the answer to my problems. It appears to have been here, on the forum, all along.

This is dedication! 2 years working on a problem. Congratulations!

Posted
16 hours ago, Tryskell said:

 

You indeed have to save player position over Enterworld to properly clean it up later (if you don't, even trying to delete packet content would eventually keep it up), that's what we do with debug packet (which is a reusable Map of ExServerPrimitive packets) on aCis.

 

It doesn't solve the FPS stuttering - more you draw/delete lines, more your client becomes laggy. It's like if client wasn't deleting drawn points/lines properly, but instead simply hide them and redrawn content above.

 

If you got a solution, I would happy to integrate it.

 

You should check aCis#Player _debug packet integration, it allows very big amount of lines/points to be drawn, it is also reusable.

 

https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java?ref_type=heads


https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java?ref_type=heads

 


Thanks!

I'll take a second look and let you know if my implementation of the clearCircle() helps with the stuttering once I find time for some extensive testing.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • L2Lusty 50x Essence High Version Open day 27/06  12:00 GMT London WebSite: https://l2lusty.com/ General Information If you are looking for a High Five retail server, this project is not for you, our gameplay and farming system is based on the Essence version. If you are looking for something new and different to play, this server is for you. Our server is using its own version that mixes High Five and the latest Essence version. With this, we have a good part of the items from the Lineage2 Essence version, with classes and bosses from High Five. An auto-balance system in onlympiad games, which will bring greater equality in combats. We added the Chaos Zone and Peace Zone events, for a better LCoin farm, these events are 24h and can be accessed with the commands .chaos or .peace. All essence items are purchased in our alt+b and cost an average of 300k LCoins. LCoins are obtained by killing any mob, with better drops in the Chaos zone and the Peace Zone. Server Version High Five + Essence Game Play Experience 50x Spoil 8x Drop 8x Adena 8x Normal Enchant 50% (+3 to +12) (40% 12 to 20) Blessed Enchant 50% (+3 to +12) (40% 12 to 20) Safe Enchant +3 Max Enchant +20 Max Windows / IP 6 Accounts Anti-Bot system ON Champions System ON TerritoryWar Saturday 20:00 Siege Every Sunday Olympiads 18:00 / 23:50 Oly End Days 1, 11 and 22 Max Register 1 For IP Minimum Players for Start 4 Players Subclass FREE MAX LVL 85 SHOP GRADE-S Party Diff 30 Level 55/85   Essence Items Price   Items Lvl 1 300k / 1.200kk LCoins Upgrade to Lvl 2 2 items Lvl 1 + 2b Adenas Upgrade to Lvl 3 2 items Lvl 2 + 2b Adenas Upgrade to Lvl 4 2 items Lvl 3 + 2b Adenas Upgrade Chance 25%   Exchange Items   As in other MMORPGs, we have a system of exchanging items for better items.       GrandBoss All Grand Boss Time Fixed Raids Status 50% Change Drop Queen Ant / Core / Orfen / Baium Queen ant Level: 80 Every day 18:30 / Drop Jewel 40% Core Level: 80 Every day 18:40 / Drop Jewel 90% Orfem Level: 80 Every day 18:50 / Drop Jewel 90% Baium Level: 80 Every Friday 18:00 / Drop Jewel 100% Beleth Every Friday 22:00 / Drop Jewel 100% Valakas Every Saturday 18:00 / Drop Jewel 100% Antharas Every Sunday 17:00 / Drop Jewel 100% Max Character in Zone Boss 1 For IP   Instances Party All Intances 5 Players Raids Status 50% Zaken Day 61 5 Players / Jewel Chance 10% Zaken Day Hard 83 5 Players / Jewel Chance Normal / 10% / Blessed 1.9% Zaken Nightmare 61 5 Players / Jewel Chance 90% Frintezza 5 Players / Jewel Chance 40% Freya Normal 5 Players / Jewel Chance 40% Freya Hard 5 Players / Jewel Chance 40% Tiat 5 Players / Weapon Chance 10%   Instances Solo   All Intances Drop S84 Up Crystal Level 10 / 17 Baylor Solo Drop Moirai Set / Vesper Weapons Darion Solo Weapon Chance 1% Tiat Solo Weapon Chance 1% Frintezza Solo Jewel Chance 2% Freya Solo Jewel Chance 2% Zaken Solo Jewel Chance 2% Core Solo Jewel Chance 2% Orfen Solo Jewel Chance 2% Beleth Solo Jewel Chance 1%   Special Events Event Boss Lindvior Every day 16:40 - 22:40 Event Pig Invazion Every day 15:40 - 23:40 Event Dragon Invazion Every day 18:40 - 01:40 Event City War Every day 19:40 - 02:40   Commands .ach .achievements Opens the achievements interface .buffshield (anti-buff) .away .back (stay away / back) .menu .cfg (Character control panel) .combine .talisman (Combine all Talismans) .dressme (Visual Armor Added +1000 HP) .party .invite .partylist Our custom party creation system .offline (off line shop) .repair (repair character) .siege (See the siege time or register your clan) .stats (character status)   .offbuff (Open store buffs) .autofarm (Open Auto Farm Interface) .report (Report a suspicious bot player) .buffshop (Invoke a summon to sell your buffs.) .vote (Opens our vote system.) .aa (Exchange your seal stones for AA automatically.) .oly (Shows all players who are first in the oly ranking.) .status (See a player's status, he has to be in your target) .seeres (Look at a player's resistance, he has to be in his target) .equip (See all of a player's items, they have to be in their target) .regoly (Register with oly wherever you are.) .bagclean Delete all items from your inventory, use it knowing that you will lose everything that is not equipped!   WebSite: https://l2lusty.com/
    • Our sales are ongoing. Bump. 22 June 2025 Telegram: ContactDiscordAccS
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock