Because some times, I just don't have anything better to do

Programas / Software

RetroChallenge #3, part 7. Another one done.

Looks like I could say “It is finished¨. Of course, anyone who ever wrote a computer program knows that you are never finished, but, at least I can say that “Russian Roulette” has been properly “Remixed”.
As I mentioned before, there were only 2 tasks left. I tackled the sound first, and even when the results are not great – there is no way to generate noise from BASIC in the CoCo – I think that they are at least acceptable.
For the “Bang” sound, I changed the original
PLAY”V30O2L32CF”, just 2 notes in the 2nd low octave, to V30O1L254T254ACDEFAV20ACDBV10FACD. That is 14 notes in the lowest octave, as short as possible, arranged in a somewhat random fashion to simulate noise. There is also a slight “fade-out” effect by changing the volume from V30 to V20 and finally to V10 while playing.
The “Click” went from
PLAY”O5L64;12″ – a single high pitched note – to O5L96T4BABB. Not a great deal, but at least a bit better.
In the original, the sounds will only be played in one place in the code. But as I added computer “players” that can also Click and Bang, I used an alphanumeric variable to store the PLAY string, to save me from typing the whole Bang sound twice.
For the ending, I wanted to do something a little bit fancy, but without going crazy.
I thought about changing the color assigned to the palette entry for the background to do a kind of “fade out” effect, but in the end I went for a kind of wipe-out.
Using 2 FOR/NEXT loops to print spaces with a different background color than the one already on the screen was very simple, and I went to use 2 PRINT statements. One would go from top left to halfway down, and the other from bottom right to halfway up.
But something was not working. For whatever reason, I’ve always ended up with a space in the original background color on the top left.
Eventually, I realized that, regardless of what was PRINTed on the screen, an extra character with the cursor would be placed right after it. Therefore, when I was printing in the bottom right corner (39,23), that extra character would print in the next line, causing the whole text screen to scroll up. This, in turn moved the 2nd top line up (still in the original background color), and caused that “leftover” character.
Since the computer was actually printing 2 characters for each PRINT command, and I should not print on the last position, I changed the loop that tracks the horizontal position to use STEP 2, and to go only up to 38, ending up with this:

510 FOR V=0 TO 11:FOR X=0 TO 38 STEP 2:LOCATE 39-X,23-V:ATTR 0,0:PRINT” “;:LOCATE X,V:PRINT” “;:NEXT X,V
And finally, the simple trick of printing one character at a time for the final message.
520 LOCATE 6,10:FORX=1 TO 25:PRINTMID$(“You are the last survivor”,X,1);:FORL=1 TO 30:NEXT L,X
The reason I did not use the palette fading effect was that I thought to use it for the “death” screen.
In the original, I switched one of the low res screens, set a blue background, and then painted it red from top to bottom by drawing lines.

1130 WIDTH 32:PMODE 1,1:SCREEN 1,0:PCLS 3
1135 COLOR 4
1140 FOR A=0 TO 192 STEP 2:LINE(0,A)-(256,A),PSET
1150 NEXT
I guess I was trying to do something like a veil of blood falling over the player’s eyes…
Looking for colors that would work for a fade from the magenta background to red, I realized that there were not really too many. By changing the default background to a darker shade, I was able to get another one, which is kind of enough for the effect to work.

340 FOR A=1 TO 5:READ P:PALETTE 6,P:FOR W=1 TO 100:NEXTW,A
350 DATA 9,8,7,6,5
Well, that’s it. A second game remixed. I leave you with some screenshots and the listings for both, the original and remixed versions.

This slideshow requires JavaScript.

Ooooppsss! I just figured something out. More than a few times, when it’s the player’s turn, the game will just react as if a key had been pressed, and move on. This seems to be because any key pressed after the INKEY$ is stored in a buffer, and goes is used later. Adding an extra, bogus INKEY$ seems to have taken care of this.
90 A$=INKEY$
95 A$=INKEY$:IF A$=”” GOTO 95

Advertisements

RetroChallenge #3, part 6. Roulette Recovered

