Continuing work...

2 views
Skip to first unread message

RB[0]

unread,
Feb 12, 2009, 3:46:21 PM2/12/09
to PYGGEL-dev
Hey everybody :)
I have just recently gotten back to actively working on PYGGEL again
after a two-month break.
Several new things have been added, such as an event manager, 2d
"scaler" (basically 2d elements are always in the same position on
screen regardless of resolution), and the start of a 2d gui.
Also added is the support of "smileys" in the MEFont objects.
Basically you add different images into the MEFont object with names
(like :), :S, etc.) and then when you create a font image from that,
when it finds a smiley it puts in the image for it instead of the text
glyph.
This also scales the size of the text to accommodate the smiley, and
keep things from over-lapping. Biggest problem is that MEFont is still
as slow as ever - even with a few optimizations to get the font back
up to it's previous speed after adding the smileys - ie, about 5-10
fps slower in test.py which runs at 30 fps with the "regular" fonts,
and 22-23 for the MEFonts...

I am going to keep working on the gui and hopefully get more things
done here ASAP.

BTW, I have been wondering which widgets people think are the most
necessary for a simple gui.
I was thinking Label, Button, Radio, Checkbox, input, frame, menu and
window.

Are there any more people can think of?

RB[0]

unread,
Mar 5, 2009, 4:11:10 PM3/5/09
to PYGGEL-dev
Ok, so I have finished all of the functionality listed above - the
only widgets that I think would be good to add are scroll bars, but
they are being a bit problematic...
Also needed still is a theme system, which won't be too hard to do, I
hope.

If anyone would like to check out the svn and run test_new_gui.py -
and see if there are any bigs, and report how fast it runs, I would
really appreciate it...

Cheers,
Matt

RB[0]

unread,
Mar 19, 2009, 5:18:04 PM3/19/09
to PYGGEL-dev
Alright - all the features laid out for this next release are done -
we just need to test and document everything.
If everyone would grab the latest svn and run test.py, test_new_gui.py
and Robocalypto/run_game.py, and let me know if it fails, what the FPS
are, etc.

The only thing I am a little unhappy about is with the gui, currently
there are no scroll bars, and the windows are missing their minimize/
maximize buttons.
Does anyone think these are necessary?
The window thing would probably be a trivial 30 minute add, but the
scroll bars would probably be more like a few solid hours :S

Cheers,
Matt

pymike

unread,
Mar 19, 2009, 7:08:34 PM3/19/09
to pygge...@googlegroups.com
Test.py, 150fps
 test_new_gui.py,

Traceback (most recent call last):
  File "test_new_gui.py", line 88, in <module>
    main()
  File "test_new_gui.py", line 69, in main
    callback=test_menu)
  File "/home/michael/pyggel/pyggel/Newgui.py", line 1499, in __init__
    self.add_frame("", options, images, font_colors, font, font_states, subimages, sub_font_colors, sub_font_states)
  File "/home/michael/pyggel/pyggel/Newgui.py", line 1567, in add_frame
    x = Icon(frame, image=ic)
  File "/home/michael/pyggel/pyggel/Newgui.py", line 755, in __init__
    self.image = _image.Image(image)
  File "/home/michael/pyggel/pyggel/image.py", line 32, in __init__
    self._load_file()
  File "/home/michael/pyggel/pyggel/image.py", line 74, in _load_file
    self._pimage = pygame.image.load(self.filename)
pygame.error: Couldn't open data/gui/menu_icon.png

robocalypto:
120 fps
--
- pymike
"Python eggs me on."

RB[0]

unread,
Mar 19, 2009, 10:33:09 PM3/19/09
to pygge...@googlegroups.com
Ahh, dang it.
Fixed now though, thanks :)

Markus Martin

unread,
Mar 20, 2009, 1:04:43 AM3/20/09
to pygge...@googlegroups.com
2009/3/19 RB[0] <Roe...@gmail.com>:

>
> Alright - all the features laid out for this next release are done -
> we just need to test and document everything.
> If everyone would grab the latest svn and run test.py, test_new_gui.py
> and Robocalypto/run_game.py, and let me know if it fails, what the FPS
> are, etc.

After installing PIL, everything works for me.
test.py: ~70 fps
test_new_gui.py: ~60 fps
Robocalypto: ~60 fps

This is on my old P4 2.4 GHz, w/GeForce 6800.

> The only thing I am a little unhappy about is with the gui, currently
> there are no scroll bars, and the windows are missing their minimize/
> maximize buttons.
> Does anyone think these are necessary?
> The window thing would probably be a trivial 30 minute add, but the
> scroll bars would probably be more like a few solid hours :S

I am sure we will want scrollbars at some point, but I don't think
anyone's feelings will be hurt if you put them off for another
release.

Lastly, you will want to make sure that you aren't redistributing
copyrighted material. The hulk is rather suspicious..

Cheers,
-Markus

RB[0]

unread,
Mar 20, 2009, 1:07:29 AM3/20/09
to pygge...@googlegroups.com
Haha, yeah.
Grabbed that from a python dev blog where someone else was trying to load GIF's - but the copyright is, well, non-existant, at best on it ;)

So for now we just need the docs, move Newgui to gui, removed old, update tests, removed nasty gifs and replace with our own...
:)
Reply all
Reply to author
Forward
0 new messages