Create a free account to remove all ad content.

Author Topic:  MineSweeper  (Read 2706 times)

0 Members and 1 Guest are viewing this topic.

#

  • Member
  • *
  • Posts: 158
  • I don't do much here.
    • View Profile
  • 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
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.
    • View Profile
  • 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
    • View Profile
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
    • View Profile
  • 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.
    • View Profile
  • 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: 4336
  • What's yours is mine. ~TM's Resident Master Thief~
    • View Profile
  • 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.
    • View Profile
  • 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
    • View Profile
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.
    • View Profile
  • 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.