Author Topic:  MineSweeper  (Read 2093 times)

0 Members and 1 Guest are viewing this topic.

#

  • Member
  • ***
  • Posts: 158
  • I don't do much here.
  • Awards Month 1 members w/25+posts (4/21/13-5/12/13) 1 year on site
    • View Profile
    • Awards
  • Xbox: HellomeZodoz
MineSweeper
« on: March 05, 2016, 02:43:07 PM »
Hey guys, thought I'd show you guys something I made the other day. It was a pretty easy project that someone suggested, so thought I might as well do it. Here's a video of me playing it as well as quickly going through a bit of the scripts.



You "Left click" by clicking with an empty hand and "Right click" by clicking with a stick. It generates randomly each time and you can set it to any amount of bombs by changing 2 commands. The win check is shown in the video as well as the behind the scenes generation and a little bit of the scripts. Since it has to generate all the bombs and numbers in real-time, it takes up to about 30 seconds for 10 bombs, and the time scales up with how many bombs you choose to add in.

If anyone has any thoughts and/or opinions, let me know. Thanks.

#TMinesweeper
« Last Edit: March 05, 2016, 03:38:31 PM by Hashtag »

Dark Hydrak

  • Elite Member
  • *****
  • Posts: 508
    • View Profile
    • Awards
Re: MineSweeper
« Reply #1 on: March 05, 2016, 02:45:40 PM »
Sweet, you actually did it. Very impressed #, very.

#

  • Member
  • ***
  • Posts: 158
  • I don't do much here.
  • Awards Month 1 members w/25+posts (4/21/13-5/12/13) 1 year on site
    • View Profile
    • Awards
  • Xbox: HellomeZodoz
Re: MineSweeper
« Reply #2 on: March 05, 2016, 03:16:42 PM »
Sweet, you actually did it. Very impressed #, very.

Thanks. It was a pretty good idea and seemed fun to make, so I should thank you for the suggestion :)

.ok

  • Supreme Member
  • *****
  • Posts: 2212
  • Awards Site art contributions/TPs in-game/Contest winners 4 years on site Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site 2 years on site Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site
    • View Profile
    • Awards
Re: MineSweeper
« Reply #3 on: March 05, 2016, 05:10:22 PM »
have you started or done pacman?if not then i wanted to try doing pacman myself

or attempting :P




urlag

  • Member
  • ***
  • Posts: 191
  • I'm lost
  • Awards 1 year on site Week 1 members w/25+ posts (4/13/13-4/20/13)
    • View Profile
    • Awards
  • Xbox: urlag
Re: MineSweeper
« Reply #4 on: March 05, 2016, 05:18:40 PM »
Very impressive, would love a slower breakdown of the scripts. How does it generate the correct numbers?
Don't drink and script,
 you'll regret it in the morning


#

  • Member
  • ***
  • Posts: 158
  • I don't do much here.
  • Awards Month 1 members w/25+posts (4/21/13-5/12/13) 1 year on site
    • View Profile
    • Awards
  • Xbox: HellomeZodoz
Re: MineSweeper
« Reply #5 on: March 05, 2016, 05:30:04 PM »
have you started or done pacman?if not then i wanted to try doing pacman myself

or attempting :P

Go for it, I got another project in mind at the moment.

Very impressive, would love a slower breakdown of the scripts. How does it generate the correct numbers?

If enough people ask, I'll do a full breakdown, but to answer your question, it's all done through the cells. All the cells have the same script in them. Once all the bombs are generated, it goes back to the 1st cell and starts a series of IsBlock checks. If there is a steel plating (what the bomb is made out of) to the left of the cell, it stores +1 history. It then checks the cell to right and repeats the same process to all the surrounding cells. Once it's done, depending on how much bomb check histories it accumulated, it assigns the cell's number, sets power to the script block in the next cell, and repeats.

I hope that made sense, I'm pretty bad at explaining things :P

Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: MineSweeper
« Reply #6 on: March 05, 2016, 05:42:53 PM »
This may seem like a bit of a silly question, But how do you determine which cell the player is clicking?

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

#

  • Member
  • ***
  • Posts: 158
  • I don't do much here.
  • Awards Month 1 members w/25+posts (4/21/13-5/12/13) 1 year on site
    • View Profile
    • Awards
  • Xbox: HellomeZodoz
