I'm just starting out in PD but 99.9% of the time I can break something down and figure out how it works or find something online, but can someone explain to me how to use two gemheads to render a pattern with just on geo. I understand the textfile object and the text file part what I down get is why it works. Thanks, Alain
From: Frank Barknecht fbar@footils.org Date: 2007/05/05 Sat AM 04:58:59 EDT To: pd-list@iem.at Subject: Re: [PD] Space Invaders 4D Game
Hallo, Thomas Ouellet Fredericks hat gesagt: // Thomas Ouellet Fredericks wrote:
Your code could be greatly simplified if you used lists to trigger the line objects (for example, sending the message 0,1 1000 will start from 0 then ramp up to 1 in 1 second).
I also did a simplification to this nice game: I change the invader.pd to use an external file for the "model" of the aliens. It's attached as invader2.pd ready to be dropped in as replacement for invader.pd (only used in enemytest). Make sure, the invader.txt file is next to it.
Regarding the format of invader.txt: It uses coordinates starting in the lower left corner, so the origin (0,0) is not the center of the invader. To correct that a line with "offset num num" is used. The spread between the individual pixels can be set in a similar way with "spread". See attached xcf-image (for gimp) for how the coordinates were written.
Oh, and of course I added an explosion. ;)
But explosions have to be implemented in the main game first (that is, the "destroy" message must not move the invader out of sight, otherwise the nice explosion will stay invisible. I leave that as an excercise for the reader.
Ciao
Frank Barknecht _ ______footils.org_ __goto10.org__