Ninja Fight
Moderator: Mask of Destiny
Ninja Fight
Oh, well, here I go:
http://srb2town.sepwich.com/junk/nfight.bin
Very early prototype for a fighting game. Through for now you can only walk and "jump" (the jumping code doesn't do what it should, try to jump and you'll see ). Also there's only one character, through both players already work (use the second joystick for the second player, d'oh).
It only works in Fusion and Regen. Also, somebody tell me if it works in the real hardware please.
http://srb2town.sepwich.com/junk/nfight.bin
Very early prototype for a fighting game. Through for now you can only walk and "jump" (the jumping code doesn't do what it should, try to jump and you'll see ). Also there's only one character, through both players already work (use the second joystick for the second player, d'oh).
It only works in Fusion and Regen. Also, somebody tell me if it works in the real hardware please.
-
- Very interested
- Posts: 273
- Joined: Fri Feb 29, 2008 8:12 pm
- Location: United States
Wow Sweet!
Haha, i like the perfectionism of the line scrolling background, fake dithered shadow and more !
The jump is kinda nice too Even if its a bug, i wish you could keep it (as a protect/hipercut combo?)
You coded that in C ? or asm?
Genskmod just report this problem (but it should not be dramatic..)....
Haha, i like the perfectionism of the line scrolling background, fake dithered shadow and more !
The jump is kinda nice too Even if its a bug, i wish you could keep it (as a protect/hipercut combo?)
You coded that in C ? or asm?
Genskmod just report this problem (but it should not be dramatic..)....
Spy : 00202 Reg. 15 : an auto increment data of 0 is a bad idea!
Er, tile scrolling background Through the dithered shadow is a good one. Also check how it blinks. I actually figured it out by myself, but later I found out Gunstar Heroes uses this trick too. Good to go thenFonzie wrote:Wow Sweet!
Haha, i like the perfectionism of the line scrolling background, fake dithered shadow and more !
The classic teleport special move, I may do it later.Fonzie wrote:The jump is kinda nice too Even if its a bug, i wish you could keep it (as a protect/hipercut combo?)
Assembler.Fonzie wrote:You coded that in C ? or asm?
KMod reports that in all games because first it initializes all VDP registers to 0 (as the real hardware) and then it detects that and gives a warning. A bug in KMod really.Fonzie wrote:Genskmod just report this problem (but it should not be dramatic..)....Spy : 00202 Reg. 15 : an auto increment data of 0 is a bad idea!
BIOS hack? (remember the BIOS initializes the VDP by its own, also it writes a bit of stuff to RAM (exactly at $FFC000) to be able to do the bank switching properly). Actually I don't care, I write to all the registers
Anyways, that may be the cause of the warning in KMod. I just know absolutely all ROMs give that warning.
EDIT: er, shouldn't I have posted this topic in the "demos" subforum? (argh, stupid name, it should be more like "demos and games" :/)
EDIT 2: updated background. The Japanese characters say, literally, "Geisha" (according to Google XD)
Anyways, that may be the cause of the warning in KMod. I just know absolutely all ROMs give that warning.
EDIT: er, shouldn't I have posted this topic in the "demos" subforum? (argh, stupid name, it should be more like "demos and games" :/)
EDIT 2: updated background. The Japanese characters say, literally, "Geisha" (according to Google XD)
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
That game demo looks nice. I think the jumping bug is some stupid Bxx error.... my particle stuff did all kinds of weirdnesses until I found that one Bxx was wrong But then again, I have no idea how your stuff is written so..... anyway good luck. I'll test it on my MDs ASAP.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
This is the only piece of code that has to do with jumping:TmEE co.(TM) wrote:That game demo looks nice. I think the jumping bug is some stupid Bxx error.... my particle stuff did all kinds of weirdnesses until I found that one Bxx was wrong But then again, I have no idea how your stuff is written so..... anyway good luck.
Code: Select all
;-------;
; Jump! ;
;-------;
cmpi.w #199, d6
bne.s RunPlayerCantJump
btst.l #ILBitButtonUp, d0
beq.s RunPlayerCantJump
moveq #-28, d2
RunPlayerCantJump:
;---------;
; Gravity ;
;---------;
move.w d2, d3
addq.w #1, d2
asr.w #4, d3
add.w d3, d6
cmpi.w #199, d6
blt.s RunPlayerOnAir
move.w #199, d6
RunPlayerOnAir:
D2 = gravity (positive = downwards)
D3 = unused at this point (so free for anything)
D6 = Y coordinate (floor at 199)
Seriously, what's wrong with it? In C it would look as follows (converting right now, mind you ):
Code: Select all
if (y == 199 && (input & BUTTON_UP))
gravity = -28;
y += gravity++ >> 4;
if (y >= 199)
y = 199;
Thanks!TmEE co.(TM) wrote:I'll test it on my MDs ASAP.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
your game works perfectly on MD and I can't understand your ASM code... and I don't know C....
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
YAY!TmEE co.(TM) wrote:your game works perfectly on MD
TmEE co.(TM) wrote:and I can't understand your ASM code... and I don't know C....
- Jump code: if the player is on the floor (player's Y = floor's Y) and the up button is pressed, jump (set a negative gravity).
- Gravity code: first increase player's Y according to the current gravity. Increase gravity a bit. If player's Y is below the floor, make it to be on the floor.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
ok.... I hope you understand QB (that code is not too functional.... but it gives the idea):
Code: Select all
IF (PlayerY% = Ground%) AND JumpPressed% = 1 THEN ; if player is on ground and jump pressed, JUMP :)
Jump% = 1 ; set the jump flag
PlayerForce% = (anything) ; set the lifting power
END IF
IF Jump% = 1 THEN ; if JUMP is happening
PlayerY% = PlayerY% + PlayerForce% ; Player is off the ground with the power of lifting ;)
PlayerForce% = PlayerForce% - Gravity% ; but you can't deny the gravity, lifting power gradually decreases and player plumments back to ground
IF PlayerY% <= Ground% THEN Jump% = 0 ; and if ground is reached, no jumping action anymore
END IF
Last edited by TmEE co.(TM) on Sun Apr 13, 2008 4:53 pm, edited 1 time in total.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Wen you load your variables, you load them as words, including gravity:
But you save your gravity as byte:
Code: Select all
ROM:00000380 loc_380:
ROM:00000380 move.w 0(a0),d7
ROM:00000384 move.w 2(a0),d6
ROM:00000388 move.w 4(a0),d5
ROM:0000038C move.w $C(a0),d2
Code: Select all
...
ROM:00000448 move.w d5,4(a0)
ROM:0000044C move.b d4,$A(a0)
ROM:00000450 move.b d2,$C(a0)
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen