News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Nicky Boom for CPC ?

Started by LTronic, 12:54, 04 August 19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Should I port it to ?

CPC 6128 "Old" (not sure I can fit it)
12 (31.6%)
Plus machines on a 512K cart (it will fit)
26 (68.4%)
I don't care about this game
0 (0%)

Total Members Voted: 38

LTronic

#50
I have both game rendering and partial game logic working right now but it needs some debug (buggy character / tilemap collision right now).Hopefully next step should be the demo map playable with main character but no enemies.


I need to refactor / shrink the data structures of the game which are the main culprit.
Each object is 39 bytes in memory, up to 453 of them.Each animation is 43 bytes in memory, up to 282 of them.


I will probably need to decimate maximum amount of animations to 256 so I can use 8-bit index instead of 16-bit index or pointer to save memory on these "live" structures.
This would also help optimize the code making far too much use of 16-bit and pointer calculation leading to huge generate code size, even if I mitigated in a lot meanwhile).
I think I will need to write an animation editor in order to do this and "relink" each animation frame properly (Original game use kind of linked list).

So I'm working on the codebase and tools for conversion :
=> Tool to batch process and shrink all the original data (called convcpc) including tileset, tilemap, tile flags, monster data, various helper data
=> Tool to dump all sprites and automatically resize and convert to CPC format



Gryzor

(removed formatting to make it more readable and get rid of some text tags)

LTronic

Hello,


I have converted all the original Amiga MODs using Arkos Tracker 2, my basic knowledge of soundtracking software and well... trial and error.
I'm no musician sadly, so I am a bit stuck.
The current result is sometimes good, sometimes ugly.

I am 200% sure it could be waaaay better even if I understand the 3 channels limit and the AY chip is nothing compared to Amiga sample playback capabilities.
All the original MODs share the same 15 instruments so I think it's basically finding / building the right ones and adjusting (I transposed everything by -24 so 2 octaves down if I am right and it seems to sound not too bad most of the time).

If anyone is willing to have a look at it, I have attached my current AKS file (AT2 latest build) and original MOD files.
Of course any people helping on this will be credited properly.


Thank you for any good will :)


LTronic

Sorry, but I need help again.
I got the whole game code fitting, I have a small kernel and the game code splitted into two 32KB banks with a system of trampolines for calling routines between modules.
I am relinking the 3 modules with a little bash magic by parsing the symbols table / map table files and generating header files with addresses.


It seems to work fine but my efforts are plagued by some bug in iDSK tool.


I tried iDSK-013 from CPCTelera 1.4.2, I tried latest GitHub iDSK from cpcsdk GitHub compiled from source, but the behaviour of it is not consistent, it seems to randomly fail to add a file to DSK (I can see the error message Cannot open nicky.dsk) and/or to provide corrupt DSK files.

Has anyone encountered the issue ?
I already had the issue on Windows 10 with Cygwin64, switched to an Ubuntu 18.04 x64 VM, same issue...
Any other tool to circumvent the issue ?


Also I'm having hard time debugging the code (I have some random crashes at game startup, hard to reproduce). I am using RetroVM but is there any better option to debug a SDCC / CPCTelera project ?


I am considering opening my GitHub private repo as soon as I have something stable.
I can provide source code meanwhile if you want to have a look it's fairly documented and easy to build.


PS : Anyone interested for help on the music side ? I would not also mind some graphic help at a later stage.

Targhan

I don't have time to help on the music side (but I can help on the use of AT2), sorry.
However, my advice is to convert the music from scratch, don't try to use/emulate the original sound, it is only a loss of time in my opinion, and the result will not be optimum for the PSG. Any good musician can convert the song from ear or from the original music on the side, and will create the right sounds directly in AT2 (for example). If the musician can not... Then don't bother with him, and ask for another one :).
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

LTronic

Quote from: Targhan on 22:54, 28 August 19
I don't have time to help on the music side (but I can help on the use of AT2), sorry.
However, my advice is to convert the music from scratch, don't try to use/emulate the original sound, it is only a loss of time in my opinion, and the result will not be optimum for the PSG. Any good musician can convert the song from ear or from the original music on the side, and will create the right sounds directly in AT2 (for example). If the musician can not... Then don't bother with him, and ask for another one :) .


