ID:103944
 
Not a bug
BYOND Version:479
Operating System:Windows 7 Home Basic 64-bit
Web Browser:Firefox 3.6.12
Applies to:DM Language
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary: This is less of a bug and more of flawed design. How turn is currently handled causes too much CPU usage and lag spikes. I would really like for this code to be improved if one of the games I have been working on for the past 4 years will ever be feasible for Byond.

Numbered Steps to Reproduce Problem:
Use turn() or Turn()

Code Snippet (if applicable) to Reproduce Problem:
    verb
Turnme()
set category = "Commands"
if(!usr.turning)
usr.turning = 1
Turned(usr)

proc
Turned()
var/icon/I = usr.icon
for(var/i=0,i<=45,i+=3)
usr.icon = turn(I,i)
sleep(3)
usr.turning = 0


Expected Results: Smooth turning with no lag(Even in multiplayer).

Actual Results: Major lag spikes in single player, doesn't even work in multiplayer.

Does the problem occur:
Every time? Or how often? Yes
In other games? Yes
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur? Never

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? It has occurred for as long as I am aware.

Workarounds: Loading all of the turn icons when the server is created. The problem with this is it will cause a huge load time when there are over 120 big icons that require turning.