Minecraft Maps / Redstone Device

Gorillas (gorillas.bas)

  • 1,409 views, 2 today
  • 52 downloads, 0 today
  • 7
  • 5
  • 3
billybob884's Avatar billybob884
Level 41 : Master Engineer
44

This game works best in 1.8.4.


UPDATE: 08/02/2015


Since so many people have been having problems with .rar files, I have recompressed it as a .zip instead.

===============================


UPDATE (5/26/2015):
Apparently in the new 1.8.5 and 1.8.6 updates, dispensers placing and executing preprogrammed command blocks is no longer supported, so this project is only compatible with Minecraft versions up to 1.8.4.



TL;DR ‒
Artillery game. Enter angle & velocity to throw banana. You hit him first, he ded. He hit you first, you ded.



Project Description

This is a recreation of the old game Gorillas, which was published by IBM way back in 1991 and packaged with QBasic as an example of the versatility of the programming language.

Gorillas is an artillery game where players control two gorillas on a city skyline and throw exploding bananas at each other. Players take turns entering values for the angle and velocity of their throw to adjust their aim.


Side-By-Side Comparison

Aesthetics:

Original: Being from the early 90's (and really only a demo game, to boot), the visuals were somewhat plain. Buildings were a solid color (red, gray, or cyan) with no accents or details except for windows. The background was a solid blue with no clouds or other buildings in the background, except for the sun. Player avatars were roughly shaped like a large gorilla, and were a solid brown with no details.

Minecraft: I've tried to give the game a slight artistic update while keeping it recognizable. Buildings are the same overall color as the original, but now have details including outlines, visible floor divisions, and an overhang at the roof. The background now includes a silhouetted city skyline, and the colors have been adjusted to give a sharper contrast between the foreground and background. Player avatars haven't improved much over the originals; they have detailed faces and multi-colored skin, but the overall effect is reduced by their smaller size (due to the necessity of using armor stands).


Terrain Generation:

Original: The original terrain resembled a city skyline consisting of a random number of buildings at random heights and widths, were one of three colors (red, gray, or cyan), and had randomly lit or darkened windows.

Minecraft: My recreation uses a system of dispensers loaded with pre-programmed command blocks to mostly match the original. Building heights, colors, and window lighting are all randomly chosen, however the number of buildings and their widths are static, and heights are limited to a resolution of 8 levels. Terrain generation takes approximately 20 seconds.


Game Play:

Original: Players take turns entering an angle (0-360deg) and a velocity (0-350) to aim and throw their banana. The banana detonates upon impact, and players would only score a point from a direct hit. Player throws were influenced by wind with varying direction and intensity, which changed each match.

Minecraft: Players use a "sign wall" number pad to enter their angle & velocity (limited to 0-90deg and 1-150, respectively). A hard-coded array of over 136,000 command blocks is searched for the matching angle/velocity pair, and summons a primed TNT entity riding an invisible armor stand (with yellow armor) to represent the banana. Wind will also affect the player's shot, however this is limited to a resolution of 5 levels (East-high, East-low, None, West-low, & West-high).
Banana detonation occurs under one of three conditions:
1) If a shot collides with a horizontal or vertical surface;
2) If a shot collides with a player avatar;
3) If a shot passes the invisible border and leaves the playing field.
Due to the "game-within-a-game" nature of Minecraft, on rare occasions a shot may land on a horizontal surface and fail to immediately detonate. These shots will time out after about 12 seconds and then detonate. Visually tracking a shot can also be finicky, sometimes flickering or appearing to freeze in mid-air, however the shot will still land and detonate in the correct location.


Easter Eggs:

Original: If a player's shot passes through the sun graphic, the smiley face :) will change to a surprised face :O until the end of the players turn.

Minecraft: This has been recreated using a similar method to detecting collision with a player avatar. The sun graphic will change faces reliably for shots with lower power levels, but will sometimes fail to detect shots at higher power levels.


Omitted Features:

Original: Gravity defaults to 9.8m/s², but any value can be specified between 0.1-10.0m/s².

Minecraft: This feature has not been included due to motion tags needing to be hard-coded; incorporating selectable gravity would have exponentially increased the number of command blocks necessary over the already staggering 136,000 block array.


Added Features:

A basic difficulty setting has been added to the game. Given the smaller player avatar size, shot collision is determined by a shot landing within a certain radius of the avatar;
Easy - 6 blocks
Normal - 4 blocks
Hard - 2 blocks



Additional Technical Limitations

Draw Distance:

Something I didn't realize until too late in the project was the banana (TNT) and its resulting explosion weren't visible from the player control tower. To make the player's shot (banana) visible, an invisible armor stand wearing yellow armor was summoned riding the TNT. As stated above, this has some tracking difficulties, but works well enough for the purposes of this game. To make the explosion visible, additional command blocks manually creating the particle effects were necessary.


Collision Resolution:

Creating a system to detect and detonate TNT upon collision with a vertical surface was difficult. My original solution was to use invisible armor stands hidden in the walls of the buildings to detect TNT within a certain proximity, then set its fuse to 0, detonating it. This worked well enough, but had the limitation of causing shots that landed within a building to "time out" before they detonated. The final solution selected uses the "detect" feature of the "execute" command in conjunction with the scoreboard system to detect non-air blocks adjacent to the TNT. This has the benefit of not loading down the user with the large number of entities necessary in the previous solution.


Shot Power:

Another problem was the minimal impact a single TNT made on the landscape. Since there is no way to increase a single TNT's explosive power, the only solution was to use multiple TNTs, all summoned simultaneously. Without having to reprogram the existing array, this was accomplished by summoning multiple player avatars, all on top of each other. The command block array summons TNT relative to the player avatar using an execute command, so having multiple avatars means the summon command is executed once for each instance of the avatar.



Imgur album:
http://imgur.com/a/FRuOK
CreditSpecial Thanks - yojojo2000
Progress100% complete
Tags

Create an account or sign in to comment.

1
05/24/2015 6:26 pm
Level 64 : High Grandmaster Senpai
GrayRemnant
GrayRemnant's Avatar
Such an awesome idea!  Great job, buddy!
1
05/24/2015 7:17 am
Level 43 : Master Electrician
UD13N0W
UD13N0W's Avatar
OMG I remember playing this with my little brother way back when i was a kid!!!! You sir are amazing!!!!!!

∙∙∙∙∙·▫▫ᵒᴼᵒ▫ₒₒ▫ᵒᴼᵒ▫ₒₒ▫ᵒᴼᵒ☼)===> ✲´*。✲.✲
1
05/24/2015 5:50 am
Level 1 : New Miner
anonpmc1911014
anonpmc1911014's Avatar
[deleted]
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome