Cleaner XML?

PhoticsPhotics Member Posts: 4,172
edited November -1 in Working with GS (Mac)
The XML that GameSalad creates is hard to read. I think it should be something cleaner. It doesn't have to be too fancy. A new line for each line of XML would make the object.xml file easier to read.

Also, if create my own custom id numbers for XML, will that cause problems?

I'm working on BOT and I'm already up to about 60 attributes. With so many attributes, sometimes it's easier to edit this stuff with a text editor.

Comments

  • Rob2Rob2 Member Posts: 2,402
    Project Attributes from deep blue would help alot with that
  • Rob2Rob2 Member Posts: 2,402
    what editor are you using ..when I open a GS xml file it looks like this

    image

    and I can tab between fields
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
  • PhoticsPhotics Member Posts: 4,172
    jonmulcahy said:
    Moving to suggestions.

    I think you take moderating too seriously. There is a question that is totally related to working with GameSalad. If I create my own custom id numbers, is that going to break the project file? That's totally "Working with GameSalad".
    Rob2 said:
    what editor are you using

    I use a bunch of text editors... TextEdit, gedit, TextWrangler and even Xcode. With any of those programs, the attributes are in one giant line of code.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Photics said:
    I think it should be something cleaner. It doesn't have to be too fancy. A new line for each line of XML would make the object.xml file easier to read.

    That is a suggestion.
  • PhoticsPhotics Member Posts: 4,172
    jonmulcahy said:
    That is a suggestion.

    If that's your standard, then you've created a lot of work for yourself. There are suggestions all over the place.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Photics said:
    If that's your standard, then you've created a lot of work for yourself. There's suggestions all over the place.

    And when I see them I move them. Just because I'm one of the few people who actually moderate does not mean I take it too seriously.
  • PhoticsPhotics Member Posts: 4,172
    jonmulcahy said:
    And when I see them I move them. Just because I'm one of the few people who actually moderate does not mean I take it too seriously.

    1) It's unnecessary moderation. This thread could easily be "Working with GameSalad"... as "Get a better XML editor" is a solution.

    Why is the XML like that? Is there a reason GameSalad puts it on one line like that?

    2) If you are going to be a moderator, I think it's better to work like a ninja. It's one thing to move a thread and it's another to announce it. If you come off as controlling the conversation too much, the community will start to resent it.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    jonmulcahy said:
    And when I see them I move them. Just because I'm one of the few people who actually moderate does not mean I take it too seriously.

    +1
  • PhoticsPhotics Member Posts: 4,172
    JohnPapiomitis said:
    +1

    Plus one?! You like that?
    I think that it's insulting to other Sous Chefs.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    its not insulting if its a fact ;)
  • PhoticsPhotics Member Posts: 4,172
    JohnPapiomitis said:
    its not insulting if its a fact ;)

    Ha, that may be true... but should a moderator be saying that? If it's so important to move this thread, isn't it more important to look out for your own team?

    I think the majority of the moderators will get involved if they see posts that truly need moderating. I think that's better. I like that the majority of the moderators are slow to react.
  • ToastKittenToastKitten Member Posts: 360
    Photics said:
    2) If you are going to be a moderator, I think it's better to work like a ninja. It's one thing to move a thread and it's another to announce it. If you come off as controlling the conversation too much, the community will start to resent it.

    From my personal experience, whenever I see a thread that's been touched by jonmulcahy, I can pretty much bank on it shifting from the original subject. That's just my observation.
  • PhoticsPhotics Member Posts: 4,172
    ToastKitten said:
    shifting from the original subject

    Heh, maybe I should close this thread and start a new one :)

    I'm not a moderator though. HA! :)

    So, do we want to chat about editing XML? :)
  • ToastKittenToastKitten Member Posts: 360
    Photics said:
    So, do we want to chat about editing XML? :)

    I actually just wrote an XML Parser for my CS class last week. Sadly, it doesn't do anything besides read in an XML, make a sexy node tree, and then print everything back out on a document. I think Rob's editor would be to go, that really cleans things up!
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    It's not that hard to either post in the right category, or have a focused topic for your thread.

    2 out of 3 sections of youroriginalpost dealt with the suggestionyouputin your first line, so, the general topic of your post was a suggestion as is the title of this thread.

    Photics, most of your topics either start, or end with a suggestion, and usually take up the majority if what you write. You have a lot of suggestions for the GS team which is great, but very few of them make it to the suggestions section.

    60-70% of the posts on this forum end up in the wrong section.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Like your avatar by the way photics :)

    Well this thread is a suggestion, as you dont need to know or do anything u posted t wwork with gamesalad. I just think that this thread being in suggestions wll help to not consfuse new useres from thinking they need to no xml or anything like that. I know that that seems far off, but youve seen some of the questions asked here..

    Theres also been someone lately posting that you can change your gs project to obj c and other missleading info as well, so i think it being in suggestions will make it more appartent this isnt something part of working with gamesalad and something they need to know.

    That might be a litttle far of, but again alot of far off things happen here haha.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    jonmulcahy said:
    And when I see them I move them. Just because I'm one of the few people who actually moderate does not mean I take it too seriously.

    +1
    Sorry Photics, Insult or not he's one of the few that do their job IMO. most of them are sous-chef for the inside info and testing and neglect moderation duties that are part of being a sous-chef. There are tons of posts daily that need to be moved to other categories. Jon's one of the best at moderating IMO. I rarely disagree with his actions. And while announcing its moved is not required its a definite courtesy so people know its in a new category and can find it later if they didn't save it. Not as big of an issue on this forum since EVERYTHING shows on the main page so really the categories are pointless. But is is a common thing for a forum.

    As far as xml I have no idea but I would assume as long as you find everywhere the identifier is referenced and make all changes there would be no issue since i'm pretty sure Darren's Project merger renames and duplicate identifiers in the second project.

    @Rob I would also like to know what editor that is. It's very Clean looking.
  • PhoticsPhotics Member Posts: 4,172
    ToastKitten said:
    I actually just wrote an XML Parser for my CS class last week. Sadly, it doesn't do anything besides read in an XML, make a sexy node tree, and then print everything back out on a document. I think Rob's editor would be to go, that really cleans things up!

    I'm surprised that GameSalad doesn't sort the Attributes. That would cut down XML editing.
    JohnPapiomitis said:
    Like your avatar by the way photics :)

    Heh, I created it as a parody of Disney's influence on GameSalad. I've been trying to change it to the BOT icon for about a week. The avatar upload seems to be malfunctioning again.
    ToastKitten said:
    Well this thread is a suggestion, as you dont need to know or do anything u posted t wwork with gamesalad.

    Perhaps a better title for the thread would have been...
    WORKING WITH GAMESALAD AND XML :)
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    jonmulcahy said:
    And when I see them I move them. Just because I'm one of the few people who actually moderate does not mean I take it too seriously.

    +1
    photics said:
    BOT, BOT, BOT, BOT, BOT.

    -1

    Ace
  • m456arcusm456arcus Member Posts: 189
    In my humble opinion, I think most people take little issues like this and completely over react. Even if it is in the wrong forum, is anyone really bothered by it? I get that the forum has to stay organized, but I just hate reading an interesting thread only for it to trail off into rules and regulations.

    Anyways, just my 2 cents. And btw Photics, BOT looks amazing, gl.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    m456arcus said:
    Anyways, just my 2 cents. And btw Photics, BOT looks amazing, gl.

    I've not seen it and am not slagging it off, just getting bored of it being stuffed down our necks on every post by Photics. The main reason I haven't checked it out is because of the shameless plugging, I understand branding and getting a name out, but I laugh out loud at some of the ways he's purposely forced it in to a post

    Ace
  • m456arcusm456arcus Member Posts: 189
    Even so, you should at least take a look. I just really like how Gamesalad is being pushed to it's limits with this one.
  • PhoticsPhotics Member Posts: 4,172
    mynameisace said:
    I understand branding and getting a name out

    You forgot the hyperlink for BOT.

    HA HA! :)
    m456arcus said:
    Even so, you should at least take a look. I just really like how Gamesalad is being pushed to it's limits with this one.

    Thanks! :)

    I'm trying really hard to build a great game.

    This game looks really good too...
    http://gamesalad.com/forums/topic.php?id=19768

    Later today I should have another update about the progress of BOT.
  • wayneh001wayneh001 Member Posts: 300
    Photics said:
    The XML that GameSalad creates is hard to read. I think it should be something cleaner. It doesn't have to be too fancy. A new line for each line of XML would make the object.xml file easier to read.

    The XML files created by GameSalad are compressed with WhiteSpace removed for optimisation. This is becoming more the 'norm' with developers choosing to compact and remove the white space - though I'm 'old-school' and prefer to see the data separated cleanly. The results are the same, as the standard XML Parsers handle the white space and line returns accordingly.
    Also, if create my own custom id numbers for XML, will that cause problems?
    Yes and No.
    In our testing we, tested many scenario [thanks GS :-) ] After each scenario we test built apps using the GS Viewer and compiling on the GameSalad Servers to retrieve the .app file. In 'most' of our tests, we discovered the numbering system for the unique ID's to be very flexible, but to keep in line with GameSalad, we chose to create random ID's which were unique and didn't clash with other ID's. GameSalad uses a 6 Digit Identifier.
    The quickest thing to do is to create your own ID's using 7 digits or even prefic the ID's with a letter - in all our tests this worked - but to ensure we had 100% compatibility we went down the GS route.
    So long as your numbers DO NOT clash with other ID's you should be ok.
    I'm working on BOT and I'm already up to about 60 attributes. With so many attributes, sometimes it's easier to edit this stuff with a text editor.

    I use various Editors - not least our own editor (Internal only), but the 'smoothest' tool I've used is: XMPLIFY:
    image

    Open your XML file up in the Editor and hit the [Format] button. Makes viewing and editing the XML files quite easy. It includes many advanced features to which makes editing your XML files simple and quick.

    Wayne
  • m456arcusm456arcus Member Posts: 189
    Photics said:
    This game looks really good too...
    http://gamesalad.com/forums/topic.php?id=19768

    OMG I love the art on that game! But who doesn't? And the videos look cool too! The only thing is that BOT and the Nazi Robot Penguins game are both making me feel like the game I'm working on is a piece of junk, lol.
  • PhoticsPhotics Member Posts: 4,172
    wayneh001 said:
    The XML files created by GameSalad are compressed with WhiteSpace removed for optimisation. This is becoming more the 'norm' with developers choosing to compact and remove the white space - though I'm 'old-school' and prefer to see the data separated cleanly. The results are the same, as the standard XML Parsers handle the white space and line returns accordingly.

    Yeah, I figured it was a space saving issue... but a simple line break is a nice compromise. I'm figuring that they really don't want people messing with the XML, so it's not meant to be read.

    It's nice to see discussion on the matter, as I think there is room for developers that like to edit the code. You've done some amazing work, with basically no special access from GameSalad.
    wayneh001 said:
    GameSalad uses a 6 Digit Identifier.

    Yeah, I saw that and wondered what would happen if I had a million attributes. HA HA. Unlikely, but that's what I thought. Hey, if Tshirtbooth can have 200 saved attributes, maybe someone will get close :)
    wayneh001 said:
    The quickest thing to do is to create your own ID's using 7 digits or even prefic the ID's with a letter - in all our tests this worked - but to ensure we had 100% compatibility we went down the GS route.
    So long as your numbers DO NOT clash with other ID's you should be ok.

    Yeah, I figured it could be done, but I just couldn't bring myself to do it. It feels like it's forbidden. HA HA.

    <real name="New Attribute" id="id123456">0</real>

    I think it's basically Lua naming. One of the first things I noticed when messing with Corona, it doesn't like hyphens for names. I think the GameSalad team put this extra step in place to make it easier for GameSalad developers to name their attributes.
    m456arcus said:
    OMG I love the art on that game! But who doesn't? And the videos look cool too! The only thing is that BOT and the Nazi Robot Penguins game are both making me feel like the game I'm working on is a piece of junk, lol.

    I looked at the penguin game and thought... wow... great artwork. Is mine good enough? So, that's a natural reaction. Heh, I went back to my game and smiled. Yeah, my game still looks good. It's just different.

    Cartoon graphics really stand out. The color scheme is solid on the penguin game too. It makes you think. It makes you test your design. It lets you know if you're heading in the right direction.

    So, by seeing what's out there, you might find ways to improve.
  • calvin9403calvin9403 Member Posts: 3,186
    ya there is a lot of threads that needs to be moved

    Calvin
Sign In or Register to comment.