123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|680|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> Number-Link

Wed, 22 Jun 2016, 05:45
spinal
I don't suppose anyone knows of a random level generator fro a number-link style game?

-=-=-
Check out my excellent homepage!
Wed, 22 Jun 2016, 05:45
Jayenkai
What's a Number-Link game?
Wed, 22 Jun 2016, 06:45
spinal
Sorry - https://en.wikipedia.org/wiki/Numberlink
Wed, 22 Jun 2016, 07:23
rockford
I've done loads of puzzle games, but not that one.

It shouldn't be too difficult - the cells can only be occupied by one link.

I would search an XxX array for a space and assign it a maximum number. Then do a recursive loop, checking if there was an available space next to the selected square in one direction only (up, down, left or right). If there's a space move to that square and repeat process, reducing the max number. Repeat until max number is zero or no available moves for that line. Place the current number count at the very start and end positions. increase number. Repeat the process until the grid is filled and there are no possible moves. Obviously you have to error check that you don't create single squares that can't be linked throughout.

In theory...
Wed, 22 Jun 2016, 09:40
Jayenkai
This is messy as fuck!

Kinda works, though...

Space to Generate
Return to Show Solution

BlitzMax, btw!



-=-=-
''Load, Next List!''
Sun, 26 Jun 2016, 05:34
spinal
Bah, Max doesn't work very well on my machine, not rure what the issue can be, but my menus don't actually 'work'.

-=-=-
Check out my excellent homepage!
Sun, 26 Jun 2016, 07:03
Jayenkai
I think it's Windowblinds. Mine broke shortly after installing that.
Hit alt, then cursor around the menus. That works for me.

-=-=-
''Load, Next List!''