Starting a fighting game - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html) +--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html) +--- Thread: Starting a fighting game (/thread-671.html) |
Re: Yup, whatever program you're using to create the PCX... - na_th_an - 05-13-2003 Quote:file is generating 8-bit RGB data, not 6-bit data. Windows PCX viewers will generally display that just fine. DOS programs generally won't. (And QB's PALETTE statement really doesn't like 8-bit RGB data.) True. Look at this specs of the PCX format (from ZSoft, circa 1987): Code: VGA 256 Color Palette Information So by default PCXs use 8 bits for each colour component. You just divide the values by four in your program when you are loading it and changing the DAC registers. As the palette is appended at the end of your PCX file, a good way of reading the palette could be: Code: f% = FREEFILE [Note that this may need a fix: I wrote it from the top of my head] Starting a fighting game - Kofman - 05-14-2003 wiz so their is a way to read only one byte at a time. That's amazing. See we've all learned something today . What am I supposed to do with DEM8.BAS I tried running it and yea it does run but how do I change my .pcx file. When I ran code nothing happened. No errors simply nothing. Am I supposed to put my file name somewhere in the code. I'm a little lost. Just a little . Wiz you mantioned backdrops what are they? And btw how do I get transparency. When I made my .pcx I made it in transparency and I actually put transparency into my pallate which the .pcx is saved in. So why doesn't it show up. I still haven't gotton naruto.pcx to appear on the screen becuase of that pallate error, so I'm stuck for the moement. Thanks for the helping me realize how to break up animation frames. It really made work so much faster. I've gotten the keyhandler to work. Milo Sandleck is by far the simplest Keyhandler out there. No learning neccessory i love it. I've designed what the ultimate program will look like so once I get those little sprites on screen I know exactly what I'm going to do and I should have a demo up first thing. Ofcoarse my friend still needs to figure out how to get rid of flickering in screen 13, becuase we've seen it done in code before without libaries. Also I've switched to QB 7.1 It's amazing. You can customize everything. I changed colors in every thing :king: I'm waiting for a response on how to convert my .pcx And do I still load it in the same way? Code: length = length + 1 or should I try using what others suggested Code: length = length + 1 If I got the logic of it right I guess that's how you'd do it? I really have very little idea of the proccess so tell me before hand what mistakes I should avoid if I try this method. PS: what's the difference between Screen 13 and Mode 13h? PSS: Sorry for so many questions and comments that are all over the place. Just notice that every paragraph is a different thought in my head. That might help. Did you see where... - Glenn - 05-14-2003 I said to run DEM8 from the DOS command-line and put the name of your file after it? For example, DEM8 myfile.pcx Starting a fighting game - na_th_an - 05-14-2003 kofman, I don't know if you missed my post With those "AND 63" you are limiting to 6 bits, and that's _exactly_ what your VGA does. It will only read the 6 less significant bits, so doing AND 63 and not doing it is just the same. Instead, you should divide by four, as I pointed out. Also, as I explained, PALETTE is slower than the OUTs, 'cause it waits for a vsync (in most VGAs), so it means that you'll only be able to change a DAC register each 1/60 of a second. To achieve transparency, you just make your blitter skip a certain colour. Most libs skip 0 'cause it is the fastest way (just an assembly jump). If you are gonna use GET/PUT, you'll need some masking. Masking is a technique which needs a mask for each sprite. I posted an extensive explanation on the technique before the forum hack - if you need it, I'll do it again, but it is not a good technique 'cause it is slow and needs as twice as memory as the transparency skipping technique. The bad thing about the transparency skipping technique is that it is damn slow in pure QB, and you'll better use a LIB with a good transparent sprite blitter, or code it in assembly or C. "Backdrops" are just the background graphics. Blame Capcom if I use that semi-inaccurate word I didn't see your other question... - Glenn - 05-14-2003 The difference between "SCREEN 13" and "mode 13" is that "SCREEN 13" is just the QB statement to switch video modes to the one numbered 13. That mode has nothing to do with QB; it's a property of your video board. (And it's just basically a coincidence that the "13" of "SCREEN 13" actually refers to the video mode "13h". In "SCREEN 9", for example, that "9" has no relation to the actual number used by your video bios.) Starting a fighting game - Kofman - 05-19-2003 How would I create transparency and reoganize the pallate? Nathan you said I need a transparancy blitter. What exactly is a blitter? For example the color that I want to be used for transparany is 246. How do I go about it. BTW since my pallate is so screwed up as it stands that 246 is actually a form of green. : ) If you have that masking tutorial saved somewhere that would be nice too : ). I really don't care how to do it. Starting a fighting game - na_th_an - 05-19-2003 A blitter is just the code that copies your sprites to screen or to a buffer. Most QB libs use #0 as it is faster to use that number. If you wanna code a blitter, it will be slow and unusable unless you have the computer that was inside the death star To be able to use PUT and GET (which will be faster that your blitter) you'll have to do masking. I'll try to put together a tut tomorrow. Why don't you use a lib? they fit in a diskette with QB45 so... Starting a fighting game - Kofman - 05-19-2003 Don't Like libs too many problems with them. I'll try to be as lib free as possible. Starting a fighting game - na_th_an - 05-19-2003 Like you want, but the only "problem" you'll have with i.e. DQB is doing QB /LDQB.QLB instead of doing QB /L ... Not much problem IMHO. Anyhow, I'll write that tutorial. Starting a fighting game - toonski84 - 05-19-2003 you'd get a bigger mess of problems trying to spagetti code all these routines in "pure" qb (if such a thing exists). |