30

I added made a corrections where it's required, but result hasn't any changes:

if((p1&JOY_UP)&&((y<=112)&&(y>0))) scrl_y--; if((p1&JOY_DOWN)&&((y>=208)&&(y<224))) scrl_y++; if((p1&JOY_LEFT)&&((x<=32)&&(x>0))) { scrl_x--; if ((scrl_x>FRONT_MIN_X)&&(enemyX<320+(enemy_spr.maxWidth*16))) { enemyX++; aSpriteSetPos(&Enemy,enemyX,enemyY); } } if((p1&JOY_RIGHT)&&((x>=288)&&(x<320))) { scrl_x++; if ((scrl_x<FRONT_MAX_X)&&(enemyX>0-(enemy_spr.maxWidth*16))) { enemyX--; aSpriteSetPos(&Enemy,enemyX,enemyY); } }
avatar

31

What is a best way to realize a coordinates sytem for objects into the game wolrd you all can advice?
avatar

32

All four If statements have the issue pointed out below....

if ((scrl_x>FRONT_MIN_X)&&( (enemyX<320) + (enemy_spr.maxWidth*16)))

I think this is questionable
(enemy_spr.maxWidth*16)

Suppose your sprite is 5 tiles wide most of the time but you have a super move that makes your sprite 20 tiles wide.
MaxWidth will be 20 and that will cause issues when your player is tested against the edge of the background.

Suppose your sprite is only 5 tiles wide. If your sprite has transparency then the edge of the sprite may not perfectly
appear against the left/right side of the background. Their could be invisible space between the sprites foot and the background edge.

What is a best way to realize a coordinates sytem for objects into the game wolrd you all can advice?

Every draw type has an X,Y coordinate so it is always good practice to keep them in variables that you can print to the screen.

EX: Print Player 1 (X,Y,)
EX: Print Player 2 (X,Y)
EX: Print Scroller (X,Y)

Now you can debug your code and see if player 1,2 is moving more than the scroller is and vice versa.

Personally I would move my sprite to the far left side of the screen and write down the Idle X coordinate.
Then I would move my sprite to the far right side of the screen and write down the Idle X coordinate.

I would start by hard coding those values into my logic and I would not use "maxWidth" for this purpose for the reason I described above.

The power of print statements is underestimated. They are my life blood when developing on the Neo.....
At some point you might want to make a sick little debug hud that your sprites, scrollers and pictures can plug into.
The reason is specific variables such as X,Y are constantly staples so why not make a reusable function that reads and displays those values among others?

This should be very helpful on your quest....

http://yuanworks.com/little-ninja-dev-smart-camera-movement/

33

Mega Shocked (./32):Every draw type has an X,Y coordinate so it is always good practice to keep them in variables that you can print to the screen.

EX: Print Player 1 (X,Y,)
EX: Print Player 2 (X,Y)
EX: Print Scroller (X,Y)

Now you can debug your code and see if player 1,2 is moving more than the scroller is and vice versa.

Thank you. Now you can see, how insane values use to be accepted with enemyX variable after player's stepping over some places of scroller.

Mega Shocked (./32):if ((scrl_x>FRONT_MIN_X)&&( (enemyX<320) + (enemy_spr.maxWidth*16)))

I tried to use it also. Then, although a bug with enemy right shifting after right scrolling is disappeared, but enemy's "untouchable double" at the right edge of scroller appeared again.
avatar

34

VasiliyFamiliya (./33) :
Now you can see, how insane values use to be accepted with enemyX variable after player's stepping over some places of scroller
It happens because you use variable width and don't clear the display. So if you display "1234" then "567", you get "5674".

Quick-and-dirty solution: add some space characters after the number.
Better solution: either clear the display, or use fixed width.

Mega Shocked (./32):
(enemyX<320) + (enemy_spr.maxWidth*16)))
This makes no sense.
Use parentheses and temporary variables, it will make your code easier to read and make bugs easier to find.
avatar
Zeroblog