No problem and thanks for your help. I know some pro chiptuners (so they would probably charge) but no one with AT2/AY experience so I will try to sort that later.

TotO

I have voted for "Plus machines on a 512K cart" because you have a PLUS, so do for your computer first.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

LTronic

Hello,

Here is attached a current DSK of the project.
Please bear the pink background and intentional "crash" if going far right of the map limit (40x50, I have space to extend to 50x50 easily, maybe 80x50).


I have some issues using transparency sprites with cpctelera cpct_drawSpriteMaskedAlignedTable, I don't know why, my table alignment is correct (checked map file) and I tried every pen possible.


I am happy to give access to my GitHub to anyone interested in, just drop me a PM.


Any feedback welcome as usual ;)

Arnaud

Hi,
nice to see your project process but i wasn't able to run your game.

I use winape (with cpc+ configuration) and run"nicky"

For cpct_drawSpriteMaskedAlignedTable the transparency colour must be only 0

LTronic

Quote from: Arnaud on 18:04, 02 September 19
Hi,
nice to see your project process but i wasn't able to run your game.

I use winape (with cpc+ configuration) and run"nicky"

For cpct_drawSpriteMaskedAlignedTable the transparency colour must be only 0


Oh.. I will try tonight on WinAPE to fix it.


So if only transparence color 0 why can we generate tables for every pen ?

Xifos

Hello Ltronic,
Can you tell how you are performing the scrolling ?
Are you drawing each background tiles at every frame ?
And then drawing the sprite without saving/restoring background ?
:) 

Arnaud

Quote from: LTronic on 18:12, 02 September 19
So if only transparence color 0 why can we generate tables for every pen ?

If you create your own transparency tables for another color it should work.
The tables provided by cpctelera are done for only color 0.

LTronic

Quote from: Arnaud on 18:21, 02 September 19
If you create your own transparency tables for another color it should work.
The tables provided by cpctelera are done for only color 0.


I don't really got it I think.
For me color 0 = pen 0 and is the same as palette index 0, am I wrong ?


Regarding the DSK it's working for me on WinAPE 2.0b2 (using wine on OS X but should not matter).
There's a long back screen at startup doing multi load then a second big loading sequence at game startup.

LTronic

Quote from: Xifos on 18:19, 02 September 19
Hello Ltronic,
Can you tell how you are performing the scrolling ?
Are you drawing each background tiles at every frame ?
And then drawing the sprite without saving/restoring background ?
:)


Hello Xifos,
It's really barebones so far, and yes I am re-rendering the whole tilemap (each tile) at each frame because I am too short on memory to do some double buffering. And there's no real "scrolling" now I don't have into account X/Y scrolling [0-15] values the game passes back to the CPC engine (kernel) and just take into account the origin X/Y tile offsets.


I am aware of both soft scroll and hard scroll (video memory offset) methods but so far my tries were plagued :)


Any tip is welcome as I'm still learning.

Arnaud

Quote from: LTronic on 20:54, 02 September 19
I don't really got it I think.
For me color 0 = pen 0 and is the same as palette index 0, am I wrong ?
Yes, it's right

Quote from: LTronic on 20:54, 02 September 19
Regarding the DSK it's working for me on WinAPE 2.0b2 (using wine on OS X but should not matter).
There's a long back screen at startup doing multi load then a second big loading sequence at game startup.
Just tried again, i have got Microid logo, i wait then either reboot or stuck.




Xifos

Quote from: LTronic on 20:58, 02 September 19

Hello Xifos,
It's really barebones so far, and yes I am re-rendering the whole tilemap (each tile) at each frame because I am too short on memory to do some double buffering. And there's no real "scrolling" now I don't have into account X/Y scrolling [0-15] values the game passes back to the CPC engine (kernel) and just take into account the origin X/Y tile offsets.


I am aware of both soft scroll and hard scroll (video memory offset) methods but so far my tries were plagued :)


