Terry Hancock | 1 Oct 2007 05:37

Re: You think tic tac toe is a good starter game?

Lamonte Harris wrote:
> Thats a big advanced for me imho, plus I don't like chest nor know how to
> play it well :S.  Breakout is my next game though ;).

Oh come on, people who haven't seen this movie shouldn't be allowed to
program:

http://www.imdb.com/title/tt0086567/

:-)

--

-- 
Terry Hancock (hancock@...)
Anansi Spaceworks http://www.AnansiSpaceworks.com

David | 1 Oct 2007 18:56
Picon

Pitcher's Duel Pitcher Demo playtesters needed.

 
I need play testers for an OpenGL baseball themed game.

Pitcher's Duel will be a networked baseball simulation game, featuring
three-dimensional graphics, and minimal dependence on chance (luck).  
The pitcher demo is just the pitcher interface, allowing the user to select
a pitch style and location, then watch the pitch in flight.  It has post-pitch
inspection options also, slow motion replay and a tracing display.
 
The interface uses Ocemp for the GUI, and supports mouse and joystick.
If you are a gamer, or a baseball fan, please give it a try and let me know
how it goes.


The demo is available in a windows self-installable, or in a source zip. 
The source zip needs pygame, pyopengl, and ocemp gui 0.1x  preinstalled.
 
 Some description and background is at http://pitchersduel.python-hosting.com .
 
 
Thank you.

David Keeney
 
 
 
The project needs artists, both 3D and 2D, as you will see from the game. 


--
dkeeney-P535SsTe1EyzqXzpeo/TLA@public.gmane.org
Pitcher's Duel -> pitchersduel.python-hosting.com
Lamonte Harris | 1 Oct 2007 19:10
Picon

Re: Pitcher's Duel Pitcher Demo playtesters needed.

I'll do it after school.

On 10/1/07, David <dvkeeney-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
 
I need play testers for an OpenGL baseball themed game.

Pitcher's Duel will be a networked baseball simulation game, featuring
three-dimensional graphics, and minimal dependence on chance (luck).  
The pitcher demo is just the pitcher interface, allowing the user to select
a pitch style and location, then watch the pitch in flight.  It has post-pitch
inspection options also, slow motion replay and a tracing display.
 
The interface uses Ocemp for the GUI, and supports mouse and joystick.
If you are a gamer, or a baseball fan, please give it a try and let me know
how it goes.


The demo is available in a windows self-installable, or in a source zip. 
The source zip needs pygame, pyopengl, and ocemp gui 0.1x  preinstalled.
 
 Some description and background is at http://pitchersduel.python-hosting.com  .
 
 
Thank you.

David Keeney
 
 
 
The project needs artists, both 3D and 2D, as you will see from the game. 


--
dkeeney-P535SsTe1EyzqXzpeo/TLA@public.gmane.org
Pitcher's Duel -> pitchersduel.python-hosting.com

RR4CLB | 2 Oct 2007 05:03
Picon

Symple Key Input and Sounds


Hi!

    For blind users and others, I am giving you a basic program to play sounds, including infinite background
for games if your interested. I changed some names so they do not get confused as built in functions,
variables, or constants. 

    I even have an exit sound to play, and of course you must delay the exit so it plays.

    I wish to thank Marcus for helping me and I am sure there are many questions to ask. For the next thing is to get
arrays setup, tables, and see where it goes from here for us sightless programmer/gamers. 

        Bruce

# Import the necessary ocempgui parts.
from ocempgui.object import ActionListener
from ocempgui.widgets import *
from ocempgui.widgets.Constants import *
from pygame.locals import *
import os.path
import sys
import pygame.mixer, pygame.time
q_mixer = pygame.mixer
q_time = pygame.time

# choose a desired audio format
# (freq, size, stereo, buffersize)
# 1=mono, 2=stereo and 1024 buf size, 2050 for 16 bit
q_mixer.init(21024) #raises exception on fail

# playsound function
def play_sound (File4Sound, Repeats, Max4Time):
# Function play sound on one channel at present path!
    File4Sound = os.path.join('', File4Sound)
    sound = q_mixer.Sound(File4Sound)
    channel = sound.play(Repeats, Max4Time) #(loops+1, max ms-time)

