Rami-Sabbagh / Love2D-PhysicsEditor-Library

PhysicsEditor loading & exporting library.
MIT License
8 stars 2 forks source link

Improved loader #1

Open CodeAndWeb opened 9 years ago

CodeAndWeb commented 9 years ago

I've forked the loader - and added some more stuff:

1) isSensor - to create sensor fixtures 2) userdata - to set an "id" value which can be used to identify fixtures or bodies 3) group index (which does not seem to work with love2d)

Feel free to pull the changes back in.

One question: Why do you create a .json file? This requires an additional loader for the JSON data. What about simply creating a .lua file as shapes. It would even be possible to remove the loader code completely. Or is there some advantage I don't see?

Rami-Sabbagh commented 9 years ago

Using Lua will break the compatiblety if some changes happened to the syntax, While JSON library can be replaced with an updated one, Also if using Lua, I'll have to re-export all the objects

Rami-Sabbagh commented 9 years ago

all the objects to use in another language

Rami-Sabbagh commented 9 years ago

Also if the lua code creates the objects, That will prevent me for looking in the object parts and modify them.

Rami-Sabbagh commented 9 years ago

Think of the game exporting a modified version of the models

Rami-Sabbagh commented 9 years ago

JSON also allows viewing the object model in the browser

Rami-Sabbagh commented 9 years ago

Do you know that it's based on lime exporter ?

Rami-Sabbagh commented 9 years ago

The userdata will be hard to use, But I'll add it anyway

Rami-Sabbagh commented 9 years ago

I didn't use isSensor at all in love, But should be useful

Rami-Sabbagh commented 9 years ago

What is the group index ?

Rami-Sabbagh commented 9 years ago

Can we debug view the object in phyicseditor ?

Rami-Sabbagh commented 9 years ago

And also something like generated ids for every object

Rami-Sabbagh commented 9 years ago

I can do anything today, I have school, Maybe at the week end :P