Any tip is welcome as I'm still learning.
On cpc old (i mean not the plus), that is not easy to answer.
:(
Hardware scrolling for a game like nicky boom would be at best like the one in prehistorik 2 and super cauldron (it is very hard to do, drawing sprite becomes complicated, you have to do split screen, use crtc register 5, crtc register 3...).
Software scrolling would be like the ones in batman the movie, robocop, stormlord.
But very hard to have such frame rates with software scrolling (i never understood how they could do such good software scrollings in these games).
But it is more like what you are doing : draw background tiles (with a byte offset for horizontal scrolling), and sprites.
And they managed to have double buffer (even with 64 k), which is hard to avoid in this situation...

LTronic

Quote from: Arnaud on 21:02, 02 September 19
Just tried again, i have got Microid logo, i wait then either reboot or stuck.


Wow that's strange. Can you share more information your your WinAPE version ?
I am using 2.0b2 with default configuration (Plus and ParaDOS right ?)

Arnaud

Quote from: LTronic on 22:39, 02 September 19
Wow that's strange. Can you share more information your your WinAPE version ?
I am using 2.0b2 with default configuration (Plus and ParaDOS right ?)
It works ! I don't why my winape was configured with 64k.

LTronic

Quote from: Arnaud on 18:11, 03 September 19
It works ! I don't why my winape was configured with 64k.


Great :)
I reworked my tile and sprite data to make sure they share the same palette with pen 0 (ugly pink) as transparent color (palette index 0), still transparency does not work.
Really weird I traced the assembly code with RetroVM + breakpoint and I can't find the issue.
Using cpctelera 1.5.
The example provided works fine still...

I also reworked the tilemap rendering to redo the job only when necessary, big speed boost :)

Arnaud

Quote from: LTronic on 19:36, 03 September 19
I reworked my tile and sprite data to make sure they share the same palette with pen 0 (ugly pink) as transparent color (palette index 0), still transparency does not work.
Really weird I traced the assembly code with RetroVM + breakpoint and I can't find the issue.
Using cpctelera 1.5.
The example provided works fine still...
Take one of your sprites generated and use it in the cpctelera example. You'll see if it's your sprites or your code who is causing the problem.

Quote from: LTronic on 19:36, 03 September 19
I also reworked the tilemap rendering to redo the job only when necessary, big speed boost :)
:)

LTronic

Quote from: Arnaud on 19:51, 03 September 19
Take one of your sprites generated and use it in the cpctelera example. You'll see if it's your sprites or your code who is causing the problem.
:)


It works. Turned out I was corrupting the mask table by a stupid memset..
Implemented preliminary dirty rect system, updated demo attached.


Thanks for your help again :)

Arnaud

It really better, the game is playable at this speed and Nicky is recognizable.

LTronic

Quote from: Arnaud on 17:56, 04 September 19
It really better, the game is playable at this speed and Nicky is recognizable.


Thanks a lot !
Any advice for crunching tiles and sprites ? I am planning on using LZ48.
Also a lot of sprites in original game are duplicated because flipped horizontally, I was thinking of remapping them and use cpctelera 1.5 drawHFlipSprite functions right or would it be too slow ?


Arnaud

Quote from: LTronic on 18:31, 04 September 19
Thanks a lot !
Any advice for crunching tiles and sprites ? I am planning on using LZ48.
LZ48 is really faster than ZX7 and was coded for this kind of purpose.

Quote from: LTronic on 18:31, 04 September 19
Also a lot of sprites in original game are duplicated because flipped horizontally, I was thinking of remapping them and use cpctelera 1.5 drawHFlipSprite functions right or would it be too slow ?
No it works very well, i flipped all player sprites when changing direction to reduce the feel of slow down.

LTronic

Quick update :
Project is not dead, far from it.
I managed to fit 90% of the data into the 6128 "old" RAM, currently fighting with the game objects logic code debugging which is thougher than expected.


SuTeKH/Epyteor offered help making some awesome musics, I hope to be able to make another playable build in the forthcoming weeks/days.

Powered by SMFPacks Menu Editor Mod