From: Justin Collins Date: 2012-05-10T11:01:43+09:00 Subject: Re: game development in ruby On 05/09/2012 06:40 PM, Zachary Pearson wrote: > Hi, Im fairly new to ruby, and as an exercise of what i've learned and > an attempt to further understand ruby, i have decided to create a text > based RPG. I've been able to get pretty far with virtually no trouble, > but i have ran into a problem. I am having some trouble with the save > mechanism. the way it works is that it only saves the state of the areas > that you have the ability to travel to. but in certain areas, events are > triggered based on objects in the your inventory/environments. the > trouble i've been having is if you save once you're able to travel to > the areas, but exit the game before the events are triggered, when you > get back on, the game doesnt recognize the objects as being present and > as a result the events that should be triggered arent triggered. I'm > thinking that when it saves, it saves the object with a specific > address, but when the game loads, it loads expecting a new/different > address and doesnt recognize the old/saved address. but thats just a > guess, im not sure if thats actually whats going on. right now, im using > marshal.dump to save and marshal.load to load. would anyone have any > thoughts on this? > It seems like you need to check the player's inventory and the environment when you load the player, in order to fire the events you are expecting. I don't understand what you mean by "address". -Justin