# Pressing a key will print the key its unicode representation to 
#the Pygame screen title bar.
def keydown_handler (keyevent):
# Say voice of key pressed!
#    if keyevent.unicode == K_ESCAPE:
    if keyevent.unicode == chr(K_q):
        re.title = "Pressing Escape Key!"
    else:
        re.title = "Key %s pressed" % keyevent.unicode
#    print "Key %s pressed" % chr(K_q) 

# Exit game command!
    if keyevent.unicode == chr(K_ESCAPE):
        play_sound ("0Fail.Wav", 0, -1)
        q_time.wait(2000)
#        pygame.quit() #Must be global defined.
        sys.exit()
    if keyevent.unicode == chr(K_q):
#        pygame.quit() #Must be global defined.
        sys.exit()

# Say voice of key pressed!
# LRS Sensors!
    if keyevent.unicode == chr(K_l):
        play_sound ("0LRS.wav", 0, -1)

# SRS Sensors!
    if keyevent.unicode == chr(K_s):
        play_sound ("0SRS.wav", 0, -1)

# Location Of Enterprise!
    if keyevent.unicode == chr(K_a):
        play_sound ("0LOC.wav", 0, -1)

# Star Base Control!
    if keyevent.unicode == chr(K_b):
        play_sound ("0BAS.wav", 0, -1)

# Computer Com!
    if keyevent.unicode == chr(K_c):
        play_sound ("0Com.wav", 0, -1)

# Enemy Location!
    if keyevent.unicode == chr(K_e):
        play_sound ("0ENM.wav", 0, -1)

# Probe Control!
    if keyevent.unicode == chr(K_f):
        play_sound ("0PRB.wav", 0, -1)

# Galaxy Map!
    if keyevent.unicode == chr(K_g):
        play_sound ("0GAL.wav", 0, -1)

# Klingon Status!
    if keyevent.unicode == chr(K_k):
        play_sound ("0KLI.wav", 0, -1)

# Navigation Control!
    if keyevent.unicode == chr(K_n):
        play_sound ("0NAV.wav", 0, -1)

# Direction Control!
    if keyevent.unicode == chr(K_d):
        play_sound ("0DIR.wav", 0, -1)

# Warp Control!
    if keyevent.unicode == chr(K_w):
        play_sound ("0Warp.wav", 0, -1)

# Calculate Range Control!
    if keyevent.unicode == chr(K_r):
        play_sound ("0CAL.wav", 0, -1)

# Phaser Control!
    if keyevent.unicode == chr(K_p):
        play_sound ("0PHA.wav", 0, -1)

# Torpedo Control!
    if keyevent.unicode == chr(K_t):
        play_sound ("0TOR.wav", 0, -1)

# object_focused will print a widget's text to the Pygame screen.
def object_focused (gui_widget, SoundFile):
# Function Print object name to title bar and play description!
    re.title = " %s focused" % gui_widget.text
    play_sound (SoundFile, 0, -1)
# Message to console commented out!
#    print "Element %s is focused" % gui_widget.text

# Create the first button with no text and place it at screen offset 3,3
button_one = Button ()
button_one.topleft = 3, 3

# Create a red background color for the first button and assign it a red
# label with the text "Button number one".
label_one = Label ("Button one")
label_one.create_style()
label_one.style["bgcolor"][STATE_NORMAL] = (255, 0, 0)
button_one.create_style()
button_one.style["bgcolor"][STATE_NORMAL] = (255, 0, 0)
button_one.child = label_one

# Connect the focus event (for tab).
# Play name of object focused!
button_one.connect_signal (SIG_FOCUSED, object_focused, button_one, 

"0Command-P.wav")

# Connect the mouse enter event to the button to have some "hover" effect.
# Play name of button hovered!
button_one.connect_signal (SIG_ENTER, object_focused, button_one, 

"0Command-P.wav")

#  Now when clicked play name of action of button.
button_one.connect_signal (SIG_CLICKED, object_focused, button_one, 

"0Command.wav")

# Create the second button with no text and place it 14 pixels to the right
# of the first one.
button_two = Button ()
button_two.topleft = button_one.left + 14, button_one.bottom

