View Single Post
  #1  
Old 06-29-2011, 11:39 PM
MrDunne MrDunne is offline
Registered User
Join Date: Aug 2010
Posts: 38
MrDunne is on a distinguished road
How would you implement an item system?

Not asking for code here nor am I asking to be spoon fed. I'm just wondering what the general consensus would be on implementing an item system in GScript?

For example, how would you implement persistence and how would you implement it so that you're not performing disk reads all the time?

I have a fairly good idea in which to do this, using the SQL capabilities and maybe writing some kind of simplistic object-relational mapping for this (if GScript is powerful/fast enough). For behaviour, I'd probably have some common interface which weapons would need to implement. Either that or a way to define callbacks with arbitrary names.

Again, just wondering what you guys would do. I don't even think it matters to much, I'm itching to build something.
Reply With Quote