Re: MineSweeper
« Reply #7 on: March 05, 2016, 05:57:41 PM »
This may seem like a bit of a silly question, But how do you determine which cell the player is clicking?

If anything, I chose a silly way to do it :P. But basically it's just a SetEvent for your hand and for a stick. They activate individual scripts that power the blocks in front of you, in turn activating the script blocks that make up the front of the cells. To avoid activating script blocks behind the one intended, it just checks to make sure that it only activates the 1st block in your line of sight and not keep activating more behind it. It all could've been done with a button, but this seemed cooler  8)

.ok

  • Supreme Member
  • *****
  • Posts: 2212
  • Awards Site art contributions/TPs in-game/Contest winners 4 years on site Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site 2 years on site Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site
    • View Profile
    • Awards
Re: MineSweeper
« Reply #8 on: March 05, 2016, 06:08:56 PM »
just a quick q bfr i try....the hud bars when theyre switching...like when you made your pong game,if you have alot changing,does that create lag?idk bcs ive never messed around with the hud or hud bars before




#

  • Member
  • ***
  • Posts: 158
  • I don't do much here.
  • Awards Month 1 members w/25+posts (4/21/13-5/12/13) 1 year on site
    • View Profile
    • Awards
  • Xbox: HellomeZodoz
Re: MineSweeper
« Reply #9 on: March 05, 2016, 06:13:17 PM »
just a quick q bfr i try....the hud bars when theyre switching...like when you made your pong game,if you have alot changing,does that create lag?idk bcs ive never messed around with the hud or hud bars before

I wouldn't know 100%, but HUDs seem to create very little, if any lag. Most of the lag in Pong came from the physical representation used to render the HUDs.

ThatOneGuy

  • Jr. Member
  • **
  • Posts: 44
  • You know that one guy im him.
    • View Profile
    • Awards
  • Xbox: StuffyDesert088
  • PSN: LiteralyPotato
  • Steam: hiowenn
Re: MineSweeper
« Reply #10 on: March 05, 2016, 08:30:16 PM »
will you be sharing this?  :D I would love to play this
You know that one guy im him.

#

  • Member
  • ***
  • Posts: 158
  • I don't do much here.
  • Awards Month 1 members w/25+posts (4/21/13-5/12/13) 1 year on site
    • View Profile
    • Awards
  • Xbox: HellomeZodoz
Re: MineSweeper
« Reply #11 on: March 05, 2016, 09:08:34 PM »
will you be sharing this?  :D I would love to play this

I plan to do a few more projects on this world, so when it's done I may share it out.

ThatOneGuy

  • Jr. Member
  • **
  • Posts: 44
  • You know that one guy im him.
    • View Profile
    • Awards
  • Xbox: StuffyDesert088
  • PSN: LiteralyPotato
  • Steam: hiowenn
Re: MineSweeper
« Reply #12 on: March 05, 2016, 11:17:06 PM »
ok
You know that one guy im him.

Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: MineSweeper
« Reply #13 on: March 06, 2016, 07:02:00 AM »
This may seem like a bit of a silly question, But how do you determine which cell the player is clicking?

If anything, I chose a silly way to do it :P. But basically it's just a SetEvent for your hand and for a stick. They activate individual scripts that power the blocks in front of you, in turn activating the script blocks that make up the front of the cells. To avoid activating script blocks behind the one intended, it just checks to make sure that it only activates the 1st block in your line of sight and not keep activating more behind it. It all could've been done with a button, but this seemed cooler  8)

I thought you'd have a bunch of script blocks with their look at range set to 16 like with the Rubik's cube. I still would have found a problem with that, But it would be better than what you have.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

#

  • Member
  • ***
  • Posts: 158
  • I don't do much here.
  • Awards Month 1 members w/25+posts (4/21/13-5/12/13) 1 year on site
    • View Profile
    • Awards
  • Xbox: HellomeZodoz
Re: MineSweeper
« Reply #14 on: March 06, 2016, 08:00:33 AM »
I thought you'd have a bunch of script blocks with their look at range set to 16 like with the Rubik's cube. I still would have found a problem with that, But it would be better than what you have.

Then it wouldn't be a click. The Rubik's Cube was a slide so that's why I was able to use it for that.