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) |
Starting a fighting game - Kofman - 05-31-2003 Oh thank you so much nathan. Thanks for explaining the little part for me Glenn, it helped too. Starting a fighting game - Kofman - 06-03-2003 Going backwards for a sec from the buffer. I'm having a bit of trouble with my masking code that nathan helped me with before. I never tested his program really but I did take the general concepts and I'm sure I applied them right. I tried a few various approaches here. I've uploaded my code and files (images and .til files). Including a photoshop pallate I made. Anyway here is the code. And you can download all of it and the images here. RNDR3.BAS Code: DEFINT A-Z Starting a fighting game - Kofman - 06-03-2003 Please help me figure out why I'm not getting transparency. Starting a fighting game - na_th_an - 06-03-2003 Well, you don't get transparency 'cause you are not following the steps. 1.- You need your sprites to have colour #0 for transparent zones. 2.- You need your masks to have colour #255 (&HFF) for transparent zones, and colour #0 for solid zones. 3.- You put your MASK with AND, then you put your Sprite with XOR. I have no clue what are you doing in your code: :???: You just need: Code: PUT(x%,y%), mask%(0, m%), AND Remember that the mask is used to create a "black hole" in the background ('cause the XOR blitting only works in black backgroundos) with the shape of your sprite, and then you're ready to blit your sprite. Starting a fighting game - Kofman - 06-04-2003 Umm that's great and all I get most of it but umm a slight problem. How do I get my background to be #255, and my sprite bg to be #0. I don't no how to reoganize the pallate like that. Or create colors that would be in those spots of the pallate. If you could help me by converting them somehow that would be great but I'm a little lost here. Unless ofcoarse you simple mean I should just make the sprite have black bg and the mask have white bg for transparency then I don't have a problem otherwise I'm so fricking confused. PS: I figured out the buffer. THANKS ALLOT Everyone. I even got most of the segment offset stuff. Some of it was very clever. For example in nathan's example how he set a pixel in the middle of the screen and new the mem of it and used it to find the location in memory was pretty intresting. Other parts made good sense. Some things are still very sketchy. Starting a fighting game - relsoft - 06-04-2003 And I don't know why some of my posts got deleted. my post was.... Pset??? Put(x,Y),spr,and Put(x,y),sprmask,or ????????? Starting a fighting game - na_th_an - 06-04-2003 Kofman, I told this to you before: You better get a good, old GFX designer for indexed modes (PSP3, Deluxe Paint or Neopaint for example) with good palette support if you're gonna use a paletted mode (such as SCREEN 13's mode 13h). I can give you link to any of those three programs, if you like. I know that switching is a bummer, but you'll need _complete_ control over colour indexes if you're gonna make games. Starting a fighting game - Kofman - 06-04-2003 *sigh, can any of these programs take .pcx and load them in so I don't have to redraw them. would never be able to redraw them. Neopaint loads PCX pictures just fine. - Glenn - 06-04-2003 . Starting a fighting game - wizardlife - 06-04-2003 Quote:*sigh, can any of these programs take .pcx and load them in so I don't have to redraw them. would never be able to redraw them. *blink* *blink* Okay, fire up DeluxePaint and save an empty file. Go into PSP and extract the palette. Image -> Mode -> colour table. Save it. Now load up your other files. Break 'em into 320x200 chunks, and convert them to indexed colour with photoshop, but tell it you want it to use your palette, not whatever it happens to come up with. Do your future art in DP. |