[Gambas-devel] Invader example does not work

Tobias Boege tobias at ...692...
Sun May 12 17:20:57 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[0].
> >>
> >>> 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.
> 

OK, I played on a 180*74 terminal and I admit that there are other graphical
glitches, too, like ships partly hiding behind other ones, which appears
after playing a while and shooting quite some enemies. Didn't notice
anything with the comparably short games in 80*24.

Maybe some ships crumbled just while others updated their position. But I'm
right in the assumption that in Gambas, an event (like a Timer) can never
preempt another event handler, right?





More information about the Devel mailing list