« Tout homme porte sur l'épaule gauche un singe et, sur l'épaule droite, un perroquet. » — Jean Cocteau
« Moi je cherche plus de logique non plus. C'est surement pour cela que j'apprécie les Ataris, ils sont aussi logiques que moi ! » — GT Turbo

35

The video by the link above is updated.

Now I noticed enemyX stops to decrease (at -144) a bit earlier before walking player reaches the right edge of scroller first time.
avatar

36

Absolute shame I feel...Thanks for pointing this out Zerosquare.

I should have wrote

if ( (scrl_x>FRONT_MIN_X) && ( enemyX < ( 320+(enemy_spr.maxWidth*16) ) ) )

37

Mega Shocked (./36):I should have wrote

if ( (scrl_x>FRONT_MIN_X) && ( enemyX < ( 320+(enemy_spr.maxWidth*16) ) ) )

I used just this code before I get my bug.
avatar

38

At least I removed that freaky grey vertical strip in the right edge of scroller. However I still need a help with a camera.
avatar

39

Well, I must admit, this -

if ((scrl_x>FRONT_MIN_X)&&(enemyX<(320+(enemy_spr.maxWidth*16)))) { clearFixLayer(); enemyX++; //aSpriteSetPos(&Enemy,enemyX,enemyY); }
- piece of code was a stupidest way to prevent the enemy sprite "sliding down" to the contrary edge of map.
avatar

40

Now I finally found a secret of proper enemy sprite hiding after its visible area leaving:

aSpriteSetPos(&Enemy,enemyX,((enemyX>(0-(enemy_spr.maxWidth*16)))&&(enemyX<(320+(enemy_spr.maxWidth*16))))?enemyY:400);
How could I not to guess to use so simple idea before?

Now you can test a results!
avatar

41

Here is new version.

  • The "Game Over" screen after losing is added.
  • No more scrl_x and EnemyX debug text in the main function.
  • The code responsible for fix layer clearing during the scrolling is deleted.

tromb Fichier joint : shamanking.avi
avatar

42

As tu penser a utiliser l'interface de Samurai Spirit RPG, avec également la possibilité de faire les coups avec la manettes
pour le choix des coups capture en japonais mais il existe une version française qui a modifier les icones
ssrpg_0035.jpg
p941_4.png
inventaire en
ssrpg_0017.jpg
avatar
La Neo Geo CD à son site (en tout cas elle essaye...): http://neogeocdworld.info/
Le forum de la Neo Geo sur Yaronet: forums/264

Un petit site sur l'Atari Falcon avec plein de trucs bon pour votre poussin: http://falcon.ti-fr.com/

43

kuk (./42):
As tu penser a utiliser l'interface de Samurai Spirit RPG, avec également la possibilité de faire les coups avec la manettes
pour le choix des coups capture en japonais mais il existe une version française qui a modifier les icones
ssrpg_0035.jpg
p941_4.png
inventaire en
ssrpg_0017.jpg

Thanks for screenshots, but I don't speak French. Apropos Samurai Showdown - I'd like to get the Haohmaru's spritesheet ripped from first ever game of Samurai Showdown series: his poses and animations will have to become the base of Yoh Asakura sprites in the future.
avatar

44

kuk (./42):
As tu penser a utiliser l'interface de Samurai Spirit RPG, avec également la possibilité de faire les coups avec la manettes
pour le choix des coups capture en japonais mais il existe une version française qui a modifier les icones
ssrpg_0035.jpg
p941_4.png
inventaire en
ssrpg_0017.jpg

Also I must warn you - I prefer the Xenosaga style (player's characters status at the top of screen, list of avaiable attacks and its characteristics at the left bottom corner of screen, and enemy info+turns order+events at the right bottom corner of screen) of battle mode HUD. Like at these screenshots:

MbFb
U5vI
aaaa
2tpR
bRVf
CvbK
Zsbr
0OAB
txvT
7ueE
Ymc7
hITb
wVRR
y443
RXA6
avatar

45

Some new elements of HUD is added.

4leb
A7NE

Now, how to realize the damage number smooth per-pixel up movement(i. e. showing a messages not throught the fix layer) after attack?

P. S. The earlier buggy build by the link is replaced.
avatar

46

I was told that crt monitors will cut off a portion of the image. You should pad 8x8 from the top and 8x8 from the left to ensure the portrait image in the upper left corner is visible on crt monitors. Never align important details directly to the edges of the screen.

47

avatar
Zeroblog

« Tout homme porte sur l'épaule gauche un singe et, sur l'épaule droite, un perroquet. » — Jean Cocteau
« Moi je cherche plus de logique non plus. C'est surement pour cela que j'apprécie les Ataris, ils sont aussi logiques que moi ! » — GT Turbo

48

Mega Shocked (./46):
I was told that crt monitors will cut off a portion of the image. You should pad 8x8 from the top and 8x8 from the left to ensure the portrait image in the upper left corner is visible on crt monitors. Never align important details directly to the edges of the screen.

The previous link is updated once more.

TImY
y0j6
avatar

49

most games use an 8 pixel wide border on the left and right side of the screen. therefore it was thought for a long time that the resolution of the screen is only 304 in width.

wiki.neogeodev.org

"SNK recomends only using a centered 38x28 safe zone."

50

The start menu is added (load game choice is inactive yet because of memory card interaction functions lack).

Oh, by the way, about the memory card interaction functions - does anybody know how to contact with default45? The sources of his (or her?) program is already contains some pieces of code which can be potentially useful for MVS version of Shaman King - not work with a memory card only, but also interaction with a coin counter, high score table, etc.

tromb Fichier joint : 4fUY
avatar

51

I finally learned how to insert a BGM in game functions. Now I'll have to learn how to work with a SFX, and also it's should to think about the tracker- or MIDI-like files using as a BGM instead of whole WAV files for V-ROM space economy.
avatar

52

Hello
Sorry, i have not been active at all here for some time. If you want to contact me my email address is defalt@neoteam620.com
What pieces of code do you think would be useful? I'd love to contribute to your project, it looks very cool !
I dropped Neo programming a bit as I got more and more problems, but now the only thing I am missing to develop my game is the knowledge to create a hitbox system.

edit: no, in fact just consider I completely abandoned programming, this is just pissing me off I can't get anything working and I'm too dumb to do anything right
avatar

53

defalt45 (./52):
What pieces of code do you think would be useful?

Thank you. As I said already, this is functions responsible for work with memory card, and - for MVS version - interaction with a coin counter and high score table. Also I'll try to find in your sources all other functions important for my project, but which I forgot about.
avatar

54

Initial support of coin counters is added, but in the MVS version after entering to the game mode the start menu doesn't turns on, and credits indicators are disappearing for some reason. What did I wrong in the code?

tromb Fichier joint : m2zo
tromb Fichier joint : sYWc
avatar

55

My Gosh, it's so hard to seek out a necessary sample (ripped from KOF '94 with YM2610 ADPCM Decoder) aurally!

I finally added the fist or leg swing SFX during player's attack, but for some reason the playback of this samples is distorted. Does anobody know why?
Also I'd like to ask you to warn me if samples I used is wrongly found in fact (I searched a sounds of Terry's weak and middle punches and kicks).
avatar

