|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
|
[SMS] Homebrew Jumpy my very first developpement, be kind
Posted: Fri Jul 17, 2020 1:22 pm
|
Hello,
this my very first attempt to develop a masyter system game, with the C devKit. All made by hand sorry for the crappy graphics and music. I'd like some advice/comments on my code, there are some stuff i don't unerstand well , my jumping sound is crappy for exemple. you can check my source code there on github : goliathe999/jumpy there a lot of comments (in french) for newbies like me . |
|
|
Posted: Fri Jul 17, 2020 2:23 pm |
I can't really comment on the code, as I'm not much of a C programmer. I only use it for little custom tools and the like.
I think the graphics and sounds are perfectly fine. The game itself is brutally hard, though. I manage to jump over the first enemy only about 30% of the time, and even if I manage this, the next one always gets me. I feel that the movement of the player is painfully slow compared to the super-fast enemies. Also, the collision detection doesn't seem to be very generous to the player. I'd like to suggest not making the enemies rush the player immediately. How about spawning them along the way if the player moves a few steps? Then it wouldn't be quite so overwhelming. Another thing: You really want to hide your leftmost column when scrolling horizontally. Make sure you set the appropriate bit in the VDP register. Nevertheless, this is very nice work for a first try. Keep at it, I'm looking forward to seeing this developed further. |
|
|
Posted: Fri Jul 17, 2020 2:36 pm |
Thanks for your feed back , i'll improve these points ;) |
|
|
Posted: Fri Jul 17, 2020 3:56 pm |
Hi, Goliathe
you can improve a little bit your code. Use struct for entities (object, player, monster,...) instead of direct declaration in ram. Like this : typedef struct { unsigned int posx; unsigned int posy; unsigned char * meta; signed char vx; signed char vy; unsigned char pv; unsigned char power; unsigned char bullets; unsigned char speed; unsigned char weapon; } HERO; HERO player; Then you can easily access / update values in it like this (and far more clear !): player->posx = 0x80; For multiples objects MONSTER monster[nb_monsters]; Then (example) void update_monster(){ MONSTER * pMonster; pMonster = &monster[0]; //point to the 1st entity pMonster->posx = xx; ... } SDCC is very nice (but not perfect), you can also put some ASM inline (not really for beginners thought) void function(){ __asm ... __endasm; } and you can place your RAM variables at an exact place example; __at(0xD000) unsigned char ram_loader[128] = {0}; |
|
|
Posted: Fri Jul 17, 2020 5:05 pm |
you're probably using a jumping sound that needs both channel 2 and 3 so
PSGSFXPlay(jpcomp_psg,SFX_CHANNEL3);
should be PSGSFXPlay(jpcomp_psg,SFX_CHANNELS2AND3);
also, double check that you converted it from the VGM using the correct '23' flag at the end, as in vgm2psg jpcomp.vgm jpcomp.psg 23
if your SFX is using both channels |
|
|
Posted: Fri Jul 17, 2020 5:25 pm |
Thanks i have style trouble with pointer notion. And not very good in asm, i m à php dev in rela life.. So C is suite à big step for me but thanks for your help. |
|
|
Posted: Fri Jul 17, 2020 5:38 pm |
Thx i check that too 😎 |
|
Revo
|
Posted: Fri Jan 08, 2021 10:14 am |
Page created: https://www.smspower.org/Homebrew/Jumpy-SMS | |