The Dink Network

Reply to Re: New Dev File: Spells

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
December 21st 2007, 04:11 AM
fairy.gif
Someone
Peasant He/Him Australia
 
The problem with mlevel is that with a loop with a small wait time you basically condemn everything to be delayed by the time it takes to execute the loop. It's not very long, but there's a way to do without a loop. Also almost all of the time &magic_level is going to be zero so it's a lot of useless CPU calculations.

Similar effect with the sleeping enemies loops. There's a 400ms wait, but there could be several of them. The problem with external() is that it evokes the loading of the script file being called into memory. Yes the scripts are never very big but even just the hard drive access delay is non-trivial, so if you've got several external() being run every second you'll run into problems with stuff being delayed. So there's potential problems with sprites or the midi stuttering.

I mean change sp_seq(&missile_target,-1) to sp_pseq(&missile_target,-1) because pseq is more reliable to get the sequence.