[GAME] Minesweeper

195 views
Skip to first unread message

Symbroson Development

unread,
Oct 5, 2016, 3:31:09 PM10/5/16
to DroidScript
I wanted to make a bit more simple game - like Minesweeper. The graphics I made with pixelgraphics myself ;)
The code is hard to understand for now - I will fix it in my DropBox-version soon

Regards,
Symbroson

P.S.: does anyone knows other minigames I could program?

Minesweeper.spk

Symbroson Development

unread,
Oct 5, 2016, 3:58:07 PM10/5/16
to DroidScript
var 'mines' has the wrong default - it should be between 10 and 20 ^^

Symbroson Development

unread,
Oct 5, 2016, 4:34:34 PM10/5/16
to DroidScript
Im ready now with commenting and make the code more readable ^^
Link:

https://www.dropbox.com/s/gjcftds3vea5eb4/Minesweeper.spk

Message has been deleted

Symbroson Development

unread,
Oct 5, 2016, 5:23:44 PM10/5/16
to DroidScript
Commented it again - real now
If you have questions please ask ;)

Ca3m0n 0_0

unread,
Oct 5, 2016, 6:42:57 PM10/5/16
to DroidScript
It would be pretty cool if you made something like age of empires. I know of millions of people who would be eager to play. And I'd even help you make that. But testing your app now

Robbie Kendall

unread,
Oct 5, 2016, 6:45:34 PM10/5/16
to DroidScript
Age of empires would be a lot of work for javascript. Minesweeper looks cool bro.

Alex I always love your games, they really show off DroidScript

Ca3m0n 0_0

unread,
Oct 5, 2016, 6:45:57 PM10/5/16
to DroidScript
Just tried it that brings back memories from when I was like 6 lol

Symbroson Development

unread,
Oct 5, 2016, 6:46:54 PM10/5/16
to DroidScript
Thank you :)

Robbie Kendall

unread,
Oct 5, 2016, 6:59:58 PM10/5/16
to DroidScript
I won!
Screenshot_2016-10-05-17-57-08.png
Message has been deleted

Robbie Kendall

unread,
Oct 5, 2016, 7:02:10 PM10/5/16
to DroidScript
Lol it almost reset the game too quick for me to get the screen shot

Symbroson Development

unread,
Oct 5, 2016, 7:15:23 PM10/5/16
to DroidScript
I added restart button and removen timeout
Added Menu where you can set the size and the number of mines ;)

Robbie Kendall

unread,
Oct 5, 2016, 7:16:55 PM10/5/16
to DroidScript
Awesome gonna download again

Netpower8

unread,
Oct 5, 2016, 9:51:43 PM10/5/16
to DroidScript
game is great alex... =) 

here i go again... you could try to make the code modular so you an reuse some of the codes =)...

these past 2 weeks i have been updating my code to make it more modular.

Netpower8

unread,
Oct 5, 2016, 11:16:02 PM10/5/16
to DroidScript
dont get me wrong... your code is now more readable =)...

Symbroson Development

unread,
Oct 6, 2016, 2:45:12 AM10/6/16
to DroidScript
I lookes rhrough an other MineSweeper app and I noticed that the autoEnable - called when pressing a peaceful piece - enables all eight pieces around it, not just 4 as I thaught. This is fixed now
And I splitted the code into more js files found in Uses/

Regards,
Symbroson

nikhil baby

unread,
Oct 6, 2016, 8:06:18 AM10/6/16
to DroidScript
I don't know how to play it!!

Manuel Lopes

unread,
Oct 6, 2016, 8:33:22 AM10/6/16
to DroidScript
cool you are great make this and the other games :)
Message has been deleted

Francisco J Arnoso

unread,
Oct 6, 2016, 8:51:39 AM10/6/16
to DroidScript
Thank you Alex
Good job!

Symbroson Development

