![]() |
Barebone Baddy System Event Based
2 Attachment(s)
On IOS Servers using timeouts is really bad, so its recommended to avoid them when possible.
Here is just a bare-bone version of something that can be turned into a baddy system. Instead of the traditional timeouts it uses scheduleEvents and is event based with using flags like players. Both classes attached. PHP Code:
|
Oh, this is actually a good starting place for a state machine (especially for gscript2, where making ai isn't easily done natively or ends up becoming spaghetti code)
Now I need to make an ai_execute_firing_my_lasers() function |
Quote:
PHP Code:
|
there's nothing wrong with using a regular timeout.
polling (timeout, scheduleevent) is what's to be avoided if there's an applicable event (onplayerenters, onplayerhit, etc.) that can eliminate the need for a constantly running script. the code would work exactly the same with a regular timeout!!!! unless u want to make inefficient baddies that tick every <0.05 sec. PHP Code:
|
very nice, I just always had issues regarding latency when it comes to using timeouts with new Unity Engine with Graal. Sometimes when using timeouts NPCs would skip ticks and seems as if the NPC is hopping. I also noticed polling scheduleEvents hurt majorly as well.
|
Quote:
|
I don't think you could say anything as you never worked on the Unity Client before. Unity client is more touche then the C++ Basic client. Last 4 months I been focusing on with Merlin on eliminating lag. And the number 1 culprit has been timeouts. And I'm not even talking about polling timeouts.
|
Quote:
|
Quote:
|
Quote:
|
Did you misread what I said? I never said you couldn't I said why i preferred the method I chose.
|
Quote:
|
Quote:
|
It's laughable that anybody would still want to make use of GScript even though somebody had the bright idea to actually write new client software.
|
Holy **** sauce there's actually a new client!?
|
Quote:
|
Quote:
|
Its still being worked on. It supports a bunch of Unity stuff which is a great addition to graal.
Including stuff like Shaders and Built-in Path Finding (I requested this one). |
All times are GMT +2. The time now is 01:57 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.