Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Apr 04 05:00:24 <f> hm
- Apr 04 05:00:34 <f> i think accessibility tester would definitely not work
- Apr 04 05:00:43 <f> (to see if survivor is reachable)
- Apr 04 05:01:09 <f> i was just sketching out some ideas, and realized that it would misfire any time it catches a player mid-flight
- Apr 04 05:01:12 <f> when falling
- Apr 04 05:01:45 <f> unless i try to extrapolate his next position based on position/velocity
- Apr 04 05:01:58 <f> that involves raycasting though :P
- Apr 04 05:08:21 <Redshift> hm
- Apr 04 05:08:23 <Redshift> well
- Apr 04 05:08:31 <Redshift> good hack detection needs to be made first
- Apr 04 05:09:03 <f> yep
- Apr 04 05:09:17 <f> i sketched out an algorithm
- Apr 04 05:09:40 <Redshift> oh?
- Apr 04 05:10:26 <f> but its efficiency is in the domain of O(n!)
- Apr 04 05:10:28 <f> :P
- Apr 04 05:10:34 <Redshift> shit
- Apr 04 05:10:57 <f> i have to check a path from every player
- Apr 04 05:11:02 <f> from every zombie
- Apr 04 05:11:07 <f> to every player
- Apr 04 05:11:15 <f> that's n*n already
- Apr 04 05:11:37 <f> then i have to save state per-block for each of those searches
- Apr 04 05:12:01 <f> that's (width*height*depth) bytes of memory additional, doubles memory use
- Apr 04 05:12:17 <f> then i have to account for all different height jumps
- Apr 04 05:12:28 <f> and for possibility of removal of blocks
- Apr 04 05:12:37 <Redshift> oh you are talking about accesability
- Apr 04 05:12:41 <f> yea
- Apr 04 05:12:49 <Redshift> @alg
- Apr 04 05:13:03 <Redshift> well what i was thinking is
- Apr 04 05:13:35 <Redshift> determine ground, if theres a path from human to ground
- Apr 04 05:13:37 <Redshift> then good
- Apr 04 05:13:41 <f> heh
- Apr 04 05:13:45 <f> it's not that easy
- Apr 04 05:14:23 <f> there's no set "ground"
- Apr 04 05:14:34 <Redshift> i know
- Apr 04 05:14:39 <f> i need a 3D array of the map, with 1 boolean (accessible/not accessible) for each
- Apr 04 05:14:51 <f> then, start at the block on which player is standing on
- Apr 04 05:14:55 <f> mark it as accessible
- Apr 04 05:15:02 <f> then keep marking off nearby blocks
- Apr 04 05:15:21 <f> taking into account possibility of jumping from the sides
- Apr 04 05:15:23 <f> or from above
- Apr 04 05:15:35 <f> and keep going outwards (BFS) until a block with a zombie on it is reached
- Apr 04 05:16:28 <f> it might be possible to reduce memory use
- Apr 04 05:16:56 <f> if, instead of using one bool for each block, i use a list or tree type structure
- Apr 04 05:17:03 <f> but that's a lot of extra allocation
- Apr 04 05:17:11 <f> and might, in practice, be even slower
- Apr 04 05:17:44 <Redshift> hmm
- Apr 04 05:18:29 <Redshift> or alternately, we allow zombies to be able to build at most 1 block every 10 seconds
- Apr 04 05:18:37 <Redshift> or something simiular
- Apr 04 05:19:07 <Redshift> :P
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement