Matthew 6:34
"Therefore do not be anxious about tomorrow,
for tomorrow will be anxious for itself.
Sufficient for the day is its own trouble."
Sunday, 16 June 2013
GLSL Programming
I went to Dreamhack today, I live nearby so I only bought a one day pass and looked around a little. I was mostly interested in looking at the GLSL Introduction, they showed some simple stuff to get started. So I've been playing around on shadertoy.com
Here's a munching squares example I just did.
Rotating munching squares:
https://www.shadertoy.com/view/4df3WM
Electron field (Coulumb's Law):
https://www.shadertoy.com/view/4sf3DM
Mandelbrot:
https://www.shadertoy.com/view/4dX3W7
It was really fun to do. In the old days the fun part would be in getting these things to render fast, but you don't really have to worry about that now. :)
Here's a munching squares example I just did.
Rotating munching squares:
https://www.shadertoy.com/view/4df3WM
Electron field (Coulumb's Law):
https://www.shadertoy.com/view/4sf3DM
Mandelbrot:
https://www.shadertoy.com/view/4dX3W7
It was really fun to do. In the old days the fun part would be in getting these things to render fast, but you don't really have to worry about that now. :)
Friday, 14 June 2013
My old Turbo Pascal programs and games
I found most of my old programs and games that I did in Turbo Pascal, up to around 2003. 10 years ago :)
Even though I only had a 200MHz Pentium computer back then, the programs ran much more smoothly that they do in DosBox on a Xeon 3.3GHz computer ;)
I did not try all programs here. I did not have more time. Most of these programs make use of Mode 13h in DOS. I had so much fun playing around with that.
Here are some more programs, I especially like the 3D program FL.EXE.
There are four games that stick out, the Pong game, Knight game, Space and Snake games .
The Knight game, I took one sprite from Final Fantasy, the other I drew myself. I also had a map editor, but I was not able to run it. I got runtime error 200, that I remember I struggled alot with. I think it had to do with the CRT library, maybe. It could sometimes be fixed with TPPATCH.EXE, but I later found it was much better to not include this certain library at all, and I found ways to make my own procedures instead of using the ones in CRT.
Knight changes to night and day. There was a bug where the black color turns blue. I remember I fixed this, but sadly all of the newer versions of my programs was lost in a hdd crash. These programs I have here are backups, so they are a little bit older.
I had to alter day/night procedure when I filmed this because, usually the game only changes to night if time is between 21:00 to 06:00. So it stays in sync with computers clock :) I changed it for this video, so it changes between day and night every 30 seconds.
I also had a version of the Knight game that had an encrypted MAP file for some reason, this version was a little buggy.
The Pong game isn't much, it's basically just a nice intro screen :) But I was able to do a ball and a paddle, but not much more function than that.
Mode 13 only had a 8bit color table, 256 possible colors. The color table in Mode 13 was programmable, I could set any index in the table to a 24bit RGB color. I used Photoshop to generate the best possible color table for a certain image . I stored that in a file, and I saved the image as a RAW image. Then I wrote a program in Pascal that read these two images and combined them into one that I call DAT file. I had a DAT file reader, but I did not try it in this video, there are many DAT files to look at in future videos :)
The Snake game, I played that alot myself. This game originally also had music, but it did not work in DosBox. I will experiment with settings to see if I can get that working also.
It was possible to increase and decrease the speed of the snake, higher speed and you got more points. I did not find the button to increase the speed, I could have checked the code but I gave up :P
Not much to say about the silly Space Invaders game. It's kind of lame :) You cannot die, you can only loose points, and the game never ends.
I also did some programs in assembler using Mode 13. I was trying to be within the 256b limit. There was a page called 256b.org where people could upload small programs with a 256 byte size limit. Some other guy made a tube demo, that was totally impressive. My programs was not that impressive, these are some of my creations. But these are around 512byte large. :)
Even though I only had a 200MHz Pentium computer back then, the programs ran much more smoothly that they do in DosBox on a Xeon 3.3GHz computer ;)
I did not try all programs here. I did not have more time. Most of these programs make use of Mode 13h in DOS. I had so much fun playing around with that.
Here are some more programs, I especially like the 3D program FL.EXE.
There are four games that stick out, the Pong game, Knight game, Space and Snake games .
The Knight game, I took one sprite from Final Fantasy, the other I drew myself. I also had a map editor, but I was not able to run it. I got runtime error 200, that I remember I struggled alot with. I think it had to do with the CRT library, maybe. It could sometimes be fixed with TPPATCH.EXE, but I later found it was much better to not include this certain library at all, and I found ways to make my own procedures instead of using the ones in CRT.
Knight changes to night and day. There was a bug where the black color turns blue. I remember I fixed this, but sadly all of the newer versions of my programs was lost in a hdd crash. These programs I have here are backups, so they are a little bit older.
I had to alter day/night procedure when I filmed this because, usually the game only changes to night if time is between 21:00 to 06:00. So it stays in sync with computers clock :) I changed it for this video, so it changes between day and night every 30 seconds.
I also had a version of the Knight game that had an encrypted MAP file for some reason, this version was a little buggy.
The Pong game isn't much, it's basically just a nice intro screen :) But I was able to do a ball and a paddle, but not much more function than that.
Mode 13 only had a 8bit color table, 256 possible colors. The color table in Mode 13 was programmable, I could set any index in the table to a 24bit RGB color. I used Photoshop to generate the best possible color table for a certain image . I stored that in a file, and I saved the image as a RAW image. Then I wrote a program in Pascal that read these two images and combined them into one that I call DAT file. I had a DAT file reader, but I did not try it in this video, there are many DAT files to look at in future videos :)
The Snake game, I played that alot myself. This game originally also had music, but it did not work in DosBox. I will experiment with settings to see if I can get that working also.
It was possible to increase and decrease the speed of the snake, higher speed and you got more points. I did not find the button to increase the speed, I could have checked the code but I gave up :P
Not much to say about the silly Space Invaders game. It's kind of lame :) You cannot die, you can only loose points, and the game never ends.
I also did some programs in assembler using Mode 13. I was trying to be within the 256b limit. There was a page called 256b.org where people could upload small programs with a 256 byte size limit. Some other guy made a tube demo, that was totally impressive. My programs was not that impressive, these are some of my creations. But these are around 512byte large. :)
Subscribe to:
Posts (Atom)