ID:268570
 
lets just say for one second you had a proc that didn't reference to another proc so you didn't have to type something out - for instance.


if(t==1)
do 20 lines of things
if(t==2)
do the same 20 lines of things
if(t==3)
ditto

and do this on and on and on again, now would this affect anything other then the filesize of the game (being that all the text makes the file larger)?

I mean it's still to me the exact same thing just not simplified, you could easily split the part that they're all copying and make a seperate proc and reference to it, but then again this is out of curiousity.




Another question -

When you have a hud, and the objects are client only as in they are made on the clients screen... When the client dies, should you bother deleting the huds on the client screen? I'm assuming it does this automatically, but there shouldn't be any problems that are caused by this I hope...
Jon Snow wrote:
lets just say for one second you had a proc that didn't reference to another proc so you didn't have to type something out - for instance.


if(t==1)
do 20 lines of things
if(t==2)
do the same 20 lines of things
if(t==3)
ditto

and do this on and on and on again, now would this affect anything other then the filesize of the game (being that all the text makes the file larger)?

I mean it's still to me the exact same thing just not simplified, you could easily split the part that they're all copying and make a seperate proc and reference to it, but then again this is out of curiousity.

I don't know how it works on the BYOND side of things(speed, fileszie, etc). However it is bad programming practice. One of the goals of a programmer should be to create nice, simple code that does its job.

Ideally you should just have to know what to send a procedure, and what it sends out. Having to know what happens inside all the different procedures/bits of code is a bad thing.



When you have a hud, and the objects are client only as in they are made on the clients screen... When the client dies, should you bother deleting the huds on the client screen? I'm assuming it does this automatically, but there shouldn't be any problems that are caused by this I hope...

When the client dies, the objects on the client's screen should go away. If the only place they're referenced is in the client.screen list, then when the client goes, the BYOND garbage collector will come around to deal with them.