56

the reason is how adpcm works (many samples in one big stream) and how it is converted into a wav file.

https://wiki.neogeodev.org/index.php?title=ADPCM (read 'Drifting')

I have told you that this way is feasible but also a lot of work and the quality is not the best.

kof94vrom_0_o.png

I did a little test with kof94, loaded all roms (6mb) and then tried to detect the samples automatically, this doesn't work perfectly (some samples aren't separated correctly yet) but there are more than enough samples found already... seems to be a lot of fun with manual ripping!

57

blastar (./56):
the reason is how adpcm works (many samples in one big stream) and how it is converted into a wav file.

https://wiki.neogeodev.org/index.php?title=ADPCM (read 'Drifting')

I have told you that this way is feasible but also a lot of work and the quality is not the best.

Well, looks like it means, that it's will be need a reverse engineering of the KOF '94 disassembly to learn what swing sounds is according to Terry's attacks I mentioned previously, and rip this samples as a pieces of binary or assembly code (the first Samurai Shodown also might be an object of RE - the Haohmaru's fist/leg swing SFX from SSI will not badly fit for using in my project too). But unfortunately, I won't be able to do this RE because I don't know any assembly language.

By the way, what is the reason of problem with demo/title/game mode switching in the MVS version? And what the utility are shown on screenshot?
avatar

