JF make 250
JF Nav
JF Nav
Creation Date: 2003-01-18
Today's rant has to be short because I didn't start it until 2:23 AM. For today's lesson, I'm going to comment a bit more on the importance of file format. You'll need to look at both very small pictures today to get the full meaning of the rant because they are different. But that is the point. The jpeg can easily compress an anime that was previously compressed with mpeg (I actually ripped the frame right off my Captain Tylor DVD #2). The picture is pretty big (460x488x24-bit) considering how small the file size is [18.1 kB], right? Well that's because I picked the right tool for the job, given to me by the amazing field of mathematics. A png at half that resolution (1/4 the data) is 25 kB. The png, though is doing its job very well also. At a whopping 736x804x4-bit, it weighs in at just 8.5 kB, a marvel of modern computer science. How did I do it? Well, I created the png in XFig and exported it to a png file with smoothing on. Then I opened it in Gimp and cut it down to a non-dithered 16 colors. The jpeg was interesting. I ripped it from my DVD using transcode. Then I opened it in Gimp and cropped it to size. Then I saved it as jpeg. The save dialog let me see both the preview and the size of the file. I sized to make it look good and here it is. I can't say how sweet Gimp is. Today I spent a few hours working on getting Script-Fu to work. Most of it was learning the obscure (yet simple) language. I was trying to get it to convert a bunch of PCX files into PNG files. I finally gave up and I decided to look for a program called ppmtopng. You see, I found a program that converts pcx files to ppm, aptly named pcxtopng and it came with my distro of Linux (Slackware). But curiously, there was no pcxtopng or ppmtopng converter. In fact, there was no png converters at all. What was the big idea? ZLib is the core of the free software movement, I could hardly see them being turned away from Slackware. So I looked on the web and sure enough there was a ppmtopng. I downloaded it and it needed a library called NetPBM. I found that and compiled it. But what's this? It has a program called pnmtopng! What is a pnm file? A pnm file is any of the ppm, pbm, pgm files. So that was my solution. I edited my mp3 to ogg converter script to convert pcms to pngs and viola! What did I convert? The whole System Shock 2 Multi Function Display (MFD). I had done it before using a trialware PoS program, but this time it was personal. ^_^. I really wanted to do it for free and I knew there was a way. I found it, it is Linux/NetPBM.

What is the PNG picture about? Well, it's my next big project after I get Terrain Works finished. You see, whenever I don't have a next big project(TM), I end up wasting my time badly. I don't get JF done, I don't get AltSci done, and I don't do any work. So if I line up a next big project(TM), I can just start on it while I am too bored with the last next big project(TM). For example, I worked my rear off for a month trying to get an equation that allows me to drag and drop 3d items using my 2d cursor. It's an important equation and it can't have a bunch of cosines and tangents every frame. Well, over Christmas, I cracked it; it was a tough nut involving four sqrt() per click, however, I got it so that it didn't have any higher level math on the dragging of objects. That means that it will go blindingly fast and will make a very small slow down when you click on slower computers. Anyway, it almost works, but it doesn't and I don't have a solution yet. So I started a new project the day that I stopped on the previous one: converting my file access from fprintf() and fscanf() (C language file I/O) to iostreams (C++ language file I/O). I finished that, but I haven't been able to implement it yet because I found the next big project: Terrain Works. I will finish that in a week, but before I do, I'm going to start the collision system. I've given you a little insight on how the collision system will work. Each room has edges. Each edge is defined by two points and for faster collision detection, I gave it a precomputed normal. So my ideas for fast collision detection/prediction are as follows. First, I only do collision detection on two rooms (your current room and your previous room). each frame I do a dot product of current velocity and normal gives us only walls that are where we're going, not behind us. If it passes that test, I check to see if our max velocity and max delta time will cover the distance before our next frame. If it passes that test, it is an imminent danger, so I do an accelerated particle test with the wall which requires a square root. This square root will only be called once when you are headed for a wall and right next to it. It will conclude whether or not you will hit it and if you will, it sets the acceleration (you will bounce off the wall) accordingly. And that way, you will collide with buildings correctly. But what happens when you change rooms? Well, you'll hit the room called "Door_N_M" first, where N and M are the current room and previous room. When you pass through one side of the door, you will be impervious to the wall there. When you pass through the other side, you will again be subject to the walls on the other side. It works marvelously. I even have a great plan on how I can create these walls with existing software. Using MilkShape, I will create these rooms as meshes. In AS3D, I will parse the name and turn the in MS3D format into the AS3D Room/Edge classes format. I have all the equations lined up. It should be fun, too. Of course, that's only 2D indoors collisions. If I want multi-level structures (of course, I do) and terrain, I will need more equations. But that is exactly what I have. I've been working on this for years and it's coming together. Hack Mars needs: models (implemented, just need content), animation(same), paths(same), collision(10% done), 3d drag and drop(80% done), audio (may take a bit of work), and various AI. It's a good year or so away, but I like to think about what I have done already.

JF was supposed to be done six months ago. JF is 1.5 years old now and it's only 1/5 done. Of course, I've been working on everything but JF this entire time, so I should blame that, not that it's impossible. If I could just get MilkShape to work with Linux, it'd be sweet. Scene 7 in two months, let's see if I can do it. Scene 1 in two weeks, Scene 6 in 1 months, 1 week, and Scene 7 in 3.5 weeks. Scene 1 just needs direction. Scene 6 needs a lot of work on Los Angeles and characters (5 or so). Scene 7 will be easier. I hope. It will only have two characters and two new models. But that's all the hints I'll tell you about.
JF Nav
Home Characters Making Of Technical Mail News Links |< First < Prev Next > Latest >|  bandwidth version Goto Scene