As I went back to rewrite what I had lost, at least I remembered most of what I had done. And is not as if it was a great coding challenge. It is quite a simple program.
One of the first things I did was to include multiple computer players. They are quite dumb and will just pull the trigger when their turn is up.
When the game starts, you are asked “How many opponents” from 1 to 5 will play with you.

RR0
Then, after you go first, a simple routine takes care of your rivals.
2010 FOR R=1 TO O:CLS:C=C+1:IF C>6 THEN C=1:B=RND(6)
2020 LOCATE 5,5:PRINT”Rival #”;R;” aims and …”
2025 FOR W=1 TO 1000:NEXT:IF CB THEN LOCATE 15,8:ATTR 2,7,B:PRINT”!-CLICK-!”;:ATTR 3,6:FOR W=1 TO 1000:NEXT:NEXT R
2050 IF C=B THEN PLAY”V30O2L32CF”:LOCATE 15,8:ATTR 3,3,U:PRINT”!!!BANG!!!”;:ATTR 3,6:DP=DP+1:C=0:B=RND(6):FOR W=1 TO 1000:NEXT:NEXT R
2090 LOCATE 0,8:PRINT:O=O-DP:DP=0
2100 RETURN.
Having other players gives you the possibility of having a bit of strategy for the game. If the last 4 rivals “click” their shoots, you know that there is a good chance (2 in 6) that your chamber will have a bullet in it. Time to buy a spin, or aim for the floor.
I followed by modifying the “spin” and “aim” routines. Before, the program went back to wait for you to press any key. Now, after you decide to do either action, you shoot.

RR2RR1
Finally, it was just a matter of translating and relocating the text.
After a few test runs to tweak and make sure all was OK in the game’s logic, I added a bit of flash when the gun fires. Nothing fancy, just

PALETTE 6,52:PLAY”P32″:PALETTECMP
That makes the background color a light yellow, plays a short pause (does the same as an empty loop, but is far shorter in code), and then restores the original color to the background.
RR3RR5
The last two things I want to add are a congratulations screen if you are the only survivor, and better gunshot noises. Probably something like what I used in “Minecamp
But is already almost midnight. That will have to wait for tomorrow.


RetroChallenge #2, part 1


And for the last post of the weekend, my “Second Challenge”.
write a game that will run in any TRS-80 Color Computer, using the low-res graphics mode (64×32) and no more than 16 KB RAM.
A great way to save time, is to “clone” an existing game. That way, I don’t have to come up with the game mechanics, and I will already have a fair idea on what the graphics should look like.
And it turns out that there is one game, quite simple, that I used to play a lot many years ago, and that as far as I know, was never available in any computer.
A small handheld LCD game called “Hippo Teeth”

The Hippo has only 3 teeth, and a nasty worm is trying to eat them!
Your task, as a veterinarian dentist, is to kill the worms with your gas spray. Nut that is not so easy. The worm moves around a lot, and the Hippo’s tongue gets in the way….
As the gameplay is already set, I decided to test if I could do some decent graphics in the 64×32 mode. One of the difficulties, is that each 2×2 block can only have 1 color and black, a limitation similar to the one the ZX Spectrum has in the high res-mode.
Instead of trying to design the graphics using a regular “Paint like” program, I took advantage of the excellent online SG graphics editor at https://daftspaniel.neocities.org/tools/sgeditremix/
With this tool, it didn’t take that long to come out with what I believe is a decent design for the graphics.
Hippo Teeth Graphics Draft
There you have the Hippo with it’s big open mouth, the 3 teeth, the nasty orange worm, red tongue, “cyan” gas cloud, and the Doc.
Except for the Doc’s feet, everything else happens over a black background, making it easier to design the graphics and animate them.
I will save the Hippo’s picture as a ML file, and load it at the start of the game, perhaps even keeping a copy in another memory location, to make it easier to redraw it if needed.
I have to do some tests to see what is faster, if printing the semigraphic characters, or POKEing them. I guess print will be faster, as each “sprite” will use 3 commands, instead of 9-12 POKEs.