58

VasiliyFamiliya (./57): And what the utility are shown on screenshot?

this tool is just a small project I started because of your problem, I think it is a good addition to my NGFX toolchain.

- load all (not encrypted) VROMs of a game in correct order (this is important!)
- automatic analysis
- edit and load/save this information as an index file for archiving and sharing
- export selected samples as *.wav or *.nas/*.nbs (lossless)

maybe I'll release this within the next few days! wink

here is an example screenshot of SAMSHO, I'm not sure if the detection of a separation didn't work correctly at this point or if this samples belonged together.

samsho_0_o.png

59

blastar (./58):
VasiliyFamiliya (./57): And what the utility are shown on screenshot?

this tool is just a small project I started because of your problem, I think it is a good addition to my NGFX toolchain.

- load all (not encrypted) VROMs of a game in correct order (this is important!)
- automatic analysis
- edit and load/save this information as an index file for archiving and sharing
- export selected samples as *.wav or *.nas/*.nbs (lossless)

I'll release this within the next few days! :-)

here is an example screenshot of SAMSHO, I'm not sure if the detection of a separation didn't work correctly at this point or if this samples belonged together.

samsho_0_o.png

Thank you very much!
avatar

60

The reason of my sound bug is turned out to be the infinite looping of SFX inside of

if(turn==0) { if((p1e&JOY_A)&&phase==0) { phase=1; damage=1; attack_type=4; } if((p1e&JOY_B)&&phase==0) { phase=1; damage=2; attack_type=5; } if((p1e&JOY_C)&&phase==0) { phase=1; damage=3; attack_type=6; } if(phase==1) { if(x!=195) { aSpriteSetAnim(&demoSpr,1); x++; } if(x==195) { aSpriteSetAnim(&demoSpr,attack_type); //aSpriteSetAnim(&Enemy,4); if(attack_type==4) { send_sound_command(ADPCM_BMARY_ATTACK1); } if(attack_type==5) { send_sound_command(ADPCM_BMARY_ATTACK2); } if(attack_type==6) { send_sound_command(ADPCM_BMARY_ATTACK3); } if(demoSpr.currentAnim==0&&demoSpr.stepNum==0) { enemy_hp-=damage; textTimer=0; fixPrintf1(1,26,3,3,"Enemy lost %d HP.", damage); waitVBlank(); phase=2; } } } if(phase==2) { if(x!=87) { flipMode|=FLIP_X; aSpriteSetFlip(&demoSpr,flipMode); aSpriteSetAnim(&demoSpr,1); x--; } if(x==87) { flipMode&=~FLIP_X; aSpriteSetFlip(&demoSpr,flipMode); aSpriteSetAnim(&demoSpr,0); turn=1; phase=0; if(enemy_hp<=0) { send_sound_command(ADPCM_LOCATION); clearFixLayer(); clearSprites(1,192); SCClose(); waitVBlank(); return; } } } }
condition. I had to add an additional variable which allows to play punch/kick sound when its value is equal to 0 only, and switching to 1 just after first SFX playback, and returning to 0 at next "phase" only.
avatar