unread,
Oct 6, 2016, 8:55:45 AM10/6/16
to DroidScript
Nikhil you have to mark all mines without tapping on one. The numbers say how many mines are on the 8 places next to the number.

Netpower8

unread,
Oct 6, 2016, 9:07:52 AM10/6/16
to DroidScript
Nice game alex
. Thanks
Message has been deleted

Robbie Kendall

unread,
Oct 6, 2016, 10:35:47 PM10/6/16
to DroidScript
Settings 15/94

So freaking hard but soo fun lol.. I thought I was gonna be able to do it but I became impatient since I should be asleep already lol

Work comes early in the morning, just can't get enough of DroidScript.

I wanna learn some more advanced stuff like your games!

Screenshot_2016-10-06-21-32-24.png

Netpower8

unread,
Oct 6, 2016, 10:59:47 PM10/6/16
to DroidScript
hahahaha freaking hard man....

Dave Smart

unread,
Oct 7, 2016, 11:52:28 AM10/7/16
to DroidScript
Nice Job Symbroson!

I would be happy to put this sample on the downloadable samples page.  As you probably know, the next version of DroidScript will allow demo SPKs to be downloaded directly from the menu inside the app, so soon you will be famous ;)

All you need to do is add a comment header to the main js file explaining who you are and your license terms and also put a little comment above each function explaining what it does.

I suggest you add an explosion sound too (you can use the in-built DS explosion sound)

Note: I don't know what stage of your career you are currently at, but being able to show a prospective employer a demo with your name on it during a job interview is the surest way to make a good impression.  These days being able to demonstrate your coding (and commenting) abilities is a key component in the process of trying to land your dream job.
 
Regards
David

Symbroson Development

unread,
Oct 7, 2016, 12:09:52 PM10/7/16
to DroidScript
Thanks Dave :)
I know that most of the development companies looks at the skills and that is one of the reasons I make these games. I also want to show the users of DS what you can do with DS and I am getting more knowledge and experience in programming.
You said I should write some license terms at the top - what content it could include (I haven't made that before)

Thanks to all for your praise ^^
Regards,
Symbroson

Dave Smart

unread,
Oct 7, 2016, 12:45:46 PM10/7/16
to DroidScript
Hi Alex,

You just need to put your name and optionally your email address at the top so people can see who you are and also specify what the license terms are for you work.  You can put 'Copyright Symbroson Development' if you like to remind people that you own the copyright and then you can say whether you will allow people to use your code in their projects for free and whether you will allow them to sell a game based on your code etc.  
It is often easiest to choose one of the commonly used standard licensing policies such as the MIT license - https://opensource.org/licenses/MIT which will let people do almost anything with your code but they will need to keep your original copyright notice intact (so you get the credit).

This site might help you :- http://choosealicense.com/

You will probably also need to credit third parties in your code too with a link to their site if you did not draw the tank and rock images yourself.

Check the header of our 'Space Shooter' demo to see how ChrisH did it.

Regards
David

Robbie Kendall

unread,
Oct 8, 2016, 10:04:41 AM10/8/16
to DroidScript
Twice I have been more than halfway through a large scale level, about 20 minutes of work and thinking only to accidentally hit the reset button with my fast fingers trying to toggle the flag.

I would recommend showing an alert asking if you are sure you want to reset and if selected yes, then reset.

Might not be a problem for everyone so if you don't want to change it I'll edit it on my phone suit my needs, just letting you know it can be frustrating to delete your game on accident cause the button is so close lol.

Definitely not complaining so please don't take it the wrong way cause I surely love the game and I WILL beat it lol. It's addicting.

Robbie Kendall

unread,
Oct 8, 2016, 10:06:17 AM10/8/16
to DroidScript
Fat fingers, not fast lol, autocorrect.

Symbroson Development

unread,
Oct 8, 2016, 10:10:31 AM10/8/16
to DroidScript
Ok I'll add it
Good idea :)

Symbroson Development