On a side note, something that caught my eye, is the way that the cyan color looks like. I would have sworn that it was a sky-blue like color, as it should be according to Wikipedia.
But my CoCo 3, and all the emulators I tested show the same greenish hue… well, not all. The original Java based “Mocha” emulator does show the color I remember from all those years ago…
I really don’t know what happened to that color that was perfect for bright skies or clean waters. Do you?


RetroChallenge #1, part 1

My First Challenge, as you may remember, is to fully load an AcerNote730i laptop, with software to match it’s manufacture date of 1995.

I guess I can divide it in three.
1) Choose the software,
2) Get the software, and
3) Load the software.

Even if the computer is from 1995, Windows 95 is clearly out of the question.
Windows 3.1 should not be a problem, perhaps with the computer booting to DOS, and loading Windows manually when needed.
X-Tree was one of my favorite programs back in the day, and it will find its way in there.
Norton Utilities, or at least Norton Disk Doctor should also be there.
Other programs that I used back in the day were Quattro Pro, Arj, Compushow…
Some games must also be there. Maniac Mansion, Master of Orion and Doom seem like a good way to start.

Getting the software should not be that hard. I still have copies of some of the one I was using back in the 90’s, and sites like “Vetusware” make it relatively easy to find almost anything from that time period.

The real challenge will be to get the software into the computer. As I mentioned before, it has no PCMCIA slot, nor network card. That leaves only the serial port and the floppy drive.
I do have a P-III with a floppy drive, and I could get the software to it from either a CD or a CF card reader. But I have not used the floppy drive in years…
And to use the serial port, I will fist need to get a terminal program into the laptop, so I would still need to use the floppy drive for that.

Well, I guess my next step will be to test that floppy drive, the few disks I still have around, and perhaps try to get a few more from somewhere. Let’s see how it goes.


RetroChallenge #3, part 1

And I had to do it. Start with my 3rd Challenge.

So I went over my old BASIC programs looking for something interesting that could be part of this challenge. I have 10 full disks, and after 5, it seemed to me that I had more than enough games to keep me busy for the month.
Let’s see what I found…

Alien II
Inspired by the movie “Aliens”, you are a space marine trying to rescue the alien’s victim in a maze of tunnels.
Aliens II

R Rusa
A Russian roulette simulation. Yeah, I guess I was kind of sick back then 🙂
Ruleta

Sup-Caza
You must try to catch the weird tentacled thing, avoiding the pac-man like chomper.

Sup-Caza

Lobo 1
Inspired by (I believe) a ZX Spectrum game inspired by the “Airwolf” TV show.
Airwolf

Tiro
A simple target shooting game.
Tiro

TOW-2
Keep the missile on target to blow the tank before it blows you.
TOW

Topgun2
You are alone against 2 enemy fighters. At least that is better than 5 vs 2 as in the movie!

TopGun

Super j
Shoot the enemy space fighter from your base’s turret before it fires on you.
Super J

You may have noticed that some of the names and text in the screenshots are in Spanish. Yes, that is my native language. I’m not really sure if I want to translate them.
What do you think?

Now is time to pick one, and start trying to figure out 30 year old code written by a 15 year old kid….


Proyecto Windows 98 (III) “Gaming PC”

Todavía me acuerdo de la primera vez que instale Windows 95.

Cuando mi pobre 386 termino de cargar, pasé un buen rato mirando las opciones de colores, configuración, y después… creando iconos para mis juegos de DOS. El hecho es que en 1995 no había muchos juegos interesantes para Windows.

Para 1998, las cosas habían cambiado bastante, y gracias a DirectX, prácticamente todos los juegos salían directamente para Windows.

Así que, cuando tuve Windows 98 (2a. edición!) pronto, llego el momento de instalar, no solo el US Navy Fighters, sino también algunos de mis juegos favoritos de todos los tiempos y otros clásicos.

US Navy Fighters 97:

US Navy Fighters

Alpha Centauri:

This slideshow requires JavaScript.

 

Dune 2000:

This slideshow requires JavaScript.

Advanced Dungeons and Dragons rules:

AD&D Core rules

No One Lives Forever:

This slideshow requires JavaScript.

Blood 2: The Chosen:

Blood 2: The Chosen

European Air Warrior:

This slideshow requires JavaScript.

StarCraft:

Warcraft en el espacio!

