[Dev] SVN: james/501 Math Marauders: Now saves any changes you make to the map
James Paige
Bob at HamsterRepublic.com
Fri Apr 11 13:48:58 PDT 2008
On Fri, Apr 11, 2008 at 01:39:02PM -0700, Brian Fisher wrote:
> As soon as I pressed send, I realized maybe the issue here is that you
> don't want the broken reference model at all - you want a completely
> different model, that is a nearly identical mechanism... I guess what you
> want is to say, I want an asset instance that uses assetID "blah" that
> exists even if I don't have one on disk yet?
yes
> so it solves bootstrapping, but at the same time lets you edit that
> bootstrapped item if you want?
yes! :)
> I imagine it would be something like:
> MapPouch.AddBootstrapObjectForAssetID("default", value)
> where maybe value is optional?
That would work
> ... if that sounds good, what do you think of that name for it? basically
> I want the name to be as clear as possible about what it does - it's
> setting what value you should get for an asset of a particular id if it
> doesn't exist on disk yet...
.AddBootstrapObjectForAssetID says to me that it will use value whenever
the AssetID is "default" ... which doesn't sound right ot me. What about
just .SetDefaultObject ?
---
James
> On Fri, Apr 11, 2008 at 11:56 AM, James Paige <Bob at hamsterrepublic.com>
> wrote:
>
> On Fri, Apr 11, 2008 at 11:50:15AM -0700, Brian Fisher wrote:
> > The error is bad there - but I think the correct solution is to
> create a
> > new map in the editor that is connected to a file, and then edit
> it. The
> > broken asset is really intended to be a "hey! you have a bad asset
> > reference" object and to be a bootstrapping device (i.e. you can
> run it
> > long enough to create an asset)
> >
> > basically it might be nice to have a "save as" mechanic, but I
> don't see
> > how any such mechanic would be any less work than creating a new
> asset in
> > the editor?
>
> It would be needed for something edited directly in the game window.
> ---
> James
>
> > On Fri, Apr 11, 2008 at 11:31 AM, James Paige
> <Bob at hamsterrepublic.com>
> > wrote:
> >
> > I was running into problems when saving a not-yet-existing asset.
> >
> > Basically, I have a map asset which I create like so:
> >
> > map = AssetRef(BaseMap, "default")
> >
> > So "data/default.map" does not exist anymore, but it correctly
> uses the
> > _BrokenMap object when I play, so I have a map, but when I try to
> call
> > map.asset_save() it crashes because map has no .asset_metadata
> property.
> > (which makes sense, because this was not deserialized from disk)
> >
> > So I have worked around the problem by manually creating
> default.map in
> > the editor, but is there some better way to say, "please save
> this
> > asset to disk even though it was not loaded from disk"
> >
> > You can reproduce the problem I was having by deleting
> data/default.map,
> > running main.py, and clicking anywhere (which triggers the
> > .asset_save() call)
> >
> > ---
> > James
> > On Fri, Apr 11, 2008 at 11:09:58AM -0700,
> subversion at HamsterRepublic.com
> > wrote:
> > > james
> > > 2008-04-11 11:09:57 -0700 (Fri, 11 Apr 2008)
> > > 58
> > > Math Marauders: Now saves any changes you make to the map
> > > ---
> > > A marauders/data/default.map
> > > U marauders/locals.py
> > > U marauders/main.py
> > > U marauders/map.py
> > >
> > >
> > _______________________________________________
> > Dev mailing list
> > Dev at lists.motherhamster.org
> > http://lists.motherhamster.org/listinfo.cgi/dev-motherhamster.org
>
> > _______________________________________________
> > Dev mailing list
> > Dev at lists.motherhamster.org
> > http://lists.motherhamster.org/listinfo.cgi/dev-motherhamster.org
>
> _______________________________________________
> Dev mailing list
> Dev at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/dev-motherhamster.org
> _______________________________________________
> Dev mailing list
> Dev at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/dev-motherhamster.org
More information about the Dev
mailing list