Thanks, that might be usefull!Originally Posted by lucky
I discovered the cause of the problem! Threads! The Indy server socket creates a thread for each client socket. Whilst the main loop is going round and round the threads don't get allocated much processing time at all. By adding in either a Sleep(n) or say a 250ms loop of application.processmessages the problem is solved.
I need to think more about this to optimize it. One pass through the main loop with around 20 creatures takes 0ns! 0 ticks LOL! One loop through the main loop with 40 (20 of them on one screen) creatures takes 42ns! So that isn't bad... That's also whilst running the message server, login server, AND client @ 100fps LOL
Bookmarks