Jump to content


Photo

MY GAME IS GONE!


  • Please log in to reply
11 replies to this topic

#1 the ch8t

the ch8t

    GMC Member

  • GMC Member
  • 54 posts
  • Version:GM:Studio

Posted 19 June 2012 - 04:50 PM

I closed my game yesterday and a bunch of crap about stuff being invalid popped up... can't quite remember what it said, but i remember it being weird because i had changed something small, changed it back, and closed down.

I opened up the file today and every resource is gone.

I looked in my source file for my game and all of my resources are there, but the datafiles folder is empty... I don't think i've ever looked in there before so maybe thats normal... but does anyone have a solution to "restore" my game to what it was before?

Edited by the ch8t, 21 June 2012 - 12:26 AM.

  • 0

#2 yvesnadjarian

yvesnadjarian

    GMC Member

  • GMC Member
  • 158 posts
  • Version:GM:Studio

Posted 19 June 2012 - 04:58 PM

It's called backup. Man you are creating a game and you didnt create a backup?

If the GM files are not there.. you can try to find those restore programs and test your luck.
Did you tried to open the project by the recent projects list?
  • 0

#3 the ch8t

the ch8t

    GMC Member

  • GMC Member
  • 54 posts
  • Version:GM:Studio

Posted 19 June 2012 - 05:27 PM

i have tried opening by recent projects... also didn't work.

The .gmx file still exists... it just seems to not pick up any of the resources.
  • 0

#4 vertex67

vertex67

    GMC Member

  • GMC Member
  • 512 posts

Posted 19 June 2012 - 06:15 PM

Same thing happened to me. What happened is GMStudio wiped your .project file clean. There is already a bug report for it in the bug tracker. Dont worry, your game is recoverable. You need to open your .project file in a text editor and reconstruct the XML. As long as your project isnt massive it shouldnt take too long. The XML format is pretty simple, open up one of the .project files for the demo and copy the format that those follow. The .project file is what the UI opens to find all of your assets, if it is empty, the UI shows your project as empty.

The actual cause of this error is a bad line of XML in the project file. You can reproduce it by adding this line into any project in the configs section (this is the line that was causing my error).
<Config>Configs\</Config>

When you try to save, an access violation popup will appear and then GmStudio will do the only logical thing (sarcasm) and erase your project file.

It took me about 10 minutes to reconstruct my game which had 6 objects, 30 scripts, a few sprites. its one line of xml per asset.

If you project is massive, you could write a program to reconstruct the .project file by traversing through your project directory. Hopefully yoyo will provide such a program as this is happening to many people. Really the file should be able to reconstruct itself, the only things in the .project file that cannot be inferred from the project directory structure is the names of your asset Groups

Edited by vertex67, 19 June 2012 - 07:07 PM.

  • 3

#5 the ch8t

the ch8t

    GMC Member

  • GMC Member
  • 54 posts
  • Version:GM:Studio

Posted 19 June 2012 - 10:30 PM

so say hypothetically that you are talking to someone who isn't very experienced in XML at all... like, someone who has never used it ever..... like me.

What exactly would I type in the code to "grab" my resources?

also, i have 37 objects, 46 sprites, and several backgrounds and timelines... would i be better off waiting a couple days for a fix?
  • 0

#6 vertex67

vertex67

    GMC Member

  • GMC Member
  • 512 posts

Posted 20 June 2012 - 12:46 PM

Here is the .project file for the angry cats demo.
Spoiler


