Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Torquai

Handling world-objects (adding, moving, deleting) (a bit long)

This topic is 5736 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I''ve started writing down some ideas for a game I would like to try making, and this are going very well considering Im still in the idea stage. But looking ahead to the programming part I see a problem. I would like to make the game flexible, and therefore it should be easy to add more items (mostly weapons, ammo, and general equipment) so Im thinking of a scriptbased system where I can add/manipulate/delete objects and add properties to the objects without having to hardcode anything. So my question is how this is usually done? The inventory system is more an RPG style where objects can be equipped on the person, placed in backpacks, modified (for example placing a lasersight on a rifle, or loading ammo into a rifle). Maybe a function based script system like: Create a new object new %type %name (new wpn Rifle, new inv Backpack) Modify a property on an object mod %name %property %value (mod Rifle ammo 4, mod Rifle) Move an object from an inventory to another move %name %from %to (move Rifle Backpack Left_hand) Delete an object del %name Of course a system like this would require a lot of checking here and there (like a obj_type function to see if an object is a beholder of some sorts or prop_exists to see if an object has a certain property) But as I stated above I know very little of these kind of things so all ideas and comments are accepted with gratitude. Thanks in advance -Thomas Leggett tl@removeme@digitalteknikk.no

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!