[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] placement of graphics code



R. Alan Monroe wrote:
> Date: Mon, 11 Aug 2003 00:05:53 +0200

> Dumb newbie question: Is there a generally accepted "right" place to
> put a blit statement, given a choice of putting it inside a method of
> your game object, versus in the main game loop that acts on said
> object? Or is it "six of one, half dozen of another"?

I put it into a Screen class, which has methods to be called by my
main game look. The object knows nothing about this. My screen class
does much more, like regulating the viewport and scrolling the screen,
as well as drawing a grid and blitting multiple backgrounds and
more...

Gerrit.

-- 
109. If conspirators meet in the house of a tavern-keeper, and these
conspirators are not captured and delivered to the court, the
tavern-keeper shall be put to death.
        -- 1780 BC, Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
	http://www.sp.nl/