NicoM1 / IceEntity

A simple framework for managing entitys, components, and live-at-runtime scripts in haxeflixel
MIT License
58 stars 7 forks source link

Json entity declarations #15

Closed Ohmnivore closed 10 years ago

Ohmnivore commented 10 years ago

resolves #14

Example JSON: https://gist.github.com/Ohmnivore/997710325ea1aa3a83d9#file-entities-json

Upon second thought JSON ain't pretty for relationship-based data. Oh well. Maybe there's a better way of writing JSON.

NicoM1 commented 10 years ago

can you scrap this pull, delete your fork and add it back in, I think you're using the fork with the auto-complete stuff half finished, which will make things go weird, just work off the dev copy, and any changes when ohmniparse is merged can be fixed then

NicoM1 commented 10 years ago

oh, and to be clear, this is amazing work, and fast:D don't actually scrap it, just copy-paste to a new fork, thanks a lot:D

NicoM1 commented 10 years ago

weird how my comment from the ohmniparse stuff stays with the commit

NicoM1 commented 10 years ago

I've never actually used json before, so I'm happy you went through and just mirrored the xml code, makes it really easy for me to understand:D

NicoM1 commented 10 years ago

is there anything wrong with writing the json like this?: https://gist.github.com/NicoM1/f8f2efebb109ca3a98e5 Is it like taboo or is it fine, because its much cleaner

NicoM1 commented 10 years ago

do art or entity declarations have to be an array in json? or could they just be objects?

NicoM1 commented 10 years ago

oh wait, "entity" is the entire list of entities, maybe rename it "entities", to avoid that confusion, I assumed it was a single entity

Ohmnivore commented 10 years ago

Oh man I'm really lost with all these branches and forks. If I understand correctly I should sync my fork to your dev branch, add the JSON changes to my updated dev branch and then submist a pull request for the dev branch?

Also I'll change the singulars to plurals where appropriate. (this was done at 2 in the morning lol, my priority was just to make it work)

BTW there's no json convention that I know of, I just tend to indent a lot. It's still ugly, but oh well.

NicoM1 commented 10 years ago

what you should do (dirty but fast), is copy out the files you changed, go to the page for you're fork on github, go to settings and delete it, then fork the dev branch again, recommit your changes, and start a pull with that, but remember to put your changes somewhere safe before deleteing your fork