Release

MAZE CHALLENGE LEVEL 3

4

S3B4 2020-04-29 13:16

So when I saw the challenge I logically decided to directly jump to level 3.

Also I know that in the obsolete syntaxes it says to not use SPRITE.A n,(pal,fx,fy,pri,s) But I feel like this will take away some of the user friendliness because when most people see the memory map they just get confused. HECK I understand binary and I had to use the old SPRITE.A because kept putting the wrong number and eventually gave up


S3B4 2020-04-29 13:19

ALSO IF YOU WANT TO EDIT THE BG YOU HAVE TO USE CHARACTER 3 AS THE FLOOR AND NOT CHARACTER 2 KEEP THAT IN MIND


S3B4 2020-04-29 13:21

I updated it because I forgot to add a loop


Timo 2020-04-29 13:53

The recommended syntax is this:
SPRITE 0 PAL 2 SIZE 2 ...
I think this is the most user friendly. Maybe it's a bit hidden in the manual, because it's listed as a variation of the normal SPRITE command...


was8bit 2020-04-30 03:59 (Edited)

Very cool.... :)

Thank you for making and posting your MAZE AI program :)

... i will be putting it to the extreme test ....


was8bit 2020-04-30 04:34 (Edited)

Very cool code... however, I discovered a fatal flaw...

Inside your SUB FIND( ...)
You have a CALL FIND(...)

Which causes a crash with a message "OUT OF MEMORY"

You will need to redesign your code somehow without this fatal flaw... sorry :(

As is, on the extreme test, it wins no better than 1/10 attempts, failing with this error every other time...


S3B4 2020-04-30 13:09

Huh I didn’t know that recursive sumprograms could do that


was8bit 2020-04-30 13:14 (Edited)

You may want to try using a main DO LOOP, and use GLOBAL variables that provide feedback back to the main DO LOOP that allow the DO LOOP to make the same decision making your are doing at the current points inside the SUB ...then the DO LOOP can decide to continue one way with the SUB or a different way with the SUB..

The current problem is that NX is expecting a RETURN back out of the SUB and creates a memory record of each nested CALL ... I suspect that NX can only store 255 nested calls before it crashes...


S3B4 2020-04-30 13:21

In a modern programming language a recursive function like that would work but I forgot that now there’s memory limitations


was8bit 2020-04-30 13:24

Ah... well, technically SUB isn't the same as FUNC i am assuming... its kinda more like a fancy GOSUB...

A FUNCTION command in NX would add more power, but as is NX is already more powerful the original Lowres was....


Log in to reply.