Selamün aleyküm arkadaşlar ,
Metin2dev'den alıntıdır.
Char_battle.cpp
açılır
m_pkDeadEvent = event_create(dead_event, pEventInfo, bImmediateDead ?1: PASSES_PER_SEC(10));
arat ve sondaki "10"u kendine göre ayarla.
iyi forumlar.
Metin2 Oyunlarında Canavarların Öldükten Sonra Kaybolma Süresi: C++ ile Uygulama
Metin2 özel sunucularında (private server), oyun mekaniği ve performans yönetimi oldukça kritik öneme sahiptir. Bu yazıda, C++ tabanlı game core üzerinde canavarların öldükten sonra haritada ne kadar süreyle kalacağını ve bu sürenin nasıl ayarlanacağını ele alacağız. Özellikle PvP sistemlerinde bu konu, hem oyun dengesi hem de sunucu performansı açısından büyük önem taşır.
Canavarların Kaybolma Süresi Nedir?
Metin2'de bir canavar öldürüldüğünde, önce corpse (ceset) haline gelir. Bu corpse, belirlenen bir süre boyunca haritada kalır. Bu süre dolunca canavarın modeli tamamen ortadan kalkar ve yeni spawn için hazır hale gelir. Bu süreye 'death duration' veya 'corpse duration' denir. Varsayılan değer genellikle 10 saniyedir. Bu değer, C++ seviyesinde değiştirilebilir.
Neden 10 Saniye?
10 saniye, hem oyuncuların cesedi görebilmesi hem de haritada fazla kalıp tıkanıklık yaratmaması için ideal bir süredir. Ancak bazı özel PvP haritalarında bu sürenin kısaltılması ya da uzatılması istenebilir. Örneğin, Blood Castle gibi etkinliklerde veya Conquer System haritalarında farklı süreler tercih edilebilir.
C++ Kaynağında Nasıl Ayarlanır?
Metin2 özel sunucularında bu süreyi değiştirmek için genellikle game/src/char.cpp veya benzeri dosyalarda bulunan death timer ayarlarına erişmeniz gerekir. Burada m_pkDeadEvent gibi olaylar tanımlanır. Bu event üzerinden PULSE_TICK baz alınarak zamanlama yapılır. 1 pulse = 1 saniye olarak hesaplandığında, 10 saniye için 10 * PULSE_SECOND şeklinde tanımlanabilir.
Kod Örneği (Genel Yapı)
Sunucu Performansı ve Bu Ayar
Canavarların daha uzun süre haritada kalması, özellikle yoğun PvP haritalarında sunucuda fazladan yük oluşturabilir. Her corpse, bir nesne olduğu için RAM ve CPU üzerinde etkisi vardır. Bu yüzden, death duration süresi, sunucu kapasitesine ve oyun akışına göre dengelenmelidir. Metin2 Lobby sistemlerinde bu ayarlar genellikle config dosyalarında sabit olarak değil, dinamik olarak ayarlanabilmektedir.
Özel Sunucularda Uygulama Farkları
Farklı Metin2 özel sunucularında bu ayar farklı şekillerde yapılandırılabilir. Bazı sistemlerde bu değer db üzerinden okunabilir, bazılarında ise server_info.bsd gibi yapılandırma dosyalarında tanımlanabilir. C++ seviyesinde yapılan düzenlemeler, tüm bu yapılandırmaların temelini oluşturur.
Sonuç
Canavarların öldükten sonra haritada ne kadar süreyle kalacağı, Metin2 özel sunucularında oyun deneyimini ve performansı doğrudan etkileyen küçük ama önemli bir ayardır. C++ seviyesinde bu süreyi yönetmek, geliştiricilere büyük esneklik sağlar. Bu ayarı doğru yönetmek, PvP deneyimini artırabilir ve sunucu tıkanıklığını önleyebilir. Metin2 Lobby sistemlerinde bu gibi ayarlamalarla sunucu performansını optimize edebilirsiniz.
Metin2 Monster Death Disappear Duration: Implementation with C++
In Metin2 private servers, game mechanics and performance management are highly critical. In this article, we will discuss how long monsters remain on the map after dying and how to configure this duration within a C++-based game core. Particularly in PvP systems, this topic is important for both game balance and server performance.
What is Monster Disappear Duration?
When a monster is killed in Metin2, it first turns into a corpse. This corpse remains on the map for a defined period. After that time, the monster's model completely disappears and becomes ready to respawn. This duration is called 'death duration' or 'corpse duration'. The default value is usually 10 seconds. This value can be changed at the C++ level.
Why 10 Seconds?
Ten seconds is considered ideal so players can see the corpse without cluttering the map for too long. However, in some special PvP maps, this duration may need to be shortened or extended. For instance, events like Blood Castle or Conquer System maps might require different durations.
How to Configure It in C++ Source Code?
To change this duration in Metin2 private servers, you typically access the death timer settings found in files such as game/src/char.cpp. Here, events like m_pkDeadEvent are defined. Timing is based on PULSE_TICK. Since 1 pulse equals 1 second, 10 seconds can be defined as 10 * PULSE_SECOND.
Code Example (General Structure)
Server Performance and This Setting
Having monsters stay longer on the map can cause extra load on the server, especially in high-intensity PvP maps. Each corpse is an object, affecting RAM and CPU usage. Therefore, the death duration should be balanced according to server capacity and gameplay flow. In Metin2 Lobby systems, these settings are often not hardcoded but can be configured dynamically via config files.
Implementation Differences in Private Servers
Different Metin2 private servers may configure this setting in various ways. In some systems, this value may be read from the database, while others might define it in configuration files like server_info.bsd. Adjustments made at the C++ level serve as the foundation for all these configurations.
Conclusion
The duration for which monsters remain on the map after death is a small but significant setting that directly impacts gameplay experience and performance in Metin2 private servers. Managing this duration at the C++ level provides developers with great flexibility. Properly managing this setting can enhance PvP experience and prevent server lag. You can optimize your server performance by applying such adjustments in Metin2 Lobby systems.
Metin2dev'den alıntıdır.
Char_battle.cpp
açılır
m_pkDeadEvent = event_create(dead_event, pEventInfo, bImmediateDead ?1: PASSES_PER_SEC(10));
arat ve sondaki "10"u kendine göre ayarla.
iyi forumlar.
Metin2 Oyunlarında Canavarların Öldükten Sonra Kaybolma Süresi: C++ ile Uygulama
Metin2 özel sunucularında (private server), oyun mekaniği ve performans yönetimi oldukça kritik öneme sahiptir. Bu yazıda, C++ tabanlı game core üzerinde canavarların öldükten sonra haritada ne kadar süreyle kalacağını ve bu sürenin nasıl ayarlanacağını ele alacağız. Özellikle PvP sistemlerinde bu konu, hem oyun dengesi hem de sunucu performansı açısından büyük önem taşır.
Canavarların Kaybolma Süresi Nedir?
Metin2'de bir canavar öldürüldüğünde, önce corpse (ceset) haline gelir. Bu corpse, belirlenen bir süre boyunca haritada kalır. Bu süre dolunca canavarın modeli tamamen ortadan kalkar ve yeni spawn için hazır hale gelir. Bu süreye 'death duration' veya 'corpse duration' denir. Varsayılan değer genellikle 10 saniyedir. Bu değer, C++ seviyesinde değiştirilebilir.
Neden 10 Saniye?
10 saniye, hem oyuncuların cesedi görebilmesi hem de haritada fazla kalıp tıkanıklık yaratmaması için ideal bir süredir. Ancak bazı özel PvP haritalarında bu sürenin kısaltılması ya da uzatılması istenebilir. Örneğin, Blood Castle gibi etkinliklerde veya Conquer System haritalarında farklı süreler tercih edilebilir.
C++ Kaynağında Nasıl Ayarlanır?
Metin2 özel sunucularında bu süreyi değiştirmek için genellikle game/src/char.cpp veya benzeri dosyalarda bulunan death timer ayarlarına erişmeniz gerekir. Burada m_pkDeadEvent gibi olaylar tanımlanır. Bu event üzerinden PULSE_TICK baz alınarak zamanlama yapılır. 1 pulse = 1 saniye olarak hesaplandığında, 10 saniye için 10 * PULSE_SECOND şeklinde tanımlanabilir.
Kod Örneği (Genel Yapı)
Kod:
[COLOR=red]int[/COLOR] deathDuration = [COLOR=red]10[/COLOR];[BR][/BR][COLOR=red]if[/COLOR] ([COLOR=red]ch->IsDead()[/COLOR]) {[BR][/BR] [COLOR=red]ProcessDeadEvent[/COLOR](ch, deathDuration);[BR][/BR]}
Sunucu Performansı ve Bu Ayar
Canavarların daha uzun süre haritada kalması, özellikle yoğun PvP haritalarında sunucuda fazladan yük oluşturabilir. Her corpse, bir nesne olduğu için RAM ve CPU üzerinde etkisi vardır. Bu yüzden, death duration süresi, sunucu kapasitesine ve oyun akışına göre dengelenmelidir. Metin2 Lobby sistemlerinde bu ayarlar genellikle config dosyalarında sabit olarak değil, dinamik olarak ayarlanabilmektedir.
Özel Sunucularda Uygulama Farkları
Farklı Metin2 özel sunucularında bu ayar farklı şekillerde yapılandırılabilir. Bazı sistemlerde bu değer db üzerinden okunabilir, bazılarında ise server_info.bsd gibi yapılandırma dosyalarında tanımlanabilir. C++ seviyesinde yapılan düzenlemeler, tüm bu yapılandırmaların temelini oluşturur.
Sonuç
Canavarların öldükten sonra haritada ne kadar süreyle kalacağı, Metin2 özel sunucularında oyun deneyimini ve performansı doğrudan etkileyen küçük ama önemli bir ayardır. C++ seviyesinde bu süreyi yönetmek, geliştiricilere büyük esneklik sağlar. Bu ayarı doğru yönetmek, PvP deneyimini artırabilir ve sunucu tıkanıklığını önleyebilir. Metin2 Lobby sistemlerinde bu gibi ayarlamalarla sunucu performansını optimize edebilirsiniz.
Metin2 Monster Death Disappear Duration: Implementation with C++
In Metin2 private servers, game mechanics and performance management are highly critical. In this article, we will discuss how long monsters remain on the map after dying and how to configure this duration within a C++-based game core. Particularly in PvP systems, this topic is important for both game balance and server performance.
What is Monster Disappear Duration?
When a monster is killed in Metin2, it first turns into a corpse. This corpse remains on the map for a defined period. After that time, the monster's model completely disappears and becomes ready to respawn. This duration is called 'death duration' or 'corpse duration'. The default value is usually 10 seconds. This value can be changed at the C++ level.
Why 10 Seconds?
Ten seconds is considered ideal so players can see the corpse without cluttering the map for too long. However, in some special PvP maps, this duration may need to be shortened or extended. For instance, events like Blood Castle or Conquer System maps might require different durations.
How to Configure It in C++ Source Code?
To change this duration in Metin2 private servers, you typically access the death timer settings found in files such as game/src/char.cpp. Here, events like m_pkDeadEvent are defined. Timing is based on PULSE_TICK. Since 1 pulse equals 1 second, 10 seconds can be defined as 10 * PULSE_SECOND.
Code Example (General Structure)
Kod:
[COLOR=red]int[/COLOR] deathDuration = [COLOR=red]10[/COLOR];[BR][/BR][COLOR=red]if[/COLOR] ([COLOR=red]ch->IsDead()[/COLOR]) {[BR][/BR] [COLOR=red]ProcessDeadEvent[/COLOR](ch, deathDuration);[BR][/BR]}
Server Performance and This Setting
Having monsters stay longer on the map can cause extra load on the server, especially in high-intensity PvP maps. Each corpse is an object, affecting RAM and CPU usage. Therefore, the death duration should be balanced according to server capacity and gameplay flow. In Metin2 Lobby systems, these settings are often not hardcoded but can be configured dynamically via config files.
Implementation Differences in Private Servers
Different Metin2 private servers may configure this setting in various ways. In some systems, this value may be read from the database, while others might define it in configuration files like server_info.bsd. Adjustments made at the C++ level serve as the foundation for all these configurations.
Conclusion
The duration for which monsters remain on the map after death is a small but significant setting that directly impacts gameplay experience and performance in Metin2 private servers. Managing this duration at the C++ level provides developers with great flexibility. Properly managing this setting can enhance PvP experience and prevent server lag. You can optimize your server performance by applying such adjustments in Metin2 Lobby systems.
