• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Programmer [Paid Job] Fix the high cpu usage if to many monsters

Marko999x

999x era
Premium User
Joined
Dec 14, 2017
Messages
2,860
Solutions
82
Reaction score
1,964
Location
Germany
Hi
Its known that the newest tfs version has problems with the cpu usage if it comes to monsters
Back in old days when people have used ( TFS 0.4 ) you could have crazy fast attack speed and many monsters with a big amount of players without getting troubles with the CPU usage
I dont know how hard it is to fix it but im willing to pay it if the price is fair
The fix will be released to the community then
Let me know your price
King regards

Old TFS 0.3.6/0.4 Monsters moving pretty fast

New TFS 1.5 Monsters moving like lagging
https://gyazo.com/53ceb2a7220bb70d8e8d93ef91cc6888
 
Hi
Its known that the newest tfs version has problems with the cpu usage if it comes to monsters
Back in old days when people have used ( TFS 0.4 ) you could have crazy fast attack speed and many monsters with a big amount of players without getting troubles with the CPU usage
I dont know how hard it is to fix it but im willing to pay it if the price is fair
The fix will be released to the community then
Let me know your price
King regards

Old TFS 0.3.6/0.4 Monsters moving pretty fast

New TFS 1.5 Monsters moving like lagging
https://gyazo.com/53ceb2a7220bb70d8e8d93ef91cc6888
Have you looked at this thread? Solved - Weird monster behaviour in TFS 1.1? (https://otland.net/threads/weird-monster-behaviour-in-tfs-1-1.228021/page-3#post-2703201)
 
As far i know @Gesior.pl fixed this for some server, not sure if no then sorry for ping.
I don't think this is an easy fix so not sure about the price of that kinda job :p
 
Well i added what you said @Obito , but look this bug...

giphy.gif
 
Last edited:
I believe that I have the same issue as yours. It happens with many monsters on the screen, and classicAttackSpeed = true
I know it's related to the doAttacking function causing high CPU usage.
Code:
[17/08/2023 19:30:40]
Thread: 1 Cpu usage: 71.1587% Idle: 28.7749% Other: 0.066461% Players online: 46
Time (ms)     Calls     Rel usage %    Real usage % Description
16767       314       78.54636%       55.89254% std::bind(&Game::checkCreatures, this, (index + 1) % EVENT_CREATURECOUNT)
I have been trying to make some fixes for this for a few days now.
 
@Addams but talking about the reaction/dodge is something else...

Its still a problem which should be fixed
You cant just say to people "Dont do fast attack" as example
I remmember back when you could use super fast attack with 500 players online without lagging :D
 
Last edited:
Well @Jeyci , looking at @ralke server, which has the changes from that post, you can see the same dodge error. And it has these changes:

The same thing regarding the dodge (monster get stuck)
(i died testing this)
Screenshot_957.png
 
Last edited:
All those path finding or tfs algorithm which has been released has changed nothing
TFS 1.5 is the biggest bullshit if it comes to monster reaction
Im suprised they focus on higher client instead of fixing this ( which is a critical problem in my eyes )
Yes I know tfs is for free and everyone does that for free, please dont kill me. I can be your girlfriend for that fix
And no I cant fix it by myself I know this is not something which cant be fixed in 1 hour but you can atleast start at fixing it :D
 
Well @Jeyci , looking at @ralke server, which has the changes from that post, you can see the same dodge error. And it has these changes:

The same thing regarding the dodge (monster get stuck)
(i died testing this)
View attachment 77829
This video was recorded before I switched static constexpr int32_t EVENT_CREATURE_PATH_INTERVAL. It also has a little change of behaviour due creature level system. I think is worth a try to see in depth that a* algorythim by @Itutorial and test multiple values for EVENT_CREATURE_PATH_INTERVAL at least as starting point. But honestly, all theese changes are MUCH better than default TFS algorythm (hunting the normal algorythm monsters is really boring). Also check necromancers part of video, if the second player reaches the monster it moves. It also has the case of a warlock that moves from trap if the player is trapping from 2 sqm of distance.


We talked with a player of the server about this, he says the diagonal standing will cause less damage from monsters. He says they react more often in linear patterns than diagonals. There's also an issue if a monster has summons, and it goes out of screen. You can actually hunt it using AOE runes (like avalanches for example) and hit it outside of the screen to kill it. For this I am thinking about giving more range to monster sight considering this: [Tutorial] Adding more tiles to game window - Updated 7/6/2018 (https://otland.net/threads/tutorial-adding-more-tiles-to-game-window-updated-7-6-2018.228243/page-11#post-2669907)

Hope all this information helps somehow,
Regards!
 
Of course @ralke, that's true, those changes are an improvement for the CPU, but the monster still stays in that corner (it moves a square around that corner, you can see it in the GIF posted again below), it doesn't dodge it...

Screenshot_959.png

THE BOTH DODGES IN TFS 1.5 / TFS 0.4

giphy.gif
Post automatically merged:

Well i solved the issues for dodge and reaction, the solutions are there:
 
Last edited:
Yes I know tfs is for free and everyone does that for free, please dont kill me. I can be your girlfriend for that fix
And no I cant fix it by myself I know this is not something which cant be fixed in 1 hour
🤣 well said

I guess it's easy to look at tfs and wonder why, but we need to remember that devs can work on other things who might not actually be able to work on the monsters.

It does seem weird that this issue isn't talked about more or taken seriously though, it's literally broken. TFS does not work and is not a base to work from. Arguably the most important feature of the game is flat out broken and the average user can not fix it nor afford to have it fixed for them.

Any serious OT using these monsters just looks silly, the monsters are so dumb a lvl 6 could kill a demon with throwing stones almost.
 
TFS does not work and is not a base to work from. Arguably the most important feature of the game is flat out broken and the average user can not fix it nor afford to have it fixed for them.

Any serious OT using these monsters just looks silly, the monsters are so dumb a lvl 6 could kill a demon with throwing stones almost.
I just wanted to take this point just to say that TFS is the standard base for almost every user who I talked to in otland. There's some particular cases where I received other distributions, but really, who doesn't use TFS to build their first server nowdays?
 
Back
Top