[Tutor] Sandbox Game
Nate Lastname
defensoft at gmail.com
Mon Feb 6 22:08:10 CET 2012
Some more info:
It's in pygame.
It's 2d.
I cannot find any python versions out there. Yes, there is a
graphical interface, and yes, it is a user-controlled game.
Thank you all for your help!
The Defenestrator
On 2/6/12, bob gailer <bgailer at gmail.com> wrote:
> On 2/6/2012 11:16 AM, Nate Lastname wrote:
>> Hey all,
>>
>> The basic idea is that there are different types of sand. They fall
>> and move (or don't, if they are solid) and interact with each other in
>> different ways. I.E.; there is a lava type; it falls, and when it
>> hits other sand types, it heats them up. If it gets cold, it becomes
>> sand.
> Thanks for a top-level overview. I have no practical experience with
> game /programming /, just some general concepts which I offer here, and
> leave it to others to assist.
>
> You might add more specifics - do you want a graphics display? User
> interaction? Anything you add to your description helps us and helps you
> move to your goal.
>
> I suggest you start simple, get something working then add another feature.
>
> Simple? Could be as simple as 1 grain falling till it hits bottom. Does
> it have an initial velocity? Does it accelerate under the pull of
> gravity? Velocity means speed and direction. What happens when it hits
> bottom?
>
> Then add a 2nd grain. What happens if the 2 collide?
>
> What is your update rate (how often do you recompute the positions of
> all the grains)? What is the smallest increment of position change?
>
> I assume you will create a class for each type of sand grain. with
> relevant properties and methods.
>
> You will need a program that runs in a loop (probably with a sleep) to
> - update positions and velocities of each grain (by invoking class
> methods)
> - detect and manage collisions
> - display each grain (by invoking class methods)
>
> If you are using a graphics package I assume you will have a "canvas" on
> which you will draw some kind of object to represent a particular class
> of grain at the current x,y(,z?) coordinates of each grain.
>
> It is possible to change the base class of an object on-the-fly, so a
> lava drop could become a sand grain.
>
> That's all for now. Good coding!
>
> I don't want to copy the game
>
> Is there a Python version out there?
>> , I want to make my own to play around with Py(thon/game).
>>
>
>
> --
> Bob Gailer
> 919-636-4239
> Chapel Hill NC
>
>
--
My Blog - Defenestration Coding
http://defenestrationcoding.wordpress.com/
More information about the Tutor
mailing list