How many People still use Pyggel?

108 views
Skip to first unread message

Pazaz

unread,
May 31, 2011, 12:11:53 AM5/31/11
to PYGGEL-dev
I personally Do, And Love it. I don't care that it hasn't been updated
in a while *I can just update it for myself, anyways...*
There is Almost Endless possibilities in Pyggel. :D
It's helped me understand Python a bit more, And Pyggel is just so
simple to use.

RB[0]

unread,
May 31, 2011, 2:47:00 AM5/31/11
to PYGGEL-dev
Someday, I plan to revisit PYGGEL an rewrite it up, keeping it nice
and simple as before, but really beefing it up to be more powerful,
and seeing what it can do,
Unfortunately, between school and work I've not even done any game/
Python programming in more than 6 months :(

Glad you are still using it mate - people like you make it worth it to
me to write libraries :D
Message has been deleted
Message has been deleted

Pazaz

unread,
Jun 3, 2011, 12:22:40 AM6/3/11
to PYGGEL-dev
You seem like a Pretty Cool guy... If you have skype, Add me..
ps3playerr
There is so much you didn't add in your RobotCalypto thing, Crouching,
Reloading, etc.. Here's my key code for reloading *Some values/
variables were added to make this workout*
if "r" in keys
if self.clips > 0:
if self.ammo > 100:
self.ammo = 100
if self.ammo < 100:
self.clips -= 1
self.ammo = 100
self.score -= 20
if self.clips < self.clipsminimum:
self.clips = 0
if self.clips > self.clipsmaximum:
self.clips = self.clipsmaximum
Keep in mind, There is a bug in that, But only one. Works Regardless.

RB[0]

unread,
Jun 3, 2011, 12:30:02 PM6/3/11
to pygge...@googlegroups.com
Well, I made PYGGEL originally as an extension to my
 2d/isometric/hui engine, Pyglibs.
At first, I started out just trying to port Pyglibs to 3d (called pyglibs 3d) - however I realized limitations almost immediately, unfortunately.
So Instead I ended up just wanting to make a decent GUI for OpenGL that I could plug into games (particularly for pyweek) - this meant it had to be lightweight, flexible and integrate well into a regular pygame system, instead of having it's own event loop and all that.

After a couple of months I had written out the code for handling the 2d textures, drawing, transforms, etc. and realized that a lot of it also translated to 3d quickly (go figure... LOL) so it was very simple to start extending it out. What I ended up wiht was PYGGEL. It has some (severe in some cases)  limitations because of the way I went about designing it, but it works for what it does nicely :)

There are a few things I'd like to play with someday, like skeletal animation, shaders and integrating ODE (or something) physics - but I'll need to rewrite the engine to handle that and don't really feel like it at this particular point.

I do have skype, but that's just for family/friends, and not Python/programming related, sorry.

For ammo - looks nice but has a couple limitations:

always use elif instead of just another if - if you have over 100, but under 200, it will perform both of those reloads at once it looks like.

It also looks like you have a few unnecessary checks there, personally I'd store the remaining ammo as a number, and just represent that as clips (so for every 100 ammo you have an extra clip, but in the internal representation it is only in actual shots)

When you reload then:

if ammo < 100:
    amount = min((ammoleft, 100-ammo))
    ammo += amount
    ammoleft -= amount


that will make it so that it only ever allows you to use the ammo you have - and it simplifies teh code significantly :)

Cheers


--
You received this message because you are subscribed to the Google Groups "PYGGEL-dev" group.
To post to this group, send email to pygge...@googlegroups.com.
To unsubscribe from this group, send email to pyggel-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyggel-dev?hl=en.


Pazaz

unread,
Jun 3, 2011, 12:52:04 PM6/3/11
to PYGGEL-dev
Well, With the clips feature, And without adding those extra checks,
It just goes into negatives..
Thereby meaning Unlimited ammo

Pazaz