Warcraft en el espacio!

Heroes of Might and Magic III

This slideshow requires JavaScript.

 

Ahora, a jugar!


Proyecto Windows 98 (II)

Habíamos quedado con Windows 98 instalado, pero con grandes problemas de los drivers (controladores, para los fanáticos del Español).

Video de 640×480 con 16 colores, sin sonido, sin tarjeta de red… Y se podría pensar que conseguir los drivers para una computadora que tiene 15 años seria bastante complicado…

Pero no. El sitio web de Dell tiene todo lo que se necesita, incluso para modelos mucho mas viejos. Gracias Dell!

Así que, descargue los archivos desde mi PC moderno, los copie a un disco USB, y…. nada.

En estos días uno esta tan acostumbrado a cosas que funcionan, que me había olvidado por completo que Windows 98 no reconoce discos USB a menos que se instale un driver, que no tenia como instalar.

La alternativa era usar un CD. Pero… ¿Cuantos de ustedes tienen CDs vírgenes por allí? Yo tampoco.

Optiiplex GX150

Hace tiempo que no trabajaba con un PC así.

 

Por un momento pensé en moverla hasta donde llegara un cable de red, y conectarla a Internet, pero entre los drivers que necesitaba estaba el de la tarjeta de red. Ya me veía saliendo a buscar CDs vírgenes, cuando me acorde de unos CDs que me salvaron la vida.

“Puppy”es una distribución de Linux que no necesita instalase en el disco, y esta diseñada para PCs con recursos limitados. ¿Podría funcionar en un PC tan limitado?. Si, definitivamente si.

Dell Drivers

Desde Linux, solo necesite entrar (lentamente) al sitio de Dell, descargar los archivos correctos, y guardarlos en el disco de Windows. En realidad no fue tan fácil. Incluso Puppy Linux se complico con la poca memoria, tratando de usar todo el OS desde RAM. Cuando ya tenia el driver de la tarjeta de red pronto, pensé en seguir la descarga desde Windows. No. Internet Explorer 5 no tiene ni idea de que hacer con una pagina moderna (no es que Internet Explorer 10 u 11 se manejen mucho mejor), asi que, reiniciar en Linux de nuevo, y terminar de bajar los drivers.

Pero finalmente, valió la pena.

 

This slideshow requires JavaScript.

 


Proyecto Windows 98

Hace unos días me econtré queriendo jugar a uno de los simuladores de vuelo que, para mi, marco una época.

El US Navy Fighters 97.

Pero, como era de esperarse, Windows 7 no es lo mejor para un juego de la época de Windows 95.

Incluso soluciones como DOSBox o Virtualbox tienen problemas con la familia de Windows 9x, siendo muy nuevo para unos, y muy viejo para otros.

Pero decidí que eso no me iba a impedir jugar USNF97 como se debe.

Y para eso, el “Proyecto Windows 98”.

Tengo una Dell Optiplex 150, que salio de fabrica con Windows 98 (aunque ahora tiene Windows XP).

Es una Pentium III de 1 Ghz, que con 256 MB de RAM y un disco de 30 GB resulta un poco demasiado para un PC de 1999, pero me puede hacer mas fáciles las cosas.

El primer paso, es reparticionar y formatear el disco. Windows XP usa el formato NTFS, y Windows 98 no puede instalarse en el.

Luego de reencontrarme con mi viejo CD de rescate (EBCD), FDISK y FORMAT se encargaron de dejarme con un C:\ utilizable.

El siguiente paso es copiar los archivos de instalación de Windows desde el CD al C:\WIN98. Si bien posible instalar directamente desde el CD, hacerlo desde el disco duro es mas rápido y confiable.

Al ejecutar “Instalar”, el programa primero hace algunas pruebas del sistema (básicamente, un scandisk), y cambia a modo gráfico para comenzar la instalación en si.

Entre las opciones interesantes, que nunca vi en uso, está la de instalar un “Servidor de acceso telefónico a redes”, que permitiría al la computadora funcionar como una especie de servidor web para conexiones por módem de discado. Aprovechando que el espacio en el disco sobra, instale prácticamente todo lo que se me ofrecía.

