|
Post by emuvvx on Mar 31, 2018 0:05:18 GMT -5
Hi folks. I'm experienced with BasiEgaXorz since 2011, but I did not any game since that. I didn't have programming school focused ON game programming, so gimme a break. I posted a noobie question here in 2015 called "graphics showing up broken and taking wrong palete". My current code is heavily based on this code I was typing three years ago. Since that, I had to halt the project, but I remembered many things after look during almost two weeks uninterruptly, and here's my code with some plausible achievements. Well, my question is...I'm trying to do a 2D fighting game alike any K.O.F. or Street Fighter. I draw the animation frames on paper and snap it with a Cell Phone camera and colour on the computer using the image viewer IrfanView. After, I use the RetroGraphicsToolkit to quantize. I think I need a routine to empty/flush/clear the VRAM before load many tiles. The frames are large by now (160 x 185 pxs or ~460, ~440 tiles) and I need a lot to do the opening, Special Moves sequences or to the character merely throw a punch. The same suits for CRAM - or to whatever pallettes goes. I'm sendind the code and the .bin ROM image. If you need the additional files, just ask. The game shows a japanese lolita-alike character with 3 animation frames to simulate she is breathing in stand mode. If you press A on the controller, she perform a forward punch. If you hold A, you hold the punch frame on the screen. If you release, it happens a bug on the 3-frames animation, with the "punch frame" taking place between them, in the place of the original first one. Due to this, it takes the first frame pallette and gets miscoloured. D-pad left and right moves the girl, but forward movimentation is purposely faster than back. No other button performs actions. So, guys, I ask for help again. Thanks in advance. KOF_MD.bin (69.49 KB) cls
loadtiles exp_UF_hn,480,1
loadtiles exp_UF_hn2,460,480
loadtiles exp_UF_hn3,440,900 '460 is the correct tile quantity, but if set such, a bug happens.
pallettes pallettedata,1,0,16
pallettes pallettedata2,2,0,16
pallettes pallettedata3,3,0,16
setgfxplane SCROLL_A
BGColor 2,1
Dim MapClear(3) as Integer
X=0
do
drawtilesinc 1+pallette(1),0,0,20,24
sleep 20
drawtilesinc 480+pallette(2),0,0,20,23
sleep 20
drawtilesinc 900+pallette(3),0,0,20,23
sleep 20
if joypad(0).3=1 then
For X=0 to 3
DrawTile MapClear(X)+pallette(1)+1,X
scroll right,10
sleep 1
Next X
endif
if joypad(0).2=1 then
For X=0 to 3
DrawTile MapClear(X)+pallette(1)+1,X
scroll LEFT,5 'I know the character moves back slowly than forward. It's just to understand how things worxs.
sleep 1
Next X
endif
if (joypad(0).6=1) then
loadtiles JN_UF_,380,1
pallettes pallettedata4,4,0,16
'ink 3
drawtilesinc 1+pallette(4),0,0,20,19
WaitPadUp 0
cls
endif
loop
pallettedata:
datafile \hn_pal.bin,bin
pallettedata2:
datafile \hn_pal2.bin,bin
pallettedata3:
datafile \hn_pal3.bin,bin
pallettedata4:
datafile \JN_pal.bin,bin
exp_UF_hn: datafile \exp_UF_hn.bin,bin
exp_UF_hn2: datafile \exp_UF_hn2.bin,bin
exp_UF_hn3: datafile \exp_UF_hn3.bin,bin
JN_UF_: datafile \JN_UF_.bin,bin
|
|
|
Post by emuvvx on Mar 31, 2018 0:17:11 GMT -5
Seizing the opportunity, take a look at my video tutorial, teaching how to photograph sheets of paper and turn a cell phone into a scanner. But the video is in Brazilian Portuguese (English version at any time). www.youtube.com/watch?v=RsulDXlDyuo
|
|
|
Post by emuvvx on Mar 31, 2018 0:34:09 GMT -5
"What the hell is this"?!?! Well... I'm asking for help, not for the Hell. If you're looking for any SF or KOF character, Mr. Akuma, you missed the place. So, what the hell are YOU trying to say?
|
|
|
Post by Oruam on Mar 31, 2018 0:37:14 GMT -5
I dont know enough to me, but I have post here my first edition of a Fight Engine. Perhaps it could help you.
|
|
|
Post by Oruam on Mar 31, 2018 0:39:04 GMT -5
"What the hell is this"?!?! Well... I'm asking for help, not for the Hell. Click on my avatar and check my posts, perhaps any could help you!
|
|
|
Post by wraith on Mar 31, 2018 1:25:35 GMT -5
Re-Read this thread... hereYou're loading too many tiles with an incorrect start address. +Palette(4) - Palette "4" doesn't exist. 0 to 3
|
|
|
Post by Oruam on Mar 31, 2018 2:14:38 GMT -5
Seizing the opportunity, take a look at my video tutorial, teaching how to photograph sheets of paper and turn a cell phone into a scanner. But the video is in Brazilian Portuguese (English version at any time). www.youtube.com/watch?v=RsulDXlDyuoEu posso te ajudar! I can help you!
|
|
pico
PooP MonkeeH
Posts: 8
|
Post by pico on Mar 31, 2018 10:14:04 GMT -5
You should only have one animation frame loaded in the VDP at the same time. For example, Street Fighter II has a address space of 80 tiles reserved for each character. When a character changes animation frame the required tiles are loaded into this space, overriding the tiles of the previous frame.
|
|
|
Post by emuvvx on Mar 31, 2018 14:28:00 GMT -5
Seizing the opportunity, take a look at my video tutorial, teaching how to photograph sheets of paper and turn a cell phone into a scanner. But the video is in Brazilian Portuguese (English version at any time). www.youtube.com/watch?v=RsulDXlDyuoEu posso te ajudar! I can help you! Yes, I accept your help. By the way, you already invited me to get into your dev team through WhatsApp and I am already doing some illustrations to the fighting game project.
|
|
|
Post by emuvvx on Mar 31, 2018 14:52:28 GMT -5
Re-Read this thread... hereYou're loading too many tiles with an incorrect start address. +Palette(4) - Palette "4" doesn't exist. 0 to 3 Re-read! Three times! Yes, I understood the hint. Thanks wraith guy. Palette 4... tsc, tsc, tsc... If it was a snake, it would bite me. wraith, I tried your hints, but no sucess on the frame bug nor on the palette. Surely, I tried A LITTLE, but paying attention. But I didn't tried several exausting tiring times. Again, any help is welcome. I'm taking a look at Oruam code. It works but it's totally different from mine and requires me to have the Photoshop image editor to "shatter/shred" the images into pieces of 16 or 32 pixels (dunno).
|
|
|
Post by emuvvx on Mar 31, 2018 15:06:43 GMT -5
You should only have one animation frame loaded in the VDP at the same time. For example, Street Fighter II has a address space of 80 tiles reserved for each character. When a character changes animation frame the required tiles are loaded into this space, overriding the tiles of the previous frame. Yeah, man. Nice hint. Thanks. Although I already had imagined something alike this: the routine to clean the VDP RAM supposing many of my frames/tiles are too big to fit the tiny VRAM. So, for please, could you give me an example of routine that override the memory of the VDP? The cartridge is read/refreshed during the whole time, isn't it? Does it overcharge the MegaDrive/Genesis CPU?
|
|
|
Post by tiberiyltim on Mar 31, 2018 16:58:53 GMT -5
loadtiles in animation moment:
|
|
|
Post by wraith on Mar 31, 2018 17:51:05 GMT -5
Applause to you for artistic creativity.
The important part is that you are trying, and as you can see there are many here willing to help.
And yes VRAM can be overwritten as needed as seen in Tim's example.
|
|
|
Post by Oruam on Mar 31, 2018 19:51:47 GMT -5
You should only have one animation frame loaded in the VDP at the same time. For example, Street Fighter II has a address space of 80 tiles reserved for each character. When a character changes animation frame the required tiles are loaded into this space, overriding the tiles of the previous frame. Yeah, man. Nice hint. Thanks. Although I already had imagined something alike this: the routine to clean the VDP RAM supposing many of my frames/tiles are too big to fit the tiny VRAM. So, for please, could you give me an example of routine that override the memory of the VDP? The cartridge is read/refreshed during the whole time, isn't it? Does it overcharge the MegaDrive/Genesis CPU? You can load the 64KB of ram like buffer inside de same Do Loop on the same sprites group each time, but I know a trick to do it X times. It is simple, you just need a code like this: Addsprite= Player(4,4) guard: If guard=1 then punch=0 propsprite 1frame,0 movesprite X,Y loadtiles (frameA),0 punch: if j.5 then punch=1 guard=0 loadtiles (frameB),0 Datafile: frameA Datafile: frameB Obs.: Please note that I just wrote it on cellphone and it is missing some codes, I dont remember all far from computer, but is the way to use DMA to replace with a new binary tile the same sprite of your player, works on any Mega Drive and also on Bex or Second Basic.
|
|
|
Post by nemezes on Mar 31, 2018 20:07:44 GMT -5
Even on the game, like street fighter, is it better to use drawtilesync than sprites? For the players characters
|
|