SP4CEBAR 2024-07-15 10:18 (Edited)
Currently, it supports the gamepad and sprites, sound, and it has its raster effects installed.
Timo 2024-07-15 10:31
Good luck :O
SP4CEBAR 2024-07-15 11:47
Thanks, I'll need it
SP4CEBAR 2024-07-16 15:45 (Edited)
It's tricky to tweak the sound conversion functions because an LFO isn't the same as a sound line, and not all conversion factors are given inside the documentations.
For example, I assume the non-linear LFO rate of NX is an exponential function with a base of ( 18Hz / 0.12Hz ) ^ ( 1 / 15 ) = 1.396602
, also I'm not sure what the offset values are of the LFO's pitch and pulse width modulations.
SUB LOWRES_DEF_SOUND( INSTRUMENT, WAVE_, PULSE, TIME )
BUFFER_VOICE = 3
SOUND BUFFER_VOICE, WAVE_, PULSE * 15, TIME * 60
CALL COPY_INSTRUMENT( BUFFER_VOICE, INSTRUMENT, 0, 4 )
END SUB
SUB LOWRES_DEF_SOUND_LIN( INSTRUMENT, TIME, PITCH, PULSE )
IF TIME <= 0 THEN EXIT SUB
BASE_FREQUENCY = 0.12
TOP_FREQUENCY = 18
FREQUENCY = 1 / TIME
EXPONENTIAL_BASE = ( TOP_FREQUENCY / BASE_FREQUENCY ) ^ ( 1 / 15 )
'EXPONENTIAL_BASE = 1.396602
LFO_RATE = LOG( FREQUENCY / BASE_FREQUENCY ) / LOG( EXPONENTIAL_BASE )
PITCH = PITCH
PULSE = PULSE * 2
'PULSE = 0
IS_NEGATED = PULSE <= 0 AND PITCH <= 0
CALL CLAMP( LFO_RATE, 0, 15 )
CALL CLAMP( PITCH , 0, 15 )
CALL CLAMP( PULSE , 0, 15 )
BUFFER_VOICE = 3
LFO BUFFER_VOICE, LFO_RATE, PITCH,, PULSE
LFO WAVE 3, 1, ABS( IS_NEGATED ), 1, 1
CALL COPY_INSTRUMENT( BUFFER_VOICE, INSTRUMENT, 4, 3 )
END SUB
SUB CLAMP( V, L, H )
V = MAX( L, MIN( H, V ) )
END SUB
SP4CEBAR 2024-07-16 16:09 (Edited)
SP4CEBAR 2024-07-18 10:08
I think LowRes Coder's parallax scroller is a good benchmark and demo for this project.
SP4CEBAR 2024-07-18 11:25 (Edited)
SP4CEBAR 2024-07-23 11:03 (Edited)
SP4CEBAR 2024-07-23 13:55 (Edited)
was8bit 2024-07-23 14:31
Try testing with this ;)
SP4CEBAR 2024-07-23 15:12 (Edited)
Cool game! I think the LowRes Galaxy and the Parallax scroller will be plenty to test the main features of this library. Once this library works, I may look into sophisticated programs like yours.
The main challenges with developing this library are:
was8bit 2024-07-23 15:22
:)
SP4CEBAR 2024-07-23 15:35 (Edited)
Interestingly, LowRes Coder's 0.04 second smallest wait time is only 25 frames per second, and LowRes Galaxy even uses a 0.05 second wait time (20 fps) so performance shouldn't be that much of a problem anymore as it has two or three frames available for one game loop.
The disadvantage is that the user's tap controls don't work that well yet with all those delays
SP4CEBAR 2024-07-23 16:17 (Edited)
I just noticed that LowRes coder's tap only starts to miss some taps when the delay is at least 0.08 seconds, which is twice the minimum, this is easier to implement
SP4CEBAR 2024-07-23 20:56 (Edited)
SP4CEBAR 2024-07-23 21:02 (Edited)
SP4CEBAR 2024-07-23 21:07
If you leave the song playing for long enough, eventually the sound queues become full, and it struggles with playing.
SP4CEBAR 2024-07-23 21:12 (Edited)
Project phases:
SP4CEBAR 2024-07-26 21:22 (Edited)
SP4CEBAR 2024-07-26 22:58 (Edited)
SP4CEBAR 2024-07-27 00:38 (Edited)
SP4CEBAR 2024-07-27 00:54
14857 tokens :)
SP4CEBAR 2024-07-27 01:29
SP4CEBAR 2024-07-27 09:09
SP4CEBAR 2024-07-27 14:42 (Edited)
It is important that none of the subprograms modify any of the parameters passed to them as this will return a value which may modify a variable and alter the working of the LowRes program, or worse, it may modify a passed constant like OMIT_T
The subprograms shouldn't but might
SP4CEBAR 2024-07-27 19:00
SP4CEBAR 2024-07-27 19:59 (Edited)
SP4CEBAR 2024-07-27 20:10
SP4CEBAR 2024-07-28 16:10 (Edited)
The SCROLL CLEAR buffer (the lower text in the demo) is one ahead of the original (the upper text), so I think that my copying code always moves it one pixel to the left. Two copies cause a motion of two pixels to the left
Timo 2024-07-28 21:45
Seems like this little project went slightly out of control and became giant :O
Anyway, its results look interesting :)
SP4CEBAR 2024-07-29 10:31
I think so too... Thank you!
TrashCan Games 2024-07-31 09:08
This is really cool, Ill definitely get some cool uses out of this. I might try port some lowres coder programs over like stoners delight
SP4CEBAR 2024-08-01 19:16 (Edited)
Thank you!
Don't expect it to work as well though, certain features may be incomplete or missing, I can't guarantee that sprites work at all, user input should work, and most background graphics should work, but there may be some hidden bugs.
Anyways, good luck porting :)
SP4CEBAR 2024-11-18 17:26 (Edited)
I just browsed through the code and thought I could save some tokens by removing unrelated graphics API functions and making general shape-drawing functions: a parametric plotter and an area-between-two-math-functions plotter.
The new tokens could be used for an implementation of the PAINT command