# Create a green background color for the second button and assign it a
# green label with the text "Button number two".
label_two = Label ("Button two")
label_two.create_style()
label_two.style["bgcolor"][STATE_NORMAL] = (0, 255, 0)
button_two.create_style()
button_two.style["bgcolor"][STATE_NORMAL] = (0, 255, 0)
button_two.child = label_two

# Connect the focus event (for tab or mouse "hover") of the second button.
# Play name of button focused!
button_two.connect_signal (SIG_FOCUSED, object_focused, button_two, 

"0LRS.wav")

# Connect the mouse movement event to the button to have some "hover" effect.
# Play name of button hovered!
button_two.connect_signal (SIG_ENTER, object_focused, button_two, "0LRS.wav")

#  Now when clicked play name of action of button.
button_two.connect_signal (SIG_CLICKED, object_focused, button_two, 

"0SRS.wav")

# Create the renderer object.
re = Renderer ()

# Create the action listener and register key presses.
listener = ActionListener ()
listener.connect_signal (SIG_KEYDOWN, keydown_handler)

# Assign the listener to the first event manager of the Renderer, so it
# recognizes key presses.
listener.manager = re.managers[0]

# Let the renderer create a pygame screen with 200 pixels width and 200
# pixels height.
re.create_screen (200, 200)

# Set the window title to "Two button demo".
re.title = "Two button demo"

# Set the screen background color to a grey RGB value.
re.color = (200, 200, 200)

# Add the buttons to the screen.
re.add_widget (button_one, button_two)

play_sound ("0Bridge.Wav", -1, -1)
# Start the main loop for drawing and event processing.
re.start ()

Clare Richardson | 2 Oct 2007 23:20
Favicon

Introduction + call to join project for creating game frameworks

Hello all,
I'm new to this list, so I'll introduce myself. I'm currently working on
Project IT Girl, a program that teaches 60 high school girls in Austin,
Texas, about how they can change the world through the use of
technology. This year, Project IT Girls learn basic programming through
designing and developing their own unique educational games written with
Python and **Pygame**!

For the next 2 - 3 months, the girls will be fleshing out their game
idea. Some girls are designing games directly related to school
subjects: astronomy, chemistry, multiplication, algebra, etc. But MOST
of the girls are interested in educating children about more social
issues: fuel conservation, recycling, AIDS testing, hygiene, nutrition,
etc.

We have an IMMEDIATE need to create game frameworks on top of Pygame for
several game genres (maze game, adventure game, arcade game, etc) that
can be easily used by budding programmers creating their first Pygame
project. Over 90% of our girls have zero programming experience and, to
be honest, not much interest in programming. Their main interest is in
creating a product that makes a difference. So, we want to make it as
easy as possible for them to succeed in making their games. I've taken a
look at the libraries on the Pygame website and I can't find anything
that fits our needs, so we need you to...

JOIN OUR PROJECT!!!

We need YOUR Pygame expertise and time to make this happen!! If you're
interested in working on this in the next 3 months, PLEASE let me know!
We have FUNDING we can put towards it, it's for a great cause, and it
will help to broaden the Pygame community. What's stopping you from
helping??

Thanks,
Clare Richardson
Technology and Program Coordinator
Girlstart
clare@...

Ian Mallett | 2 Oct 2007 23:51
Picon

Re: Introduction + call to join project for creating game frameworks

Hi Clare,
    I applaud your effort to create pygame games.

    Python is designed to be the easiest language possible to learn
and use.  It is simple, intutitive and powerful.  If you know how to
program python, teaching anyone is easy.  Take me, for instance.  I
learned almost all I know by myself in the space of less than a year
of not-straight through work.

    Pygame is a wrapper for it that grants easy access to graphics,
and thus enables fast development of games.  In short, it is the
"library" you're looking for.  There are sample games on pygame.org
that teach basic concepts of pygame, and of course, there is this
list.  Can you tell us more about exactly what sort of projects you
want to be working on?  For example, a blank window:

import pygame #load pygame
pygame.init() #initialize pygame
surface = pygame.display.set_mode((800, 640)) #800 pixels by 640 pixels

add a line to color it:

surface.fill((255,255,255)) #white

and one to draw to the screen:

pygame.display.flip()

    This is a basic program.  If you want to make an image viewer,
