pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Questions on code


From: John August
Subject: Questions on code
Date: Tue, 30 Mar 2004 21:16:37 +1000
User-agent: Mutt/1.0.1i

Here's some questions on the pingus code, for the documentation I'm
writing, general answers are OK :

1. There are .xml and .plf files in the data directory. The code seems to
only use the .xml files. Do the .plf (pingus level files) need to be
there ? What's their history ?

2. What is the code which "sets" a pingu to a given type (eg. stopper,
digger etc) based on a mouse click on that pingu.

3. What is the code which updates each pingu (eg. walking an extra step,
digging an extra bit) ?

4. How does the code know a pingu has hit an obstacle, and needs to turn
around (or go splat on the way down?) ?  Is it pixel overlap, or
something more subtle ?

- I note there are "sprite" routines with sprite.update() being called as
part of Walker::Update (and similar). Normally, one would expect that
"sprite" routines watch for collisions.

5. How does the code know to change a pingu's status - eg. Walker to Faller,
Faller to Floater ? 

- Perhaps each pingu has a unique id which follows it from inception to death
or removal from the screen, so you would have a "list" of pingus, generated
by the thing which generates the pingu in each level ? (overlap with Q6)

- It would seem that the pingu status (eg. Walker, Faller, Floater) determines
how the pingu is displayed, along with what happens when it updates (eg.
the Floater's y axis drop is smaller than that for a Faller).

- the ::draw is called for each pingu action type (eg. Walker, Faller, 
Floater);this is frequently a simple call, but for some action types there are 
further
subtypes in the drawing - a Walker will need to be drawn differently depending
on whether it is travelling left or right, a floater will have to be drawn
differently depending on whether it is falling above or below the velocity at
which it will squish.

6. How is the code which generates each of the pingus setup, and how does
it operate ?

More specifically :

7. In setting up the mouse (or controller), what calls the routine
Controller::Controller in input/controller.cxx ?

8. How do StartScreen and StartScreenComponent operate ?

Cheers,

-- 
Some of us are paying for sins we have committed.
Others are paying for sins we still have to commit.

John August





reply via email to

[Prev in Thread] Current Thread [Next in Thread]