Notice how the sections of the document match up with the project directory? You need to do the same thing for your game.
If I trim down the document to its basic sections, you have something like this
<assets>
  <Configs name="configs">
    <Config>Configs\Default</Config>
  </Configs>
  <NewExtensions/>
  <sounds name="sound">
  </sounds>
  <sprites name="sprites">
  </sprites>
  <backgrounds name="background">
  </backgrounds>
  <paths name="paths"></paths>
  <scripts name="scripts">
  </scripts>
  <fonts name="fonts">
  </fonts>
  <objects name="objects">
  </objects>
  <rooms name="rooms">
  </rooms>
  <help>
    <rtf>help.rtf</rtf>
  </help>
  <TutorialState>
    <IsTutorial>0</IsTutorial>
    <TutorialName></TutorialName>
    <TutorialPage>0</TutorialPage>
  </TutorialState>
</assets>
Now the thing about XML is that elements are nested within one another. You will need to put your assets nested within the appropriate section like so
<sprites name="sprites">
   <sprite>sprites\YOUR_SPRITE_NAME_HERE</sprite>
   //...do this for all of your sprites
</sprites>

The same rule applies for all of your assets. If you do not have any sounds, or paths, I think you can just remove the section entirely.
THe last thing you should notice is how there are multiple <objects> sections nested inside a parent objects section. This is just how GMStudio keeps track of your groups (folders) that you create inside of GMStudio.
If will be fine if you just put all of your assets one after the other inside of a single parent element, you will just lose any organization that you had done.

If you need more help, try to compare the Angry Cats .project file with the folder structure of the project, and with how it appears when you open it in GMStudio. They are all related.
Even if there is a fix, that doesn't necessarily mean that you will be able to get your .project file back. If you still need help, send me a download link to your project directory and I can get the document started for you with the appropriate sections and format.

Edited by vertex67, 20 June 2012 - 02:02 PM.

  • 2

#7 the ch8t

the ch8t

    GMC Member

  • GMC Member
  • 54 posts
  • Version:GM:Studio

Posted 20 June 2012 - 04:55 PM

Thank you so much vertex! i am forever in your debt!
I do have 1 more question, however....

The Angry cats demo never mentions timelines... what is the name of the asset for that section?

on a positive note, everything except the time lines are working amazing!
  • 0

#8 Greenhawk911

Greenhawk911

    SHS Drumline

  • GMC Member
  • 462 posts
  • Version:GM:Studio

Posted 20 June 2012 - 05:02 PM

And people say that GM studio has less bugs
is what I first thought but it has less bugs than you think and ism awesome!

Edited by Greenhawk911, 12 August 2012 - 10:56 PM.

  • -1

#9 yvesnadjarian

yvesnadjarian

    GMC Member

  • GMC Member
  • 158 posts
  • Version:GM:Studio

Posted 20 June 2012 - 05:11 PM

And people say that GM studio has less bugs


I didnt use any other version to compare... but GM Studio indeed has bugs.
But im confortable with it... I save my projects very often.. and the devs are always working on updates
  • 0

#10 Greenhawk911

Greenhawk911

    SHS Drumline

  • GMC Member
  • 462 posts
  • Version:GM:Studio

Posted 20 June 2012 - 05:26 PM


And people say that GM studio has less bugs


I didnt use any other version to compare... but GM Studio indeed has bugs.
But im confortable with it... I save my projects very often.. and the devs are always working on updates

It's worth the money!

Edited by Greenhawk911, 12 August 2012 - 10:57 PM.

  • 0

#11 Lune

Lune

    hic quoque transibit

  • GMC Member
  • 513 posts
  • Version:GM:Studio

Posted 20 June 2012 - 07:31 PM

And people say that GM studio has less bugs

Please don't derail a topic just for the purposes of bickering on a somewhat unrelated topic. You're not helping anyone when you do that.


@theCh8t
I'm assuming you can still make new GameMaker projects. Why don't you try making one with a timeline in it to see how it looks in the XML file? It's probably just <timeline name="timeline">...</timeline> though.
  • 0

#12 the ch8t

the ch8t

    GMC Member

  • GMC Member
  • 54 posts
  • Version:GM:Studio

Posted 21 June 2012 - 12:53 AM

my game is back! thanks so much for all the help guys... sorry i'm such an XML noob.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users