Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Dynamic Resources

Author
Message
DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 1st Dec 2010 20:49 Edited at: 15th Sep 2012 00:57
Every video game needs a way of keeping track of resources. I am going to re-write this later with multi-threading,resource index scaning functions, and object groups but for now I will post what I have. All these functions makes it easy to keep track of all of your resources.

NextResource() will just inc the value also searching the deleted objects array for any open indexes. I only have arrays for what resource I delete freqently. Certain resources are just initally loaded therefore don't require to be dynamic.

Removed!

This snippet is used in my project Zombie Project: Early WIP.

Any comments, questions, or bugs let me know.

DigitalFury

DigitalFury
14
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 3rd Dec 2010 02:09 Edited at: 15th Sep 2012 00:57
Dynamic Resources with a Garbage Collector using Coroutines!

REMOVED!

I would suggest reading my tutorial on Coroutines here.

This snippet is used in my project Zombie Project: Early WIP.

Any comments, questions, or bugs let me know.

DigitalFury

Login to post a reply

Server time is: 2024-11-21 15:50:43
Your offset time is: 2024-11-21 15:50:43