[Extension] XIA 1.0

Other sites and resources for Inkscape users.
pfautrero
Posts: 27
Joined: Thu Dec 18, 2014 5:37 am
Location: France

Re: [Extension] XIA 1.0

Postby pfautrero » Fri Mar 13, 2015 8:02 pm

brynn wrote:Well....I guess XIA must be looking in the XML/SVG code, and maybe it doesn't like that transform attribute (which apparently is at the root of several long-standing bugs). But if someone had rotated something, wouldn't Make a Bitmap Copy take away the XML? Doesn't that convert it to an image, where XIA would not see the code anymore?


XIA is able to handle rotations on vector shapes using this "tranform" attribute but not on images.
But if you Make a copy bitmap on something already rotated, you are right, everything is ok, XIA does not need to do more stuff.
BUT, if you rotate your new bitmap, as you said, the svg file will include a transform attribute on this image. In that case, XIA should apply the transformation on the raster. But actually, it does not. Why ? because XIA does not look for transformations applied on images at all.
Consequences : In Inkscape, we can apply translation, scale and rotation on images. For translation, it is just an offset, nothing to do on the image. For scaling, Inkscape does the job for us. For rotation, tranformation is not applied directly but stored in the svg file with the "transform" attribute (bad luck for XIA).
And ?
XIA will manage such transformations in the next version 2.0

User avatar
brynn
Posts: 9612
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: [Extension] XIA 1.0

Postby brynn » Tue Mar 17, 2015 8:57 am

Ok, I think I've finished my puzzle. I sent it to XIA 15 minutes ago, but it still seems to be "working". How long should this take? I have system:

Dell Studio 1558 (laptop)
Intel(R) Core(TM) i7 CPU Q 720 @ 1.60 GHz
4 GB RAM
Inkscape SVG file is 14.5 MB, although a lot of that can be deleted, at this point. (hidden and locked layers) Oh, if some unhidden layers are locked, could that be causing this delay? (btw, I have a pretty long list of comments, if you're interested in feedback)

20 minutes now. Should I let it keep on working? Or is something stuck? I guess I'll stop it after 30 minutes, because my machine is getting hot. Although maybe it will finish before that (cross fingers) :D

I'm actually not sure if I'm completely finished. It sounds like I might need to reorder the puzzle pieces, so that they are "shuffled" when the game opens. But I thought I'd try finishing it the way it is, because I'm not sure if understood the tutorial correctly about that.

Oh, maybe is almost finished.... Nope, still "working". I guess I'll have to stop it.....if I can figure out how, and wait to hear from you :D

Wait! Just finished -- let's see what happened....will post again shortly :D

User avatar
brynn
Posts: 9612
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: [Extension] XIA 1.0

Postby brynn » Tue Mar 17, 2015 9:13 am

Ok, it did not work on the first try (although for me, that would have been a miracle!). When I open index.html it shows the 1st puzzle piece (top, left corner piece) filling up the whole game window. The index.html background is orange. And the game's background, which doesn't show inside the game border (even behind the 1 giant puzzle piece), should be light blue. I can't move the 1 piece, although maybe that's because there's no spare space to move it to.

Hhm, if this is html, let's look at the source.... Aahhh, that was a good idea, but I have no idea what's supposed to be there, lol.

Ok then, let me know what to do next....or ask questions, or whatever :D

hulf2012
Posts: 715
Joined: Sat Nov 24, 2012 12:37 pm

Re: [Extension] XIA 1.0

Postby hulf2012 » Tue Mar 17, 2015 11:03 am

Brynn

Please, Could you share your file?
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

User avatar
brynn
Posts: 9612
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: [Extension] XIA 1.0

Postby brynn » Tue Mar 17, 2015 12:56 pm

Which one? The SVG or HTML?

Edit
hulf, if you look at the PDF tutorial, it has links to SVG files for each of the various interactive/game capabilities. So you can look and see how the SVG file should look.

Actually I didn't do that, because the video seems to cover everything I need. But maybe I should look up the right SVG file?

But, I'll still be glad to share my files. Just need to know which one you want. I could upload the html file somewhere, for you to see. But it really doesn't work AT ALL!

pfautrero
Posts: 27
Joined: Thu Dec 18, 2014 5:37 am
Location: France

Re: [Extension] XIA 1.0

Postby pfautrero » Tue Mar 17, 2015 11:22 pm

Hi,
Well, more than few seconds to generate html file is not acceptable. Has hulf2012 said, I am interested in your svg file too to analyze and benchmark. Interesting to see if there are performances issues in the XIA engine in the drag and drop game. Thanks for your test.

User avatar
brynn
Posts: 9612
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: [Extension] XIA 1.0

Postby brynn » Wed Mar 18, 2015 11:31 am

The file is attached.

Note that if I unhide the "clips" layer, Inkscape crashes. I only have 4 gb RAM. So just a warning. Although you guys probably have a lot more RAM than that. (I saved the clipped pieces in a hidden layer in case I might need them later.)

The file is 14.3 mb. As I mentioned before, a lot of that could probably be deleted now. But just so you can see what I sent to XIA, everything is still there.

OH! This might be part of the problem. I forgot to resize the page to the image. So the page border is smaller than the drawing (custom default doc, 1000 x 700 landscape orientation). Drawing is 1440 x 800 landscape. Rats, might be too large to attach here :(

Oh wow, got it :D

TweetyJigsawPuzzle.svg
(14.38 MiB) Downloaded 91 times

pfautrero
Posts: 27
Joined: Thu Dec 18, 2014 5:37 am
Location: France

Re: [Extension] XIA 1.0

Postby pfautrero » Wed Mar 18, 2015 7:48 pm

Hi,
There is a lot to say about your svg file. I just write some few thoughts here, I need more time to make a deeper analysis of your work and how to handle it.

For the gameDragAndDrop only : For this specific theme, XIA 1.0 does not accept svg groups. Layers are svg groups, therefore, they are ignored by the engine. But, in that case, XIA should analyze your file very quickly but...it does not. I confirm, even on my computer, the conversion is awfully slow. In the futur, XIA 2.0 will accept groups for this theme. (released in september). BUT, grouping details is not without consequences. Two grouped details work together. If you move the first one, the second one moves exactly in the same way. I know, layers are one of the first tool used by designers to organize there job. But, for XIA, groups are not just a convenient way to isolate paths and images. Groups are a real "production" functionnality for XIA.

Now, let's see what we can do to make your game working properly.

User avatar
brynn
Posts: 9612
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: [Extension] XIA 1.0

Postby brynn » Wed Mar 18, 2015 11:31 pm

By this
Groups are a real "production" functionnality for XIA.

do you mean that groups cause XIA a lot of extra work? Or if not, can you explain a little more about ""production" functionality"?

For the gameDragAndDrop only : For this specific theme, XIA 1.0 does not accept svg groups.

What do you mean by "theme"?

Now, let's see what we can do to make your game working properly.

If you can tell me what I did wrong, and give me the info I need to fix it, I will be able to learn better, than if you fix it for me. Although if writing SVG/XML, or a lot of work in the XML Editor is required, you might have to do it.

Oh yes, I use layers prolifically, and often groups too. So I really need to start all over. Either I need to ungroup everything, and put all in the same layer, OR, make a bitmap copy of the whole thing, before I start clipping. I almost did that (the latter), when I first started. But then I realized there would be 2 conversions, which would somewhat degrade (pixelate) the image, because it would be "rasterized" twice.

Hhmmm.....wait a second..... If the pieces have all been rasterized, there are no longer any groups. Ooohh, except for the layers. So if I put the background image, targets, and rasterized pieces all in the same layer, will that be good enough? Can I leave the other layers I have in the file, as they are? Or does absolutely everything need to be on the same layer, whether it will be used by XIA or not?

Ssoooo.... Since you're still looking for a problem, I guess that means that XIA can handle groups/layers, but just not very well. Could I go ahead and start working on that? Or should I wait until you find some other issue?

Well what about the first layer? It's in there by default. Is that a group? Or is Layer 1 unique, and not a group. Maybe XIA can have a feature that will put everything in the root layer? I don't know any way to move things to the root layer. It seems to happen with some extensions, that the result is placed in the root layer. But how to move something there from the canvas, I don't think it's possible. Maybe using XML Editor though? Although I don't know. Maybe the root layer is also a group???

You know, when I did the clipping, I clipped across groups, and often across a few different groups in 1 clipping path! Also clipped across different clips! But I still keep coming back to the fact the pieces were all rasterized by the time I sent the file to XIA.

Well, I'm rambling now. I guess I'll save a new copy, and start de-group-izing the new file. Then I can also delete the "clips" layer, and all those things I don't need. Possibly could unclip some things -- the clips that make the image border sharp, because the clipping of the pieces will take care of those areas. It sounds like the complexity of the file could be contributing factor to the problem, and making it a simpler file might help?

Anyway, thanks. I'll be interested to learn what you find in my file :D

User avatar
brynn
Posts: 9612
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: [Extension] XIA 1.0

Postby brynn » Mon Apr 27, 2015 11:19 am

Could XIA be used to make those little puzzles that some forums use to weed out spammers? I can't remember what they're called, but it's basically like a captcha. Instead of writing the string of characters, the potential new member has to drag 3 to 5 puzzle pieces into place.

It seems like it should be possible to make the puzzle part with XIA. The problem for me would be integrating it in into my website. I think it would be fun to have such a program, where the site owner could make their own little puzzles, and the rest is installed automatically, just like if you installed a captcha on your forum.

Well anyway, just a thought. I'm just curious if you were able to find out what I did wrong, with the file I sent you.

Thanks :D

pfautrero
Posts: 27
Joined: Thu Dec 18, 2014 5:37 am
Location: France

Re: [Extension] XIA 1.0

Postby pfautrero » Wed Sep 21, 2016 2:09 am

Hi,
Small update, XIA is now in 2.0-beta1 version :

http://xia.dane.ac-versailles.fr

What's new :
- New export theme available
- plugin is now reachable in ->extensions->export sub-category
- Current themes have been updated and refreshed
- Drag & Drop theme : we can move groups of elements (experimental)
- Drag & Drop theme : group of elements can now be a target (experimental)
- theme loading : A progressbar is now used
- We can use a group of elements as background image (experimental)
- firefox os export removed
- We can use connectors between elements


Regards,


Return to “Inkscape Resources”

Who is online

Users browsing this forum: No registered users and 1 guest