like a powerpoint presentation, the code is of similar complexity.
Thanks to Python and pygame, games like "pong" can be written with a
few lines of code, instead of thousands.

    In short, I strongly recommend looking at the code of some of the
games as well as the readily available tutorials on pygame.org:
http://www.pygame.org/wiki/tutorials
and there is this list if you get completely stuck.

Ian

Ethan Glasser-Camp | 3 Oct 2007 00:06
Picon
Favicon

Re: Introduction + call to join project for creating game frameworks


Ian Mallett wrote:
>     Pygame is a wrapper for it that grants easy access to graphics,
> and thus enables fast development of games.  In short, it is the
> "library" you're looking for.  There are sample games on pygame.org
> that teach basic concepts of pygame, and of course, there is this
> list.  Can you tell us more about exactly what sort of projects you
> want to be working on?  For example, a blank window:

I think the original poster is looking for something more like
pygsear: http://www.nongnu.org/pygsear/

In other words, the idea is to get the highest-level tools for game
design that can be used with the least pygame- or Python-specific
knowledge possible.

Besides pygsear, which I personally haven't used, I'm not sure what
else there is. There's the LiveWires stuff, but it's aimed at teaching
Python rather than any particular project. That's at
http://www.livewires.org.uk/python/

Hope this helps!

Ethan
Juan José Alonso. | 3 Oct 2007 04:36
Picon
Gravatar

Example: Simple client and server

----- server.py ------

from SimpleXMLRPCServer import SimpleXMLRPCServer

class TinyServer:
    def __init__(self):
       self._interface = None
       self._xmlrpc_server = SimpleXMLRPCServer(("localhost", 8000))
       self._xmlrpc_server.register_introspection_functions()

    def set_interface(self, interface):
        self._interface = interface
        self._xmlrpc_server.register_instance(interface)

    def get_interface(self):
        return self._interface

    def start(self):
        self._xmlrpc_server.serve_forever()


if __name__ == "__main__":
    import random
    random.seed()
   
    class MyLogic:
        def attack(self, dmg):
            return "Attacking: %s damage (%s)" % (str(random.randrange(dmg[0], dmg[1]+1)), str(dmg[0])+"d"+str(dmg[1]))

    server = TinyServer()
    server.set_interface (MyLogic())
    server.start()

   




----- client.py ------

from xmlrpclib import ServerProxy
import time

s = ServerProxy("http://localhost:8000 ")

# Print list of available methods
while 1:
    print s.attack((1,5))
    time.sleep(3)




---- usage ----
C:\Documents and Settings\Administrador\Escritorio>server.py



(Open other shell and launch client....)

C:\Documents and Settings\Administrador\Escritorio>client.py
Attacking: 2 damage (1d5)
Attacking: 3 damage (1d5)
Attacking: 3 damage (1d5)
....
....
(loop)



Thanks all.
--
Juan José Alonso. KarlsBerg.
eMail: kernel.no.found-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
MSN: kernel.no.found-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Horst JENS | 3 Oct 2007 12:39
Picon
Gravatar

Re: Example: Simple client and server

That's very cool, it works even with 2 clients !

Thanks a lot !

-Horst

Marcus von Appen | 3 Oct 2007 14:21

Re: Introduction + call to join project for creating game frameworks

On, Tue Oct 02, 2007, Clare Richardson wrote:

[...]

> We have an IMMEDIATE need to create game frameworks on top of Pygame for
> several game genres (maze game, adventure game, arcade game, etc) that
> can be easily used by budding programmers creating their first Pygame
> project. Over 90% of our girls have zero programming experience and, to
> be honest, not much interest in programming. Their main interest is in
> creating a product that makes a difference. So, we want to make it as
> easy as possible for them to succeed in making their games. I've taken a
> look at the libraries on the Pygame website and I can't find anything
> that fits our needs, so we need you to...

Just to get it right: you want the girls to create games by not
programming them, because they do not have any interest in programming.
Wouldn't it be better to change the orientation of the project then?

Encouraging people for something by avoiding stuff they apparently never
have done before (such as programming) - that just sounds silly to me
and will mostly cause a negative result in the end, like "you never told
us that in reality it has to be done _that_ way".

If you want a framework, where people just have to do some clicks to
create a working game, you might be better of with a game maker instead
of pygame and co.

Regards
Marcus

Gmane