Log In  

0

Cart [#40674#] | Copy | Code | 2017-05-16 | Link
0

Drawing is now optimised in two ways:
1) Center of hexagone are pre-computed once, drawing use that.
2) No wall is ever redraw a second time

Comments and suggestions are welcome.

Cart [#40471#] | Copy | Code | 2017-05-11 | Link
0

This is a random maze generator, but the maze have hexagone "cell".
There is no game, no goal, it is just a demo.
To make it a bit more interesting, I provide an interface to modify the size and "shape" of the grid. By shape I mean non perfect hexagone that are taller in one or two directions.

Everything is draw with line and no sprite are used.
There is a lot of math to find the best scale and compute what lines to draw.

It is also unperfect because of the rounding, maybe I should work out to only work with integer to avoid the rounding side effect.

Once optimised I will need to see if it would be workable to draw the map in 30 fps to use that in game.

Please test and give me your comment.
Or better, also check the code and give me your comment.

P#40474 2017-05-11 17:04

Log in to post a comment

user:
password:

New User | Account Help
:: New User
X
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2017-10-23 19:09 | 0.281s | 1572k | Q:25