Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Using Inkscape as a layout editor

This thread is locked; no one can reply to it. rss feed Print
Using Inkscape as a layout editor
larienna
Member #3,185
January 2003
avatar

As some of you, I had the idea to make a framework to handle board games. One of the problem is that the player will need to place the components of the board game on the screen according to a certain layout. So in theory, I would need to make a layout editor to help the player place their components.

But I thought of an easier solution. Why not use Inkscape as a layout editor. The way it will work is that the programmer would draw rectangle in the location where he wants to place his components and then set their ID property. Then since the content of the SVG file is in XML, the program would use the parameters in the XML file to setup the position of the object. Here is an example of XML entry in a SVG file.

<rect
       style="fill:#ffffff;stroke:#000000;stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
       id="token001"
       width="90"
       height="90"
       x="270"
       y="22.5"
       transform="translate(0,62.362)"
       inkscape:label="#rect2986" />

The only thing the programmer will have to define is the "id" variable that will be used by the program to match the right object at the right position. Width/Height, X/y will be used to position the object and everything else will be ignored.

What do you think?, that could make things much more simple. Using inkscape as an editor could probably also be used for other purposes.

Enjoy! and have fun

Elias
Member #358
May 2000

Yeah, I did just that in a few of my speedhack entries - just using Inkscape as my level editor.

--
"Either help out or stop whining" - Evert

larienna
Member #3,185
January 2003
avatar

Hmm! level editing. Maybe I could forge something to make maze maps for my wizardry legacy game.

Enjoy! and have fun

Arthur Kalliokoski
Second in Command
February 2005
avatar

It could also be used as a GUI layout editor I guess.

They all watch too much MSNBC... they get ideas.

Kris Asick
Member #1,424
July 2001

The only drawback of course is that now you're limiting the customization of your game to people who know how to use Inkscape. :P

Built-in editors are definitely a lot of work to make but I find help to get players more involved with creating custom content. So the decision to make an internal editor or not should be based on how important custom content is in maintaining player interest in your game. If it's only a minor thing and your game has plenty of content already, then sure, leave the modding/editing to external programs. But, if custom content is a big draw for your game, then having an internal editor is essential.

I suppose if all you're doing is making a framework though you could build an editor on top of what you already create that works with Inkscape-loadable files.

--- Kris Asick (Gemini)
--- http://www.pixelships.com

larienna
Member #3,185
January 2003
avatar

Well first, inkscape is not that hard to learn especially if you are only using a subset of the software's tool. In my case, it's only the rectangle tool with no special effects.

I don't say that it should be the final editor, but it allow users to have a gui editor even if I did not have the time to build one. Maybe later when the project progress, I could make my own editor (or somebody else could do it). But for starting, inkscape is perfect.

It could also be used as a GUI layout editor I guess.

That was the other thing I was thinking. Doing something like visual basic with inkscape.

Enjoy! and have fun

Specter Phoenix
Member #1,425
July 2001
avatar

I don't know, I've not found very many tutorials for Inkscape or vector graphics geared toward beginners. Using a less popular graphics editor with limited tutorials will limit your projects appeal due to the learning curve for the users.

Mark Oates
Member #1,146
March 2001
avatar

I didn't know SVG was an XML document! :o Sweet!

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Specter Phoenix
Member #1,425
July 2001
avatar

I didn't know SVG was an XML document! :o Sweet!

Yeah, does open up some things to do without actually having to draw it. I suppose it doesn't require an artist at that point to draw anything, just someone that is good with numbers and use existing SVG files to look off of to make something.

Tobias Dammers
Member #2,604
August 2002
avatar

SVG is especially neat for web-based things; you can hook into the SVG's DOM using JavaScript on the browser; even jQuery will work. Here's a little 30-minute hack I made with that: http://kleurplaten.tobiasdammers.nl/

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

larienna
Member #3,185
January 2003
avatar

I don't know, I've not found very many tutorials for Inkscape or vector graphics geared toward beginners. Using a less popular graphics editor with limited tutorials will limit your projects appeal due to the learning curve for the users.

Are you kidding? There is a whole book in PDF available for free on the net that you can also buy from amazon in printed version.

http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

I am not an artist or a graphic designer and I make all my board game prototype in inkscape pretty easily. I also did a couple of full color print outs. Here are some pictures:

http://bgd.lariennalibrary.com/uploads/Mainsite/Variants/Variants200907271154AM/Picture_AOM_MeltingPot.jpg

http://bgd.lariennalibrary.com/uploads/Mainsite/Variants/Variants201003160917AM/Picture_DuneExpressAlliances.jpg

It's mostly the graphic design in the picture above that has been done by inkscape, not the artwork. Else I regularly do black and white prototypes like in this picture:

http://bgd.lariennalibrary.com/uploads/Mainsite/GameIdea/GameIdea201003240528PM/Picture_SpellcraftROTS_Smallhex.jpg

The colors have been added by hand.

Enjoy! and have fun

Specter Phoenix
Member #1,425
July 2001
avatar

larienna said:

Are you kidding? There is a whole book in PDF available for free on the net that you can also buy from amazon in printed version.

No, I'm being serious. When I did a search for inkscape tutorial it never had that link come up. Found tons of links, but most said you had to be completely comfortable with IS in order to follow the tutorials.

larienna
Member #3,185
January 2003
avatar

The main website redirect here for tutorials.

http://inkscapetutorials.wordpress.com/

I rapidly checked the list and they look nice.

Enjoy! and have fun

Specter Phoenix
Member #1,425
July 2001
avatar

Yeah, it appears they changed their format since I viewed it a few months back when I started thinking about learning vector graphics and got inkscape. That was one of the sites I was talking about, but they appear to have removed the disclaimer that said you had to have experience with inkscape to get the full benefit of the tutorials.

Go to: