Page 2 of 5

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Thu Feb 08, 2018 11:04 pm
by Sik
Well, ABCD uses carry so you can concatenate multiple of them easily to do larger numbers... May want to add those values in RAM to make this easier (otherwise you need to use many rotations which is slow). At least it should be faster than the approach there (in terms of cycles).

Dividing would be the obvious easy option, the big issue is 32-bit division (which you'd need for large digit counts)... there are more specialized algorithms for this purpose, although they need large look-up tables if you mind the ROM space usage.

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Fri Feb 09, 2018 10:52 am
by mix256
Sik wrote:
Thu Feb 08, 2018 11:04 pm
Well, ABCD uses carry so you can concatenate multiple of them easily to do larger numbers... May want to add those values in RAM to make this easier (otherwise you need to use many rotations which is slow). At least it should be faster than the approach there (in terms of cycles).

Dividing would be the obvious easy option, the big issue is 32-bit division (which you'd need for large digit counts)... there are more specialized algorithms for this purpose, although they need large look-up tables if you mind the ROM space usage.
Yeah, come to think of it, how often do you actually score (pre-pubertal pun not intended) per frame. :)

So "having the BCD-add X times and then a cheap print" vs "having X easy u32 adds and then a complex print".
If X is 1...which is the normal case, unless you fire off some smart bomb or something, then we won't be gaining much.
So, once again, I do premature optimization.

Don't want to hijack SegaTims thread with this, though, so sorry SegaTim!

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Fri Feb 09, 2018 12:32 pm
by Stef
Exactly, BCD operations are never a bottleneck in a game as you rarely need it more than once per frame...

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Fri Feb 09, 2018 3:13 pm
by Miquel
Sik wrote:
Thu Feb 08, 2018 11:04 pm
Well, ABCD uses carry so you can concatenate multiple of them easily to do larger numbers... May want to add those values in RAM to make this easier (otherwise you need to use many rotations which is slow). At least it should be faster than the approach there (in terms of cycles).
Timing of rotations/shifts is depended of the arguments, for example (talking about register operations):
x << n will take 2+n*2 cycles
So x<<2 will be 6 cycles, and x<<3 will be 8 cycles.

Not that much really.

Note: [To anyone] I'm speaking from memory, if I'm wrong about the cycles tell me so but not crush my skull. Thanks.

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Fri Feb 09, 2018 4:21 pm
by Sik
I was thinking of 8-bit rotation on two long values which is 48 cycles in total (24*2) and you'd need to do it for every extra pair of digits in addition to another ABCD... doing it from memory directly is faster than that, besides requiring less instructions (and hence being simpler to understand).

Also you got the cycle count right for byte/word (add 2 more cycles for long).

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Sun Feb 18, 2018 12:41 pm
by SegaTim

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Sun Feb 18, 2018 6:41 pm
by mix256
But now you must have some of the palms as sprites, right? :)

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Sun Feb 18, 2018 6:43 pm
by cero
Reminds me more than a bit of Duke Nukem 1.

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Sun Feb 18, 2018 11:40 pm
by SegaTim
mix256 wrote:
Sun Feb 18, 2018 6:41 pm
But now you must have some of the palms as sprites, right? :)
Everything was so conceived.

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Mon Feb 19, 2018 7:34 pm
by Chilly Willy
cero wrote:
Sun Feb 18, 2018 6:43 pm
Reminds me more than a bit of Duke Nukem 1.
Yeah, it sure does. It's coming along nicely. Nice parallax effects.

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Sat Jun 09, 2018 10:51 am
by SegaTim
Work in progress. New screenshots:

Image Image

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Wed Jul 18, 2018 7:17 pm
by SegaTim
Work in progress...

New video - https://youtu.be/cs615CozC8k

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Thu Jul 19, 2018 12:11 pm
by Chilly Willy
Cool more action. The platform part is still a bit... sharp. You might want to round off the edges of the ground a bit... break up the stark up-down nature of the level a little. It doesn't seem natural.

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Wed Jul 25, 2018 8:48 pm
by SegaTim
Chilly Willy wrote:
Thu Jul 19, 2018 12:11 pm
Cool more action. The platform part is still a bit... sharp. You might want to round off the edges of the ground a bit... break up the stark up-down nature of the level a little. It doesn't seem natural.
This is normal?:

Image

Re: Project C - WIP - Sega Genesis / Mega Drive

Posted: Fri Jul 27, 2018 2:58 pm
by Chilly Willy
That's a little better, but what I was thinking was more along the lines of what you see in Rayman in the first area. Not exactly the same thing, but more like it. Or like some of the zones in Sonic. That's probably a better example than Rayman.