Theodis

Joined: Jun 14, 99

Email

The person who made the Capture the Flag game :).

Blog Comments

Login to post a comment.

#2 Theodis:  

Ahh neat just barely noticed this box here! Anyway yeah I could package it up as a library. But I think a stack works more efficiently when implemented with a normal list rather than a linked one.

Sunday, June 07, 2009 09:09AM

#1 IainPeregrine:  

Ahoy Theodis. I use a linked list structure you posted on the forums ages ago (ID:347289). I've even edited my BYOND directory so that it shows up as a library (Theodis.Queue). Perhaps you could release it as such, so that others can use it, too? You can find it, in the form I use it, here.

I took the liberty of adding a Stack() proc so that the same linked list object can be used for both stacking and queuing. Thanks.

Thursday, June 04, 2009 03:03AM

 

 

Updated Region

A post by LummoxJR made me realize that something similar to what I was attempting with my RefSortedList is already hard coded into BYOND with associative lists. I updated my Region library to use them rather than standard lists and got a massive performance boost which should make it run much much better on large areas and even a good performance boost on smaller ones.

http://www.byond.com/developer/Theodis/Region

Posted by Theodis on Wednesday, January 28, 2009 07:17PM - 1 comment / Members say: yea +4, nay -1

« More library goodness · Complex pathfinding »

Login to post a comment.

#1 Mysame:  

Interesting. But wouldn't it be better to add a check to see if the mob has entered a new turf, instead of doing the proc over and over and over again every step? I can imagine it'd take in quite some resources.

<dm>
Entered(atom/movable/a)
if(ismob(a))
var/mob/M=a
if(M.curicon!=icon)
ClearMap()
var/Region/r = new(a.loc, /proc/AccessibleTurfs)
for(var/turf/t in r.contents)
t.icon = 'red.dmi'
M.curicon=icon
return 1
mob/var/curicon</dm>

EDIT: Okay so DM doesn't work, but you get the gist.

Tuesday, May 26, 2009 12:05PM

 

 

Blog Calendar

January 2009
Su Mo Tu We Th Fr Sa
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
 
«Jul Feb»

My hosted files

(14.2 KB)
(13.1 KB)
(1.1 KB)