Minecraft Deep Dark Simulator on Scratch
by Witheredboi in Circuits > Software
924 Views, 0 Favorites, 0 Comments
Minecraft Deep Dark Simulator on Scratch
This is a relatively small project spriteswise, but it is large codewise. Specific elements will me discussed as they appear.
Here's the game link if u want to play it without having to build it.
Supplies
And a scratch account. You honestly just need a scratch account.
P.S. If anyone knows a better way to make it, feel free to post it in the "I made it" section =]
The Player
The sprite for this one is simple, and can be modified to anything you want. Just make sure you can see it thru the scan lines though.
The code for this one is also relatively simple. It uses a generic movement setup with an addon that makes it change costume in time with the movement. It also has a bit of code that switches the costume to an idle stance if no keys are down (when you are not moving).
The Vibrations
One of the more complex parts of the whole thing, these are the particles you see when a sculk sensor or the warden hears you. There are two of them (named Vibro and Vibro2 respectively): one is the player's footsteps going directly to the warden, and the other is the sculk detecting you and then going to the warden.
The sprite design is the same, but the code is different.
The Sculk Sensor
In-game, it's just called sculk, for simplicity's sake.
This is the first sprite to add sounds. There are six of them (Sculking1-6), all of which are the snoring sound cut and reversed.
This sprite was not hard to model, since the shape isn't too complex. There were a TON of bugs to iron out, such as the issue of player movement interrupting a travelling vibration. This was fixed so I have what you see now.
The Warden
The most interesting of all of this, the Warden is the thing trying to kill you, and its code tried to kill me =P
Not even kidding, this thing took as long as the project itself; I had to alter its code every time something new was added.
Anyhoo, it has a nice effect. It plays a sound when it detects you, it flashes faster when it knows you're there, and when it recieves a sculk signal, it goes to the location of the sensor that sent the signal, and then picks up pace when coming for you afterwards. It was fun but challenging.
Its walk cycle is just 3 different frames. One is copy-pasted, so it doesn't count as a 4th.
When not sensing anything, it just clumsily walks around aimlessly undil either you disturb it, or the sculk senses you.
There was a lot that went into making this thing.
Sculk Counter
This was the hardest-to-make sprite out of all of them. The code wasn't very challenging, and the sprite wasn't too complex, but it was COPIED AND PASTED 20 FREAKIN TIMES!!! Imagine if I had doubled that...
Oh yeah, remember the "collected" variable from before? Yeah, here it is.
Game Over, You Win!!!
These are the game over and victory screens.
They are basically the same thing, stemming from messages sent by previous sprites.
The Warden kills you if you touch him and the touch him again in exactly 2 seconds, and you win if you collect 20 sculks.
And Finally...
This is the part that gives it that old atari feel: the scan lines.
Yes, they're a separate sprite.
All it has is a function that keeps it at the front layer of the game. That's it.