[Gambas-devel] Invader example does not work
tobias at ...692...
Sun May 12 16:46:36 CEST 2013
On Sun, 12 May 2013, Beno?t Minisini wrote:
> Le 12/05/2013 16:27, Beno?t Minisini a ?crit :
> > Le 12/05/2013 16:04, Tobias Boege a ?crit :
> >> On Sun, 12 May 2013, Beno?t Minisini wrote:
> >>> Hi Tobias,
> >>> I tried the Invader example, but it does not seem to work. I see
> >>> mainly rubbish in the terminal.
> >>> --
> >>> Beno?t Minisini
> >> Yeah, I should explain:
> >> There are currently no levels or anything. You are prompted with
> >> approx. 1/3
> >> of the screen full of enemies - and must survive! This is what you see at
> >> the top. You have a rather huge screen, sorry for that :-)
> >> I used an 80*24 terminal to test. This shows that there is, as for Pong,
> >> some formula needed that involves both: height and width of a terminal to
> >> caluclate enemy positions and amount...
> >> As for the asterisks: red and magenta enemies are Borg. They are able to
> >> shoot on you with green asterisks. The chance they do is 1/2000th with
> >> every
> >> move.
> >>> From the picture, I can tell that the game functions quite like I
> >>> wrote it.
> >> It's only that I wrote it badly :-) To test it, you should for now set
> >> the
> >> environment variables LINES and COLUMNS to 24 resp. 80 before starting
> >> the
> >> program. This makes ncurses pretend it runs in such a terminal.
> I set the variables, but it's still buggy. Enemies sometimes don't move
> correctly... They jump to a position instead.
There are four types of enemies that behave differently when you kill them:
- green : dies
- cyan : crumbles into two green ones
- magenta: crumbles into three cyan ones
- red : crumbles into four magenta ones
When a ship crumbles into other ships, they are inserted at the position of
the now-dead ship and all other ships are shifted forward to make room for
them - and as additional pressure for the player. Ships should only "jump"
if you shoot other ones.
Seems like that is not too obvious and should be removed... At least, I
should try to detect whether there is enough space free after a crumbling
ship so that the following ones need not be shifted. This sounds more sane.
More information about the Devel