unread,
Jun 3, 2011, 1:04:34 PM6/3/11
to PYGGEL-dev
Also, A question, When I try to put in new .obj's *They have .mtl's
also*
I get an error:
Traceback (most recent call last):
File "/home/chase/Desktop/Game in Python/run_game.py", line 10, in
<module>
main.main()
File "/home/chase/Desktop/Game in Python/gamelib/main.py", line 14,
in main
g = game.Game()
File "/home/chase/Desktop/Game in Python/gamelib/game.py", line 111,
in __init__
self.player = Player(self)
File "/home/chase/Desktop/Game in Python/gamelib/objects.py", line
78, in __init__
self.gun = Gun(self.game, self)
File "/home/chase/Desktop/Game in Python/gamelib/objects.py", line
158, in __init__
GameObject.__init__(self, game, obj=pyggel.mesh.OBJ("data/Models/
pistol_1911.obj", colorize=[0.2, 0.2, 0.2, 1]),
File "build/bdist.linux-x86_64/egg/pyggel/mesh.py", line 34, in OBJ
objs.append(ObjGroup(values[1]))
IndexError: list index out of range
Does it have a limit to the vertices, or polygons?
Just a question, Because I would love to put in new objects :(

RB[0]

unread,
Jun 3, 2011, 1:14:50 PM6/3/11
to pygge...@googlegroups.com
Interesting...
I recall there being a bug with some obj's in there, but that is odd, it means something is not existing in the list that should be :S
If you remove the mtl/references will it load? And what program are you making the model with (I generally used Wings3d and it's obj exporter)...


--

Pazaz

unread,
Jun 3, 2011, 1:16:55 PM6/3/11
to PYGGEL-dev
Oh, I use Blender then Export it to obj
I make my own textures, If that's any help..
I'll try to remove the mtl and see if it loads.

On Jun 3, 10:14 am, "RB[0]" <roeb...@gmail.com> wrote:
> Interesting...
> I recall there being a bug with some obj's in there, but that is odd, it
> means something is not existing in the list that should be :S
> If you remove the mtl/references will it load? And what program are you
> making the model with (I generally used Wings3d and it's obj exporter)...
>

RB[0]

unread,
Jun 3, 2011, 1:18:10 PM6/3/11
to pygge...@googlegroups.com
I don't think it is mtl, but not sure, I'm thinking there is just a vertex in there that is being loaded funny by pyggel :S
There should not be a limit on how many vertices you can have, but I dunno O.o

Pazaz

unread,
Jun 3, 2011, 1:18:23 PM6/3/11
to PYGGEL-dev
Darn, Now I get
File "build/bdist.linux-x86_64/egg/pyggel/mesh.py", line 46, in OBJ
for line in open(os.path.join(path, values[1]), "r"):
IOError: [Errno 2] No such file or directory: 'data/Models/./
pistol_1911.mtl'
Maybe I'll try Wings3d and export it through that?

On Jun 3, 10:14 am, "RB[0]" <roeb...@gmail.com> wrote:
> Interesting...
> I recall there being a bug with some obj's in there, but that is odd, it
> means something is not existing in the list that should be :S
> If you remove the mtl/references will it load? And what program are you
> making the model with (I generally used Wings3d and it's obj exporter)...
>

RB[0]

unread,
Jun 3, 2011, 1:19:37 PM6/3/11
to pygge...@googlegroups.com
Yeah, gotta remove the mtl in blender and re-export, or else it thinks it is still there

Pazaz

unread,
Jun 3, 2011, 1:22:17 PM6/3/11
to PYGGEL-dev
Try to stay on The computer, I'll re-export it and see if it worked ;P

On Jun 3, 10:19 am, "RB[0]" <roeb...@gmail.com> wrote:
> Yeah, gotta remove the mtl in blender and re-export, or else it thinks it is
> still there
>

Ian Mallett

unread,
Jun 3, 2011, 1:23:48 PM6/3/11
to pygge...@googlegroups.com
.obj files' first (or near first) line(s) are typically material library definitions.  Materials are defined in material library file(s), usually .mtl, and then referenced later to "choose" the material to use for the given faces. 

In Blender, what you should do is remove all materials from the objects and then export to .obj (without making a separate material file).

Pazaz

unread,
Jun 3, 2011, 1:24:36 PM6/3/11
to PYGGEL-dev
Lol, Wow, now I get a texture error, So it obviously loaded the
object, Just not any textures?
File "build/bdist.linux-x86_64/egg/pyggel/mesh.py", line 78, in OBJ
fin.append(i.compile(vertices, normals, texcoords))
File "build/bdist.linux-x86_64/egg/pyggel/mesh.py", line 106, in
compile
ut.append(texcoords[t[i]-1])
IndexError: list index out of range

On Jun 3, 10:19 am, "RB[0]" <roeb...@gmail.com> wrote:
> Yeah, gotta remove the mtl in blender and re-export, or else it thinks it is
> still there
>

Pazaz

unread,
Jun 3, 2011, 1:29:29 PM6/3/11
to PYGGEL-dev
Oh, Okay, I'll try that then :D
*I posted before seeing that*

On Jun 3, 10:23 am, Ian Mallett <geometr...@gmail.com> wrote:
> .obj files' first (or near first) line(s) are typically material library
> definitions.  Materials are defined in material library file(s), usually
> .mtl, and then referenced later to "choose" the material to use for the
> given faces.
>
> In Blender, what you should do is remove all materials from the objects and
> then export to .obj (without making a separate material file).
>
>
>
>
>
>
>
> On Fri, Jun 3, 2011 at 10:19 AM, RB[0] <roeb...@gmail.com> wrote:
> > Yeah, gotta remove the mtl in blender and re-export, or else it thinks it
> > is still there
>

Pazaz

unread,
Jun 3, 2011, 1:44:53 PM6/3/11
to PYGGEL-dev

Thank you, It works :D
I'm really only expanding robotcalypto to improve my knowlage in
python/pyggel/pygame
On Jun 3, 10:23 am, Ian Mallett <geometr...@gmail.com> wrote:
> .obj files' first (or near first) line(s) are typically material library
> definitions.  Materials are defined in material library file(s), usually
> .mtl, and then referenced later to "choose" the material to use for the
> given faces.
>
> In Blender, what you should do is remove all materials from the objects and
> then export to .obj (without making a separate material file).
>
>
>
>

>
>
>
> On Fri, Jun 3, 2011 at 10:19 AM, RB[0] <roeb...@gmail.com> wrote:
> > Yeah, gotta remove the mtl in blender and re-export, or else it thinks it
> > is still there
>

RB[0]

unread,
Jun 3, 2011, 2:35:34 PM6/3/11
to pygge...@googlegroups.com
If that works then for some reason the texture coords that blender is exporting aren't being loaded correctly, probably somewhere in the obj loader :S
Reply all
Reply to author
Forward
0 new messages