Re: [pygame] Nutshell Simple Game Framework

2007-04-09 Thread Greg Ewing

Charles Joseph Christie II wrote:

Where can I find these PEP 8 guidelines?


Sorry, I meant to include a URL:

  http://www.python.org/dev/peps/pep-0008/

The relevant section is about half way down
under Naming Conventions.

--
Greg


Re: [pygame] Nutshell Simple Game Framework

2007-04-09 Thread Greg Ewing

Kris Schnee wrote:

I plan to rebel against one rule, because:
chainsaw.PullCord(AR!)
looks much nicer to me than:
chainsaw.pull_cord(AR!)


Well, that's up to you, as long as you're aware
that it will be regarded as unusual and jarring
by experienced Python users. The guidelines are
there because it's a lot easier to write and
read code if different libraries use a consistent
naming style.

--
Greg


[pygame] Nutshell Simple Game Framework

2007-04-08 Thread Kris Schnee
I'm trying to build a game framework that's simple and easy to use, and 
that incorporates the ideas of a huge game space and basic physics that 
I've been working on. I don't care about complex physics simulations 
like hinges, and am willing to callously treat objects as hard boxes 
standing upright, on or above a plane. I just want characters that can 
run and jump around in a game world and interact with stuff.


As a result you can so far make a game world with an object in it that 
can move around, with the following code:


import Nutshell
w = Nutshell.BasicWorldsim()
w.MakeEntity(nature=Object,name=Pretzel,velocity=[1.0,0.0,0.0])
w.SimulationStep()

The collision detection isn't quite done yet, but motion is, it's 
optimized for efficiency, and I'm going to build on the basic worldsim 
class to get zones that can be loaded/saved.


I'm willing to open-source this if anyone's interested, especially if 
people are willing to help with graphics/graphics code. My question is, 
does it seem reasonable to build a goodly chunk of the game character 
code into the simulation, ie. having RPG stats mixed in with the class 
that handles the physics of living creatures? Considering the module as 
a pure physics simulation, that seems odd, but since a physics 
simulation doesn't really need a Creature class at all, maybe it's 
justified.


Kris


Re: [pygame] Nutshell Simple Game Framework

2007-04-08 Thread Lamonte(Scheols/Demonic)

Ill be willing to try it once your done and tell me how it works.  Will this
be able to work with other library frame works? :D(me be the noob but o
well).

On 4/8/07, Kris Schnee [EMAIL PROTECTED] wrote:


I'm trying to build a game framework that's simple and easy to use, and
that incorporates the ideas of a huge game space and basic physics that
I've been working on. I don't care about complex physics simulations
like hinges, and am willing to callously treat objects as hard boxes
standing upright, on or above a plane. I just want characters that can
run and jump around in a game world and interact with stuff.

As a result you can so far make a game world with an object in it that
can move around, with the following code:

import Nutshell
w = Nutshell.BasicWorldsim()
w.MakeEntity(nature=Object,name=Pretzel,velocity=[1.0,0.0,0.0])
w.SimulationStep()

The collision detection isn't quite done yet, but motion is, it's
optimized for efficiency, and I'm going to build on the basic worldsim
class to get zones that can be loaded/saved.

I'm willing to open-source this if anyone's interested, especially if
people are willing to help with graphics/graphics code. My question is,
does it seem reasonable to build a goodly chunk of the game character
code into the simulation, ie. having RPG stats mixed in with the class
that handles the physics of living creatures? Considering the module as
a pure physics simulation, that seems odd, but since a physics
simulation doesn't really need a Creature class at all, maybe it's
justified.

Kris





--
Join phpdiscovery.com Now!


Re: [pygame] Nutshell Simple Game Framework

2007-04-08 Thread Charles Joseph Christie II
Open it up and I'll be glad to do everything I can to help. Most likely
music, not art though.

I'll try my hand at graphics code although I'm still learning... and I
am a Math expert so I can help with RPG-ish stuff.

On Sun, 08 Apr 2007 08:29:35 -0400
Kris Schnee [EMAIL PROTECTED] wrote:

 I'm trying to build a game framework that's simple and easy to use,
 and that incorporates the ideas of a huge game space and basic
 physics that I've been working on. I don't care about complex physics
 simulations like hinges, and am willing to callously treat objects as
 hard boxes standing upright, on or above a plane. I just want
 characters that can run and jump around in a game world and interact
 with stuff.
 
 As a result you can so far make a game world with an object in it
 that can move around, with the following code:
 
 import Nutshell
 w = Nutshell.BasicWorldsim()
 w.MakeEntity(nature=Object,name=Pretzel,velocity=[1.0,0.0,0.0])
 w.SimulationStep()
 
 The collision detection isn't quite done yet, but motion is, it's 
 optimized for efficiency, and I'm going to build on the basic
 worldsim class to get zones that can be loaded/saved.
 
 I'm willing to open-source this if anyone's interested, especially if 
 people are willing to help with graphics/graphics code. My question
 is, does it seem reasonable to build a goodly chunk of the game
 character code into the simulation, ie. having RPG stats mixed in
 with the class that handles the physics of living creatures?
 Considering the module as a pure physics simulation, that seems odd,
 but since a physics simulation doesn't really need a Creature class
 at all, maybe it's justified.
 
 Kris


Re: [pygame] Nutshell Simple Game Framework

2007-04-08 Thread Lamonte(Scheols/Demonic)

You can find them here: http://www.python.org/dev/peps/pep-0008/

Little google search helps ;)

On 4/8/07, Charles Joseph Christie II [EMAIL PROTECTED] wrote:


Where can I find these PEP 8 guidelines? and I am very interested in
this... I hope it gets big and gains popularity sounds great!

And if it can do platforming and RPG at the same time, I already have
an awesomely weird idea... no, not a Super Paper Mario clone. the
flip-3D thing is outta my league. ;)

On Mon, 09 Apr 2007 12:38:18 +1200
Greg Ewing [EMAIL PROTECTED] wrote:

 Kris Schnee wrote:
  I'm trying to build a game framework that's simple and easy to use,
  and that incorporates the ideas of a huge game space and basic
  physics that I've been working on.

   I'm willing to open-source this if anyone's interested

 I'm certain there will be interest -- you can't have too
 many open-source easy-to-use game libraries!-)

  does it seem reasonable to build a goodly chunk of the game
  character code into the simulation, ie. having RPG stats mixed in
  with the class that handles the physics of living creatures?

 It would be better to separate the RPG stuff into a
 separate class or classes that can be used as mixins
 or by aggregation (has-a rather than is-a) by
 the game author. Also put those classes in a separate
 module, so if the RPG stats aren't being used, that
 whole module can be left out of the game distribution.

   import Nutshell
   w = Nutshell.BasicWorldsim()
   w.MakeEntity(nature=Object,name=Pretzel,velocity=[1.0,0.0,0.0])
   w.SimulationStep()

 A minor point -- if you're intending to release this,
 you ought to consider following the PEP 8 guidelines
 for naming.

 --
 Greg





--
Join phpdiscovery.com Now!