unread,
Oct 8, 2016, 10:15:00 AM10/8/16
to DroidScript

Robbie Kendall

unread,
Oct 8, 2016, 10:38:51 AM10/8/16
to DroidScript
Cool man thats great! Thanks alex.

Robbie Kendall

unread,
Oct 8, 2016, 1:03:18 PM10/8/16
to DroidScript
There is now a problem with the settings. It used to automatically change the number of mine when you changed the tiles but now it stays at 20 and even if i change it manually, I cannot get more than 20 mines.

Symbroson Development

unread,
Oct 8, 2016, 1:06:26 PM10/8/16
to DroidScript
Yes I know about that. This happens only when you change it the first time - then it is working.
I am working on that

Robbie Kendall

unread,
Oct 8, 2016, 1:14:08 PM10/8/16
to DroidScript
I tried to change it a few times couldn't get it to change, ill try again thanks

Symbroson Development

unread,
Oct 8, 2016, 1:18:23 PM10/8/16
to DroidScript
I solved it by dont using spn.OnChange but when btnExit is touched. So it must work now

Robbie Kendall

unread,
Oct 8, 2016, 1:18:58 PM10/8/16
to DroidScript
I tried again and the settings do not automatically pop up when I open the game, and when I click the settings I can't get more than 20 mines. Its too easy with 20 mines lol. I don't have the previous version either to see what code is missing that made it show on startup.

Symbroson Development

unread,
Oct 8, 2016, 1:26:29 PM10/8/16
to DroidScript
Size 15 and 30 mines :D
Screenshot_2016-10-08-19-24-44.png
Message has been deleted

Symbroson Development

unread,
Oct 8, 2016, 1:29:44 PM10/8/16
to DroidScript
Yes I removed it the auto popup

Symbroson Development

unread,
Oct 8, 2016, 1:31:56 PM10/8/16
to DroidScript
The max rate of mines depends on the size. Size 10 -> Max 44 mines

Robbie Kendall

unread,
Oct 8, 2016, 1:54:49 PM10/8/16
to DroidScript
Ooh maybe that's why i was trying 15 and 94 since that's what the auto popup did... Ive been trying to beat 15/94 and now i can't play it lol

Symbroson Development

unread,
Oct 8, 2016, 2:00:37 PM10/8/16
to DroidScript
Of course you can - size 15 has a mines maximum of 103

Robbie Kendall

unread,
Oct 8, 2016, 2:06:44 PM10/8/16
to DroidScript
It won't let me mine only stays at 20 mines no matter what i change it to

Symbroson Development

unread,
Oct 8, 2016, 2:10:52 PM10/8/16
to DroidScript
Do you downloade the spk from dropbox?
Can you tell me step by step what you do
(Example: Start/Settings/change mines to 30/close -> what happens/not ~)

Robbie Kendall

unread,
Oct 8, 2016, 2:55:04 PM10/8/16
to DroidScript
Downloaded from dropbox as soon as you said you added alert to reset button and havnt been able to get the mines to change since then.

Start DroidScript
Start Minesweeper
Touch settings
Change size to 15
Change mines to 94
Touch close

Size updates to 15
Mines stay at 20

Robbie Kendall

unread,
Oct 8, 2016, 2:55:30 PM10/8/16
to DroidScript
Im gonna delete and download it again

Robbie Kendall

unread,
Oct 8, 2016, 2:58:35 PM10/8/16
to DroidScript
Deleting and downloading again fixed it sorry bro. Thanks for helping.

Robbie Kendall

unread,
Oct 8, 2016, 3:00:09 PM10/8/16
to DroidScript
I can now change it as many times as I want... Back to trying to beat 15/94 lol

Robbie Kendall

unread,
Oct 11, 2016, 7:50:50 AM10/11/16
to DroidScript
Size 15 mines 60... Hardest level I've been able to beat so far.
Screenshot_2016-10-11-06-42-36.png
Reply all
Reply to author
Forward
0 new messages