Spirit Age

by Chris Gayle
Spirit Age
An amazing action adventure game in a fantasy world on mystical islands
ID:119583
 
<----------- I know you see the Spirit Age facebook fanpage badge. Click it and like the page! Thank you!




So, a few minutes ago I got a couple people onto Spirit Age's server and some of the people who were on helped me to test something I've been working on for a while.

Object Graveyards
The purpose of this system is to instead of running "obj/New()" for every object that needs to exist in the world, New() is only called on necessity, and instead of deleting, adds them to a waiting list to be recycled and used for other purposes. It will then actually finally delete the object if a certain period passes and it isn't called to action.

What I hope this accomplishes is to improve performance as I expect this to be a really active "objects on frequent demand" game, so instead of Del() + New(), it in effect resets an object to it's default variables, location changed, and given a new purpose.






The above image displays object graveyard in effect. Every number in the onscreen damage display is a separate object, however in total only 153 damage number objects were ever created and were all being recycled as you can see at the moment I took that screen shot, 22 damage number objects were on standby to be used.

To those who may not think perfecting this is an achievement however, it is to me! :D because it's not the first time I've tried to get this to work perfectly, I attempted it on DBOII and BR, neither was bug free, but this has run with ALOT more objects being created and reused and not one mishap yet :] So i'm rather pleased with myself.




Edit #1: The CPU is especially high as about 40 people were attempting to login simultaneously downloading resources and sharing their new name tag icon images with everyone else. Lag was an issue.
Sexy
Dang, hate I missed the test. Looking good man.
Yup.
It was CPU usage that forced me to miss the test.
I think it'd be cool if someone made a demo or library example of this.
@Ganing - I'll do it soon :)

@MasterMerv - Yeah, a lot of people complained about their dream seekers failing when they tried to download the rsc. It's a relatively low server that we're juicing right now, no point in investing in a big server we're only going to do alpha test on.

@Chwgt - Follow the hub and look out for it, I do host it pretty frequently. & Thank you!
Np and I was driving 2 hour drive home from Ashville today, so I can't play and drive lol. I've been waiting to play one of the games made by yourself and Zane for awhile(Since bleach). Feel free to add my msn: [email protected]
I invited over 1600 people through my pager to the game, and like 12 people on it said they got my page and joined.

I'm a bawse!
Over 1600?
Don't lie.
Don't.
Don't.

Anyway, nice progress so far. :3
i missed it :|
Sounds like the spell cache system I made for Eternia.
Chris Gayle, I would like to host the alpha tests for you if you would like it. I would be glad to help you out.
My specs are:
Windows 7 Home Premium Service Pack 1
Intel Core 2 Duo CPU @ 2.20 GHz 2.20 GHz
4GB of RAM

Speedtest: http://www.speedtest.net/result/1522009574.png

My time zone is GMT+1 as I live in Belgium.

Contact information is either pager or my MSN: [email protected]

PS: 24/7 is a possibility.
Sounds like in essence, objects are created via static array and used only when necessary. It's a great method to say the least. This warrants that a certain amount of RAM must be allocated for this to work, but I don't think that it is much of a problem in today's world. This is actually how developers maintained it in earlier platforms, before linked lists appeared.
Damn. i cant seem to look closer at that image.(click image seems broken) Also i keep missing all of your testing lol :(.

Good job anyway :) sounds like an innovative way to battle cpu and efficiency by recycling lol. :P
Teka123 wrote:
Damn. i cant seem to look closer at that image.(click image seems broken) Also i keep missing all of your testing lol :(.

Good job anyway :) sounds like an innovative way to battle cpu and efficiency by recycling lol. :P

This is me as well
The Image is on the Facebook page.
instead of running "obj/New()" for every object that needs to exist in the world, New() is only called on necessity, and instead of deleting, adds them to a waiting list to be recycled and used for other purposes
instead of Del() + New(), it in effect resets an object to it's default variables, location changed, and given a new purpose.

This can't be much different than what BYOND does internally when you create and delete objects. The difference is that their version is coded in c++ and yours is coded in DM. If your implementation is going to be faster it needs to cut corners by being specific to your application. For instance, re-use objects to display damage numbers but keep it specific to damage numbers (that way there's less to change and nothing to reset). If you make this totally generic so any object can be repurposed to become any other object on demand it's not going to be any better than creating new objects.

Also, did you first check to see if creating/deleting objects was slow? It sounds like you're fixing a problem that might not even have existed.