Luego de algunos minutos, y un par de reinicios, Windows 98 me daba la bienvenida… con una pantalla horrible de 16 colores.

Bienvenido a Windows 98

Parece que tener esta Dell pronta para juegos va a tomar un poco mas de esfuerzo…


Starting yet another game

I have to admit that I’m a bit blocked with my new PC game engine (eSage), and the “Cat and Shark” port to the Tandy Color Computer is not really inspiring me (I had actually forgotten about it)

That is why, a few days ago, when feeling a bit bored and finding some time in my hands, I started another project. Let’s call it … “Trench of Death”
Just as “Furious Felines” was inspired by “Angry Birds”, “Trench of Death” draws from another modern classic, “Plants vs. Zombies”, but with a scenario changed from a garden to the Death Star.
I guess that everyone remembers the attack against the Death Star at the climax of the original Star Wars movie. The attacking ships have to go through a long, straight “trench” to get to their final target, while turbolasers and TIe fighters try to shoot them down.

In this game, you’ll have to set the defenses along the trench, to prevent the attacking crafts from reaching their target. The ships will be coming from a trench 10 cells long, were you can place guns at 3 sides.
Each gun will have different cost, a “time to build” and power ratings. After the player selects the type of gun to be installed, they will place it either on the sides of the trench, or at the end, meaning that the incoming crafts will be fired upon from the sides and the front.
I have already coded 10 types of gun turrets for defense, and 8 types of attacking crafts, and done some testing to evaluate the game balance.

So far, I don’t have much to show. I have coded the attacking craft movement routines, and tested it with a squadron of 8 ships. Speed seems to be acceptable even with fake routines added to represent the joystick input and gun firing routines.
Next up, allow the player to select a type of gun, and place it in one of the designated spots.

I hope I’ll be able to do it this weekend.


And new PC game(s)


A few weeks ago I was bored and stuck with a PC were I couldn’t run my 8 bit emulators. I then decided to go for QB64 and start on a project that had been running around my head for quite a while.
I’ve always wanted to write an adventure game, something like the classics from LucasArts, or Zork. And I had realized that writing an “engine” would probably be no more difficult than a stand alone game, with the advantage that creating new games would be much easier.
So I started working on what is now “eSage” (for ‘extremely simple adventures game engine’)
It turned out to be far easier than expected, and that led me to keep adding new features, to the point where I had to write a manual, because I couldn’t remember all the commands I had implemented.
The system is quite simple. Each game is divided in “Steps”, in which you are given options that will take you to other Steps, not unlike those “create your own adventure” books.
Each Step has a background image and sound, as many additional images and text as you want, with a list of options that determine to which Steps you can jump to, and the score that you get for choosing that option.
I eventually added support for multiple fonts and colors, random jumps, and a few other features.
It is still not finished, but I think that any improvements that I add from now on will not break the scripts from current games. In short, this means that if you create a game now, and I update the engine, your game will still work.
Here is a sample script:

Fonts FECM_Es.ttf/FECM_Es.ttf/ANTQUAI.TTF/
Frame,frame.png/HM148/VM83
Number of steps,5

Step 1
HP 10
bgfile shuttlebay.jpg
bgsound title.mp3
text You are the new Captain of the USS Enterprise/H180/V5/C030444
text and have been ordered to patrol/H385/V6/C030444
text the Romulan Neutral Zone/H350/V8/C030444
timeout 20/2/0
Option Helm, set a course/3/10
Option No way, that is dangerous. Helm set a course for Risa/2/0
EOS

Step 2
bgfile beach.jpg
text While “relaxing” in Risa, you get a VD!/H250/V9/C400004
text Your career in Starfleet is ruined!/H280/V10/C400004
EOS

Step 3
bgfile viewer.jpg
imgfile BOP.jpg/H200/V150
text Sir! A Bird of Prey decloaking on the starboard bow!//H280/V10/C400004/F2
Option Fire at will/4/3
Option Hail them/10/3
EOS

 

In a few days, I will be uploading the “runtime” program, eSage itself, and the manual, to http://www.hscomputadoras.com/HERMESOFT/hermesoft.html