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 - toonski84 - 06-05-2003 ...the latest rellib beta can load pcxs. *shuts up* Starting a fighting game - Kofman - 06-05-2003 thanks wiz Starting a fighting game - Kofman - 06-05-2003 I did it right this time. Verbatim nathan. It's not working. Here are the new files I used. I'm not sure what's going. http://www.geocities.com/kofman2155/ TRYINGAGAIN.zip Here is the updated code for it: Code: DEFINT A-Z Starting a fighting game - na_th_an - 06-05-2003 You did wrong the masks. You are using colour #255 for solid zones and colour #231 for transparent zones. You oughta use colour #0 for solid zones and colour #255 for transparent zones. Also, the sprites are using colour #255 for transparent zones, and they should be using colour #0. I've fixed the PCXs and it works just fine, so the only problem is that you mischosen the colour indexes. Starting a fighting game - wizardlife - 06-08-2003 www.angelfire.com/wizard/pigeoncarrier/trythis.zip You may have to change the file references. I've changed it so that it uses 16x24 sprites... this is more appropriate for your situation, I think. Try it and tell me what you think. Starting a fighting game - Kofman - 06-10-2003 Thanks wiz, I fixed the trial that followed the sprite which after that isn't much of an achievement I mean it was simply a LINE (0,0)-(320,200),0,BF but hey it was something. Their are flickering errors bellow 200 pixels. I'm too sure what's wrong with that. I love your whole gravity concept it's really creative. Looks like you took out the buffer, I thought that was the source of the flickering above bellow 200 pixels but apparently not cuase after I put it back into the program it still had problems in that same area. Thanks for reorganizing the pallate for me i would have never done it on my own. Took a few tries and a little help from a friend to get the clipping just right. Right now I'm doing animation cycles and trying to figure out the logic behind it For example I'm going to assign each fram to a variable for example stand1 = 0 stand 2 = 1 .. ... .. kick2 = 12 and so forth. I thought that would help me organize and cycle better. I can't think of how to make it cycle between frame 0 and one when it's moving either left or right I tried a basic IF IF action = 0 THEN action = 1 IF action = 1 THEN action = 0 For some reason it didn't work I'm a little confused on why oh that's right I had it put like this PUT (x,y), sprite(0,action), PSET well it wasn't PSET, and there was more to it. You know the drill. But the concept was that. And in my mind it should have worked. What the hell am I doing wrong here. I mean this is just a general breathing routine. I haven't done kicks and punches yet. Also thanks allot for puting in acceleration and things like that. I'm definatly going to save the code but I'm going to need to change it to make it stop when the key is let go. After all it is a supposed to be a fighting game. Starting a fighting game - ak00ma - 06-10-2003 Make it like this: Code: If action=1 then Because in your code, when action is equal to zero, action will be set to one, and after that there's the second if clause which makes it to zero again. So it doesn't change at all... Starting a fighting game - na_th_an - 06-10-2003 Code: action = ABS(NOT action) does just the same Starting a fighting game - Ninkazu - 06-10-2003 Or you could make it the nice one-liner way: Code: IF action = 1 THEN action = 0 ELSE action = 1 Starting a fighting game - wizardlife - 06-10-2003 Quote:I'm going to need to change it to make it stop when the key is let go. After all it is a supposed to be a fighting game. Even if the acceleration is very slight, it should be there. You can use the constants at the top to tweak that. Ideally, you should load different attributes for different characters, but I don't think you have time for that right now. For decelleration, simply subtract from the plrXchng value a decelleration constant every cycle: CONST decel = 0.1 if plrXchng > 0 then plrXchng = plrXchng - decel if plrXchng < 0 then plrXchng = plrXchng + decel Alternatively: plrXchng = plrXchng * 0.9 |