SVG Loader Extension

  ... the SVG Extension for AndEngine.

Re: SVG Loader Extension

Postby dironto » Wed Jun 15, 2011 12:56 am

Hi everyone,

Just to show you the potential of this great extension by eric. Here are 2 screenshots, one of the inkscape screen where I can save the level as svg vector drawing. (=my level editor) and the other one is the actual game/tech-demo on my phone.

Hope this helps someone (for me it is much more useful than using tmx tiles for example to draw my world) and you can also draw elipses and circle like shapes!

and thanks to eric for this extension!

inkscapeLevelEditor.png
inkscape
inkscapeLevelEditor.png (329.03 KiB) Viewed 1062 times

screenshotSGS.png
screenshot phone
screenshotSGS.png (58.16 KiB) Viewed 1062 times

Ronald
Regards,
Ronald
dironto
 
Posts: 65
Joined: Mon May 23, 2011 12:24 am
Location: Amsterdam, The Netherlands

Re: SVG Loader Extension

Postby cat555 » Mon Jul 04, 2011 4:46 pm

Hi, i've installed extension on inkscape, but for some reason, i can't get it to work... i see the options of andengine extension on extensions menu (so i presume that extension is correctly installed), but i does not seem to work... i pick one of the .svg files in svgextensionexamples project, and i open them in inkscape... i select one object (for example, the ball), but when clicking on extensions options, the properties are all set todefault, and not the actual andengine properties defined on .svg file. Also, the .png textures are not applied... can someone help?

Thanks + Regards,
Regards,
Carlos V.
--
Check My Apps done with AndEngine:
cat555
 
Posts: 35
Joined: Fri Oct 22, 2010 4:28 pm
Location: Portugal

Re: SVG Loader Extension

Postby dironto » Mon Jul 04, 2011 5:07 pm

Hi cat555,

Use ctrl-shift-x in inkscape to see the actual values in the xml-editor within inkscape. The plugin will not show you the current values of a selected object, you can primarly use it to define them (once). This is a limitation of the plugin.
What do you mena with the .png textures not being applied? Try to play with the exisitng examples..
Regards,
Ronald
dironto
 
Posts: 65
Joined: Mon May 23, 2011 12:24 am
Location: Amsterdam, The Netherlands

Re: SVG Loader Extension

Postby cat555 » Mon Jul 04, 2011 11:31 pm

Hi Ronald,

Thanks for the help :)

Well, i run the examples on the phone without any problems. What i mean is that i cannot see the .png applied to object when viewing .svg files in inkscape. For example, when i open the .svg file, the ball has no .png texture applied... it does not make that big difference, but it's useful for preview purposes.

Regards,
Carlos V.
Regards,
Carlos V.
--
Check My Apps done with AndEngine:
cat555
 
Posts: 35
Joined: Fri Oct 22, 2010 4:28 pm
Location: Portugal

Re: SVG Loader Extension

Postby cat555 » Thu Jul 07, 2011 10:54 am

Hi Dironto, i see that in your example of game level you use several shapes... i was trying to do my own example level in inkscape using andengine plugin, but for some reason shapes do not appear on the running app on the phone... for example, i draw a simple star shape with some flat color... the body is correctly imported to the scene (and physics are correct), but it's invisible... i can see it only if i use a texture... what i am missing here? Can you help?
Regards,
Carlos Vieira
Regards,
Carlos V.
--
Check My Apps done with AndEngine:
cat555
 
Posts: 35
Joined: Fri Oct 22, 2010 4:28 pm
Location: Portugal

Re: SVG Loader Extension

Postby dironto » Thu Jul 07, 2011 12:06 pm

Hi cat555,

You could miss one of the needed attributes in the .svg xml of your shape, like: drawable or segments (I cannot lookup the exact xml attributes right now). What I did to ' learn' : copy as much as possible from the svg loader example where you can (hopefully) see the moving cross.
If you post your .svg I might have a look.
Regards,
Ronald
dironto
 
Posts: 65
Joined: Mon May 23, 2011 12:24 am
Location: Amsterdam, The Netherlands

Re: SVG Loader Extension

Postby cat555 » Thu Jul 07, 2011 1:29 pm

Hi Ronald, thanks!

Well, i do not have any concrete .svg file of my own... i was just picking existing examples and making some changes and adding some other objects... but i see what your point... i will try your approach :)

Best Regards,
Carlos Vieira
Regards,
Carlos V.
--
Check My Apps done with AndEngine:
cat555
 
Posts: 35
Joined: Fri Oct 22, 2010 4:28 pm
Location: Portugal

Re: SVG Loader Extension

Postby jaym » Sun Jul 10, 2011 7:58 pm

andengine-drawprimitives with a value of True

This will draw your shapes to the screen.
AndEngine for Android Game Development Cookbook - Based on AndEngine's latest, greatest, GLES2.0 AnchorCenter branch!
jaym
 
Posts: 690
Joined: Wed May 04, 2011 10:08 pm

Re: SVG Loader Extension

Postby cat555 » Sun Jul 10, 2011 9:31 pm

Thanks Jaym... i also had noticed that on my previous tests.
Regards,
Carlos Vieira
Regards,
Carlos V.
--
Check My Apps done with AndEngine:
cat555
 
Posts: 35
Joined: Fri Oct 22, 2010 4:28 pm
Location: Portugal

Re: SVG Loader Extension

Postby cat555 » Fri Jul 15, 2011 5:31 pm

HI, i've tried using svg loader extension with latest andengine.jar and physics library, but window is always closed unexpectedly... but it runs fine with libs from "andenginesvgextensionexamples" project examples... how can we be sure of what is the correct libs to use, taking into account that latest andengine should be used (new fixed, better performance, etc...)
Thanks, Carlos V.
Regards,
Carlos V.
--
Check My Apps done with AndEngine:
cat555
 
Posts: 35
Joined: Fri Oct 22, 2010 4:28 pm
Location: Portugal

PreviousNext

Return to SVG

Who is online

Users browsing this forum: No registered users and 2 guests