Main forum > GLBasic - en

speeding up mathematical operations?

<< < (2/2)

Kitty Hello:
Most of the times its your algorithm. Invert a loop here, use an array instead of a loop there...

svenart:
thank you all for your answers. My generator needed around 300-000 and 2.million attempts to randomly create a binary puzzle, but when I generate for 12x12 instead of 8x8 it takes like 100 times longer (minutes). Meanwhile I have updated the program and it is working much faster. However, after I realised that i need not only a grid of 0 and 1 that is working, but also it must be ensured that the player can solve it (depending on what fields are visible at the beginning). i really lost any hope for the moment to solve this problem. Thank you all again!

Ian Price:
Please do come back to this - while puzzle games aren't generally as popular as other genres, they do garner a good following and there's always room for more, especially ones like this that aren't paerticularly well known.

As for starting positions, yeah, selecting a start for a solvable puzzle is tricky. You could start by making a percentage of cells visible (or make have it varied based on player difficulty), and then create a system that can try to solve the puzzle. If it can't,  re-select the start clues.

Navigation

[0] Message Index

[*] Previous page

Go to full version