Rogue'm Up

English version below.
Linux Application Development book
Uns dois anos atrás, comprei numa promoção o livro Linux Application Development, e até hoje não consegui acabar de lê-lo. Acontece sempre isso com todo livro técnico que compro. Nunca consigo ler pelo menos um parágrafo de uma só sentada, sempre perco o interesse e vou fazer outra coisa.
Resolvi então mudar de estratégia: vou lendo os capítulos fora de ordem, procurando por temas que me interessem no momento. Vi então que o livro tem um capítulo sobre uso da lib S-lang, que serve para abstrair o acesso ao terminal (console). Tradicionalmente se usa a biblioteca ncurses, mas a S-Lang parece ser mais moderna.
Enfim, não só finalmente li um pouco mais do livro, como comecei a brincar com as funções da S-Lang e fiz um pequeno jogo, um shooter lateral, com o mesmo. Como a nave é representada pelo caracter @ e os inimigos são, digamos, familiares para quem já jogou um certo jogo em modo caractere, resolvi chamar este de Rogue’m Up – mistura de Roguelike com Shoot’em Up.
Ou seja, é um shooter para se jogar em modo caractere. Não espere nada muito bem feito, afinal foi só o resultado de uma tarde brincando com as funções da lib S-Lang. Movimente-se com as teclas wasd ou hjklyubn (todas minúsculas), atire com o espaço, saia com Q (maiúsculo). Cada colisão com um inimigo tira 2 pontos de HP.
Atualizado: agora com mais de uma versão e usado como exemplo de programação em C, aqui.


Linux Application Development book
Two years or so ago I bought the book Linux Application Development at bargain price, but I still didn’t finished reading it. This always happens with all technical books I bought: I sit down to read the book, and before I finish even a chapter, I shift my attention to something else and drop the book.
I decided to change my strategy: now I’ll try reading the chapters out of order, selecting chapters by its themes, looking for something I’m interested in reading at that moment. Then I found that this book had a chapter about the S-lang lib. S-Lang provides an abstraction of the terminal (console), easing the programming of console applications. Traditionally the ncurses lib is more used and talked about, but S-Lang seems to be updated more often.
So I’ve finally advanced a little more in reading this book, and also spent some time playing with the S-Lang functions, enough to make a small game – a lateral shooter. The ship is an @ character and the enemies are, let’s say, somewhat familiar to anyone who ever played a certain character-mode game. And so I named this little experiment Rogue’m Up – from the wordsRoguelike and Shoot’em Up.
In other words, it’s a character-mode shooter. Don’t expect anything nice, this was just a result of an afternoon’s play with the S-Lang lib functions. Move the ship with the keys wasd or hjklyubn (all lowercase), shoot with the spacebar, quit with Q (uppercase). Every time an enemy collides with you, you lose 2 HP.
Updated: now with more than one version and used as example of C programming, here.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *