Heya \o/ ;3
Long time no see you all haha
So, let's just say, i'm back...
I was a little bored then i decided to code CO again, and hmm, Well... Two days ago i started a 5095 source... for now it has just the basics but to continue i would like a little of help with the screen system...
Basically there is a main thread for the players...
Code:
m_pHandler = new GameThread(0, "USERS", 100);
m_pHandler.Start(new GameThreadCall(OnTimer));
OnTimer() method will call user ontimer... and user will call screen check..
for now, i'm doing basically this to remove the entities from screen:
Code:
public void OnTimer()
{
SysObj[] setObjects = GetObjects();
foreach (SysObj pObj in setObjects)
{
if (pObj.GetDistance(Player.PosX, Player.PosY) > 18)
{
DelObj(pObj.ID);
Player.Send(MsgAction.Create(pObj.ID, 0, 0, 0, 0, 0, MsgAction.ACT_ENTITYREMOVE));
}
}
}
i know you're going to ask: But if you're removing entities from screen when they're out of range, what's the problem?
I'd just like an opinion about the way to remove entities from screen... i guess, call it every time when player move somewhere may take a lot of memory for nothing... so basically i did this way for now only...
other questions will come soon
Thanks in advance ^^