ID:160608
 


Problem description:i dont know exactly whats wrong but it may be the way i wrote the code but for some reason when i try to run the game it takes about 2-10 minutes before the game starts up then when im in the game its "choppy" and uses quite a bit of cpu.

Either you have enough viruses to kill an elephant with the common cold or you didn't code the game very well.
Calling a lot of procs adds onto loading time as well as a crappy connection. If you have dial-up, theres your answer.
Might you have a really gigantic map? Because those do take long to load, though I think you'd have mentioned such a thing in your post.
Also, while this could be a code issue (or just a slow computer), it's not a specific code problem... so this isn't exactly the right place to be posting.
In response to Glarfugus
i have broadband, i have quite a new computer made made for gaming, i have no viruses (norton internet security 2008) and my map isnt that big... and i might delete some of the cod ei dont need to see if it will fix it.
In response to Kole92
If you have any .bmp files you in your game, use .png files instead. They have roughly the same quality, but .png files are compressed so they are a lot smaller and load quicker.
In response to Jeff8500
Jeff8500 wrote:
If you have any .bmp files you in your game, use .png files instead. They have roughly the same quality, but .png files are compressed so they are a lot smaller and load quicker.

hmm i do i have a few bmp files i'll change them, thanks.
In response to Kole92
Systematically remove what you added recently and continue to retest until you find out what it was that you coded that caused the lag.
Focus on anything that may be looped
(While, for statements, etc.)

Using a bunch of BMPs is quite unlikely to cause the problems that you described.
In response to Murrawhip
Oh, I thought his problem was that his resources took a long time to load when a player joined a game. Follow Murrawhips advice.
In response to Jeff8500
May I suggest you try using the profiling feature?

While you've got a game running locally, right click on your Dream Seeker, go to server and then click on profile. See if theres any disgustingly high numbers in the "calls" column.

Let us know!
In response to K'ros Trikare
K'ros Trikare wrote:
May I suggest you try using the profiling feature?

While you've got a game running locally, right click on your Dream Seeker, go to server and then click on profile. See if theres any disgustingly high numbers in the "calls" column.

Let us know!

Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls
------------------------ --------- --------- --------- ---------
/mob/proc/Saiyan_Upkeep 0.000 0.000 47.750 6
/mob/proc/TRANS_KO 0.000 0.000 23.875 1
/mob/proc/Saiyan_Revert 0.000 0.000 1.860 1
/proc/TICK 0.016 0.032 0.032 61
/mob/proc/Skin_Apply 0.000 0.000 0.000 1
/mob/proc/Power_Redefine 0.000 0.000 0.000 1
/mob/PC/Stat 0.000 0.000 0.000 77
/mob/proc/Hair_Apply 0.000 0.000 0.000 1


is any of this bad...?lol
In response to Kole92
mob/PC/Stat()
that verb uses a lot of ticks in a short time...
Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls
--------------------------------------- --------- --------- --------- ---------
/obj/Transform/Transform/verb/Transform 0.000 0.000 26.140 3
/mob/proc/Saiyan_Trans 0.000 0.000 26.140 2
/proc/TICK 0.186 0.451 0.449 361
/mob/proc/Auto_Save 0.016 0.156 0.156 2
/mob/PC/Stat 0.062 0.062 0.063 463
/client/proc/Save 0.062 0.062 0.062 2
/proc/AFK_BOOT 0.031 0.031 0.031 1
/proc/HBTC_AGAIN 0.016 0.016 0.016 1
/proc/Z_SWORD 0.000 0.000 0.000 1
/proc/SERVER_MESSAGE 0.000 0.000 0.000 1
/proc/BEAN_GAIN 0.000 0.000 0.000 1
In response to Kole92
source file: Death Ball Vars.dm,5
runtime error: Cannot execute null.New().
proc name: CreateName (/mob/proc/CreateName)
source file: Finish.dm,26
runtime error: Cannot execute null.New().
proc name:
source file: Death Ball Vars.dm,5
runtime error: Cannot execute null.New().
proc name: CreateName (/mob/proc/CreateName)
source file: Finish.dm,26
runtime error: Cannot execute null.New().
proc name:
source file: Death Ball Vars.dm,5
runtime error: Cannot execute null.New().
proc name: CreateName (/mob/proc/CreateName)
source file: Finish.dm,26

i kept getting these errors when i hosted it on my computer. Daemon had to "suppress" the messages or it would have overloaded it.
In response to Kole92
My suggestions for lowering the lag, and the time it takes to load up the game are:

1. Get a better PC, if you have an old one.

2. Efficientize the coding.

3. Check the vital parts of startup, such as world/New(), procs ran at startup (if any), etcetera.

4. Check your "CreateName" proc, and the New() proc which apparently caused those runtime errors, and fix them if they're the problem.

EDIT: Please start using the "Edit" button, don't double post, even triple post, unless you want to bump the topic.

~Duper