Go Penguin WIP platformer for MSX 1

Pagina 13/16
6 | 7 | 8 | 9 | 10 | 11 | 12 | | 14 | 15 | 16

Van Manuel

Ascended (19320)

afbeelding van Manuel

04-07-2021, 21:39

Why not do something parabolic, like physics would tell us? Or isn't that good for a game?

Van albs_br

Champion (468)

afbeelding van albs_br

04-07-2021, 21:47

theNestruo wrote:

Oh, I see... As there are fewer 0s than -1s and 1s, the direction change is too quick.
As you are using way more values than I did (like 3 times more), try interleaving them for smoothness. Something like this: ... -1 -1 -1 -1 -1 0 -1 -1 0 0 -1 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 1 1 2 .... Not an accurate example; just the general idea; kind of "dithering" the values.

I followed your and @Grauw advices and the table now looks like this:

JUMP_DELTA_Y_TABLE:        			                                    ; jump height: 56 pixels
	db	-4, -4, -4, -4                                                  ; 4 steps / 16 pixels
	db	-3, -3, -3, -3, -3, -3                                          ; 6 steps / 18 pixels
	db	-2, -2, -2, -2, -2, -2, -2, -2                                  ; 8 steps / 16 pixels
	db	-1, -1, -1, -1, -1, -1,  0, -1,  0,  0, -1                      ; 11 steps / 8 pixels
.TOP_OFFSET_ADDR:
	db	 0,  0,  0,  0,  0,  0
.FALL_OFFSET_ADDR:
	db	 1,  0,  0,  1,  0,  1,  1,  1,  1,  1,  1
	db	 2,  2,  2,  2,  2,  2,  2,  2
	db	 3,  3,  3,  3,  3,  3
	db	 4
.end:

Play online link: https://webmsx.org/?MACHINE=MSX1&ROM=https://github.com/albs...

Van erpirao

Paragon (1314)

afbeelding van erpirao

04-07-2021, 22:05

good control, excellent playability

Van tfh

Prophet (3318)

afbeelding van tfh

04-07-2021, 22:26

That plays very very well Smile

Van wimpie3

Champion (435)

afbeelding van wimpie3

05-07-2021, 16:32

Ah yes, much better jump now!

Van albs_br

Champion (468)

afbeelding van albs_br

06-07-2021, 05:28

Now dealing with musics generated by Arkos Tracker 2 (for now using an example song included with the program).

Using the AKG player and following the steps pointed out by @thegeps, the music is playing perfectly, BUT uses around 20 scanlines of CPU time, and even worse, when it don't fit on a frame, freezes the machine.

Accordingly with the docs, the player lighter on CPU is the AKY, but this one I wasn't able to make work yet...

Van thegeps

Paragon (1176)

afbeelding van thegeps

06-07-2021, 06:59

Are you exexuting akg player from within the isr? This is the right way (if I'm not mistaken it abuses the stack, so if it's interrupted before the stack is restored...)

Van albs_br

Champion (468)

afbeelding van albs_br

07-07-2021, 13:51

That's right, I forgot this detail.
Now it's inside the hook (H.TIMI, I copied this part of code from MsxLib).
Good news, no more freezing.
Bad news, is corrupting all the screen.
The AKG player is heavy, it takes too much time to run.
The lighter AKY player is still not running.

Van thegeps

Paragon (1176)

afbeelding van thegeps

07-07-2021, 14:42

Did you remember to push af at the beginning of hooked routine and pop af before ret?

Van albs_br

Champion (468)

afbeelding van albs_br

07-07-2021, 14:55

Yep.
Code is here: https://github.com/albs-br/penguin-platformer/blob/master/In...

Haven't committed the current version, yet but the call to AKG Play routine is after the push AF, and before the ReadInput

Pagina 13/16
6 | 7 | 8 | 9 | 10 | 11 | 12 | | 14 | 15 | 16