Raised This Month: $342 Target: $400
 85%   Almost there!

ROG - A better random origin generator[NO HIDDEN ZONES UPDATE]


Post New Thread Reply   
 
Thread Tools Display Modes
Garey
Member
Join Date: Feb 2008
Location: Russian Federation
Old 09-12-2018 , 16:17   Re: ROG - A better random origin generator[UPDATED]
Reply With Quote #21

About steep surfaces: You always can do something like that:
PHP Code:
         //Detect the floor, so we don't spawn the player in air
        
FloorOrigin[0] = RandomOrigin[0]
        
FloorOrigin[1] = RandomOrigin[1]
        
FloorOrigin[2] = -8192.0
        
        engfunc
(EngFunc_TraceLineRandomOriginFloorOriginDONT_IGNORE_MONSTERS00)
        
get_tr2(0TR_vecEndPosRandomOrigin)
        
get_tr2(0TR_vecPlaneNormalplaneNormal)
        
// If we hit a steep plane
        
if(planeNormal[2] < 0.7)
            continue; 
__________________
Sorry for my bad english
Garey is offline
Send a message via ICQ to Garey
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-17-2019 , 09:16   Re: ROG - A better random origin generator - NEW UPDATE
Reply With Quote #22

Update:
-made rog almost twice as fast as it was before. For example, in de_mon, it took 207ms to generate all the points, now it takes 100ms.
-previously it was 4.3x faster than superspawn, now it is 7.8x faster than SS.
-it generates the same amount of points, but in half the time it took before.

-added a check to prevent spawn points on top of entities(this should filter boxes like the ones from dust2 bombsite).
-added the same check that is used in regamedll for steep surfaces. If the ground is too step and the player would start sliding down, then that point will not be taken into account.

I have more updates planned, which should hopefully filter even more tricky points(like spawning in places that are too high).
__________________

Last edited by HamletEagle; 01-17-2019 at 09:38.
HamletEagle is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-17-2019 , 10:36   Re: ROG - A better random origin generator - NEW UPDATE
Reply With Quote #23

is it possible to prevent spawning player to 'weird' places on maps...like on awp_india (you have a room under the center of the map, where you cant go nowhere from it...i think thats the main problem (and only?) with this module
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...)
JocAnis is offline
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-17-2019 , 11:04   Re: ROG - A better random origin generator - NEW UPDATE
Reply With Quote #24

You would need a to pathfind from the generated point to a player spawn point to verify that the generated spot is valid (that means it's in the playable area).
__________________
KliPPy is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-17-2019 , 11:19   Re: ROG - A better random origin generator - NEW UPDATE
Reply With Quote #25

Quote:
Originally Posted by JocAnis View Post
is it possible to prevent spawning player to 'weird' places on maps...like on awp_india (you have a room under the center of the map, where you cant go nowhere from it...i think thats the main problem (and only?) with this module
Read the previous replies. But yeah, it's what klippy said.
I want to keep it fast, and adding a pathfinding algorithm is against this purpose.
This is exactly why I added an option to define your own conditions for origins. Just get the origin of that room and tell rog to ignore it.
__________________

Last edited by HamletEagle; 01-17-2019 at 11:26.
HamletEagle is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-16-2019 , 11:44   Re: ROG - A better random origin generator[NO HIDDEN ZONES UPDATE]
Reply With Quote #26

Update: added logic to prevent points from being generated inside hidden map zones(like the ones from de_mon/de_dust2/awp_india). I can not guarantee the algorithm is fail proof, so if you find a map where it doesn't work properly, please let me know so it can be fixed.

This should come with a minimal speed loss(few seconds in most maps) and with a decrease in generated points(firstly because hidden points are excluded and secondly because the algorithm will flag some valid points as being in a hidden area - mostly in indoor maps).
If you find a map where it generates an absurdly low amount of points also please let me know.

The benchmarks were not updated because I'm too lazy. I should update them soon.
__________________

Last edited by HamletEagle; 02-16-2019 at 11:46.
HamletEagle is offline
NOVA GAMING
Junior Member
Join Date: Apr 2020
Old 08-26-2020 , 03:05   Re: ROG - A better random origin generator[NO HIDDEN ZONES UPDATE]
Reply With Quote #27

Quote:
Originally Posted by HamletEagle View Post
Update: added logic to prevent points from being generated inside hidden map zones(like the ones from de_mon/de_dust2/awp_india). I can not guarantee the algorithm is fail proof, so if you find a map where it doesn't work properly, please let me know so it can be fixed.

This should come with a minimal speed loss(few seconds in most maps) and with a decrease in generated points(firstly because hidden points are excluded and secondly because the algorithm will flag some valid points as being in a hidden area - mostly in indoor maps).
If you find a map where it generates an absurdly low amount of points also please let me know.

The benchmarks were not updated because I'm too lazy. I should update them soon.

Sir , I find a Hidden Map zone in cs_assault (Original CS Map) , i was using ROG for my Teleport Machine plugin which teleport you To Some Origins

__________________
SENTRY GUN 10 LEVEL :-CLICK HERE
[NEW] ZOMBIE MOD:CLICK HERE
TF2 STYLE SENTRY , DISPENSER: CLICK HERE
SENTRY WITH ANIMATION: CLICK HERE
NOVA GAMING is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-26-2020 , 05:52   Re: ROG - A better random origin generator[NO HIDDEN ZONES UPDATE]
Reply With Quote #28

This isn't exactly the type of "hidden zone" ROG was updated to detect. It detects mostly rooms under/above the map, not areas that are connected to the map but separated by an invisible wall.
As I said before, to filter these places properly we need to run a pathfinding algorithm and see if the zone can be reached or not. While a very inneficient version can be easily implemented, it will make the include extremely slow, probably to the point where it's unusable. Better implementations will require a module and a lot of work.
__________________

Last edited by HamletEagle; 08-26-2020 at 05:53.
HamletEagle is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:49.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode