[svg,python,pygame,xml] Amazing project I'm working on.

For all coding issues - MODers and programmers, HTML and more.

Moderators: Jeff250, fliptw

Post Reply
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7737
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

[svg,python,pygame,xml] Amazing project I'm working on.

Post by Isaac »

I'm making Inkscape into a level editor for pygame. In otherwords, I'm converting an svg file to pygame objects.

I start in inkscape and just drop in a bunch of images:

Image

I'll then edit line three of convert.py and add foresttest.svg.
Here's convert.py:
convert.py requires the file template.py
In the terminal i'll run

Code: Select all

$ python convert.py 
It will print:

Code: Select all

------------------------------

   COUNT OBJECTS IN FILE:38   
------------------------------
Then it will make test.py, the pygame program.

Then I'll type:

Code: Select all

$ python test.py
and this will appear:
Image

It's still very basic and I'm going to be spending every weekend working on this for the next few months, but at the moment it's ready to show off.

My goal is to be able to make large detailed game levels that are easy build a game in.

edit: none of the art is mine. I'm using it to help with the programming.

Also, any feedback is welcome.
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6459
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Re: [svg,python,pygame,xml] Amazing project I'm working on.

Post by fliptw »

your better off making your own editor, rather than trying to hamfist poor old inkscape into doing it for you.

its also the wrong work flow for game design.
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7737
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Re: [svg,python,pygame,xml] Amazing project I'm working on.

Post by Isaac »

fliptw wrote:your better off making your own editor, rather than trying to hamfist poor old inkscape into doing it for you.

its also the wrong work flow for game design.
Because... edit: **crickets**
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6459
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Re: [svg,python,pygame,xml] Amazing project I'm working on.

Post by fliptw »

graphics aren't game play.
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7737
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Re: [svg,python,pygame,xml] Amazing project I'm working on.

Post by Isaac »

fliptw wrote:graphics aren't game play.
Well thank you for your feedback. I will take that into consideration.
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
Post Reply