Very simple Maze game

63 views
Skip to first unread message

Arvis Lācis

unread,
Jul 19, 2015, 8:39:19 AM7/19/15
to androi...@googlegroups.com
Hello all DroidScripters,

Just wanted to share with you my first game in DroidScript - "Maze" - which I created in one of my study subjects ("Programming Tools").

In general game is very basic and simple although has some configuration options.
Originally it was developed in Latvian (variable names, outputs etc.) but recently I have re-factorized everything into English.

 In some situations game has some little bugs, problems - I am just too lazy to continue work on this project (at the moment) - but I hope that it would useful for someone, you can freely use and modify my code.

I would be very grateful for any comments, suggestions...
Maze.spk

Michael Seymour

unread,
Jul 19, 2015, 8:56:46 AM7/19/15
to androi...@googlegroups.com
I started a custom game and set the size really high, started it and instantly thought "Nope". I love it! I'll definitely be studying the code for this
:-)

Arvis Lācis

unread,
Jul 19, 2015, 9:18:15 AM7/19/15
to androi...@googlegroups.com
Thanks for your comment.

The maximum maze size can be set up to 115 although it may be almost unplayable in phones with small screen size and low resolution (because walls and paths are almost 1-2 px wide). The maze generation time also depends on CPU power of your phone.

As I mentioned before and will repeat again, game is very simple so there is not very deep algorithm underneath and also source code may be rewritten in more efficient way but that's way feel free to experiment with this code. :)

Michael Seymour

unread,
Jul 19, 2015, 11:47:04 AM7/19/15
to androi...@googlegroups.com
The rest of the code I understand. It's the maze generation code that's got me stumped, which is awesome because in picking through it to understand how it works I'll be both having fun and potentially improving my javascript knowledge. I'm a beginner really, so anything like this is wonderful to learn from despite your insistence that it's simple and/or inefficient :-)

Arvis Lācis

unread,
Jul 19, 2015, 11:53:34 AM7/19/15
to androi...@googlegroups.com
Yes, maze generation code is a bit hard but there could be a lot of improvements. Although it uses recursion and randomly mixed destinations to creates paths - the generated maze in the most of cases isn't so hard (there are only few "cross-roads").

Martin Murray

unread,
Jul 19, 2015, 4:12:12 PM7/19/15
to androi...@googlegroups.com
Nice game

sankarshan dudhate

unread,
Jul 25, 2015, 6:28:17 AM7/25/15
to AndroidScript
Thats great... Keep ot up!
Reply all
Reply to author
Forward
0 new messages