Go Penguin WIP platformer for MSX 1

ページ 13/16
6 | 7 | 8 | 9 | 10 | 11 | 12 | | 14 | 15 | 16

By Manuel

Ascended (18254)

Manuel さんの画像

04-07-2021, 21:39

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

By albs_br

Champion (343)

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...

By erpirao

Paragon (1230)

erpirao さんの画像

04-07-2021, 22:05

good control, excellent playability

By tfh

Prophet (3015)

tfh さんの画像

04-07-2021, 22:26

That plays very very well Smile

By wimpie3

Champion (368)

wimpie3 さんの画像

05-07-2021, 16:32

Ah yes, much better jump now!

By albs_br

Champion (343)

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...

By thegeps

Paladin (895)

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...)

By albs_br

Champion (343)

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.

By thegeps

Paladin (895)

thegeps さんの画像

07-07-2021, 14:42

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

By albs_br

Champion (343)

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

ページ 13/16
6 | 7 | 8 | 9 | 10 | 11 | 12 | | 14 | 15 | 16