Recent Projects in From Gravity to Games http://scratch.mit.edu/feeds/getRecentGalleryProjects/9206 Recent Projects Feed in From Gravity to Games en-us Fri, 10 Oct 2008 17:58:40 GMT CakePHP Han and Andres genghisu Realistic Gravity Bow and Arrow http://scratch.mit.edu/projects/sausagestand/102227 Click to shoot. Hold down mouse button for more power<br> <a href="http://scratch.mit.edu/projects/sausagestand/102227"> <img src="http://scratch.mit.edu/static/projects/sausagestand/102227_sm.png" /> </a> http://scratch.mit.edu/static/projects/sausagestand/102227_sm.png Accurate Gravity Simulator http://scratch.mit.edu/projects/jessman/133536 I made this gravity simulator in about an hour, so it's not perfect, but it is pretty accurate (air resistance is accounted for, the ball accelerates at 32 fps, etc). You may use this gravity for your own projects, but please ask me first (and as always, credit is appreciated).<br> <a href="http://scratch.mit.edu/projects/jessman/133536"> <img src="http://scratch.mit.edu/static/projects/jessman/133536_sm.png" /> </a> http://scratch.mit.edu/static/projects/jessman/133536_sm.png GravArena http://scratch.mit.edu/projects/EdnaC/110327 Your ship has been trapped in a corner of space claimed by an advanced alien race. The aliens have mastered gravity, and use it as a source of power, and can even use it as a weapon. Luckily, you command a ship designed by NASA, the "National Aeronautics and Scratch Administration", that carries weapons which will enable you to battle your captors. Use up arrow to fire your thruster, left and right arrow to turn your ship. Spacebar fires plasma cannons (your primary weapon, as it is unaffected by the alien gravity field). Down arrow will launch a "dumb" proximity bomb that will fall toward the enemy gravity source and explode if it comes into contact with their ships or weapons.<br> <a href="http://scratch.mit.edu/projects/EdnaC/110327"> <img src="http://scratch.mit.edu/static/projects/EdnaC/110327_sm.png" /> </a> http://scratch.mit.edu/static/projects/EdnaC/110327_sm.png 3D Projectile http://scratch.mit.edu/projects/chalkmarrow/86430 This is a basic 3D projectile project that might be useful for those who want to make a 3D cannon game. Change "v0" to control initial speed, change angle to change how high the projectile fires (0-90 degrees), and change angle_lateral to change how far right or left it fires. I've put two simple targets to shoot at. Place your mouse over the target to see how far it is away (in the z direction, into the screen). Note that if you want to make your own targets, just change the x3d, y3d, and z3d variables: the sprite itself constantly maps itself to the correct 2d coordinates using one-point perspective equations. That is, each sprite believes it is in real 3d space.<br> <a href="http://scratch.mit.edu/projects/chalkmarrow/86430"> <img src="http://scratch.mit.edu/static/projects/chalkmarrow/86430_sm.png" /> </a> http://scratch.mit.edu/static/projects/chalkmarrow/86430_sm.png Complex Jumping Demo http://scratch.mit.edu/projects/Mayhem/26609 An attempt to create smooth jumping and gravity scripts as the basis for a platform game.<br> <a href="http://scratch.mit.edu/projects/Mayhem/26609"> <img src="http://scratch.mit.edu/static/projects/Mayhem/26609_sm.png" /> </a> http://scratch.mit.edu/static/projects/Mayhem/26609_sm.png Trigonometry Cannon http://scratch.mit.edu/projects/Paddle2See/77800 There always seems to be interest in things that shoot. Here's how to do it with the new Trig functions. Use Space to shoot, Up/Down to control the barrel angle, Right/Left to roll the cannon around. The X key can be used to clear the cannonball paths. This is a cannon with the projectile motion calculated using the new Trig functioons. The tip of the Barrel is also located using the Trig functions so that the Ball can be placed at the Barrel tip when it is fired. Wind is accounted for as a constant change to horizontal velocity. This is not a very realistic model, but it looks good enough for animation. In addition to changing the barrel angle and the wind, the trajectory can be further modified by changing the inital velocity or the acceleration due to gravity (Ay) in the scripts.<br> <a href="http://scratch.mit.edu/projects/Paddle2See/77800"> <img src="http://scratch.mit.edu/static/projects/Paddle2See/77800_sm.png" /> </a> http://scratch.mit.edu/static/projects/Paddle2See/77800_sm.png Sprite Movement Done Right http://scratch.mit.edu/projects/archmage/72848 This project uses a efficient sprite movement script that would be good to use in your own projects. You can put the scripts you see the background into scratch yourself or you can download the project. The downloaded project includes comments that explain the script.<br> <a href="http://scratch.mit.edu/projects/archmage/72848"> <img src="http://scratch.mit.edu/static/projects/archmage/72848_sm.png" /> </a> http://scratch.mit.edu/static/projects/archmage/72848_sm.png Gravity Done Right http://scratch.mit.edu/projects/archmage/58354 This project features a very efficient gravity script that can be used in your own projects. This also features a small bounce script.<br> <a href="http://scratch.mit.edu/projects/archmage/58354"> <img src="http://scratch.mit.edu/static/projects/archmage/58354_sm.png" /> </a> http://scratch.mit.edu/static/projects/archmage/58354_sm.png MoonLander http://scratch.mit.edu/projects/EdnaC/48110 Demo of a "Moon Lander", using two "helper" sprites to figure out where the ship is going to go during each "time step". The relative location of the "Result" Sprite with respect to the Ship is used to represent the Ship's Velocity Vector. The "Pointer" Sprite is used to track the angle and velocity of the ship. (See comments in the scripts for a full explaination.) In addition to "Thrust" (in the direction that the Ship is pointing) the Result sprite moves toward the Moon to represent the pull of the Moon's gravity. This pull is calculated as a constant divided by the square of the distance from the ship to the center of the moon. Left/Right Arrows to Turn, Up Arrow for Thrust.<br> <a href="http://scratch.mit.edu/projects/EdnaC/48110"> <img src="http://scratch.mit.edu/static/projects/EdnaC/48110_sm.png" /> </a> http://scratch.mit.edu/static/projects/EdnaC/48110_sm.png Projectile http://scratch.mit.edu/projects/EdnaC/75922 How to fire and track the position of a projectile using a "Guide" Sprite to keep track of the velocity and direction of the projectile. Wind could easily by incorporated by adding a move to the guide sprite's script (change x by "wind effect").<br> <a href="http://scratch.mit.edu/projects/EdnaC/75922"> <img src="http://scratch.mit.edu/static/projects/EdnaC/75922_sm.png" /> </a> http://scratch.mit.edu/static/projects/EdnaC/75922_sm.png GravityGuyWithDampenedBounce http://scratch.mit.edu/projects/EdnaC/71684 Follow up to "GravityGuyWithBounce". Now GravityGuy's bounce is "dampened". Instead of using -1 to switch his Velocity_Y variable, this program uses a negative number with a magnitude of less than one. It also shows a logic error (a Bug) in the program; because gravity is applied any time that he isn't touching Black, and the "AlreadyBouncing" variable gets reset only if he isn't touching Red, it's possible for him to "sink" thru the red "floor" if the rebound value (bouncy-ness) is too small. Try adjusting the value to see this effect. Next update to GravityGuy will be a re-write to fix this problem and give the user input to control Gravity Guy's motion. He'll also gain the ability to "jump" !<br> <a href="http://scratch.mit.edu/projects/EdnaC/71684"> <img src="http://scratch.mit.edu/static/projects/EdnaC/71684_sm.png" /> </a> http://scratch.mit.edu/static/projects/EdnaC/71684_sm.png GravityGuyWithBounceAndJump http://scratch.mit.edu/projects/EdnaC/72080 This is a follow-up to the GravityGuy with Bounce demo. The logic error that let GravityGuy sink thru the floor has been corrected, and now he can jump. There is some extra "unconnected" code included in the project. If you download the project and connect the extra code, GravityGuy will gain a new ability. Remember that there are lots of ways to accomplish things in Scratch, there is nothing magical about the way I did things or the variable names. This program is built a bit differently from the previous ones, using more "Broadcasts". As with the other projects, lots of comments are included that should make it clear how the program works. Feel free to download and use as desired, either to study or to remix.<br> <a href="http://scratch.mit.edu/projects/EdnaC/72080"> <img src="http://scratch.mit.edu/static/projects/EdnaC/72080_sm.png" /> </a> http://scratch.mit.edu/static/projects/EdnaC/72080_sm.png GravityGuyWithBounce http://scratch.mit.edu/projects/EdnaC/70950 This is a follow-up to the GravityGuy demo. A common question, after Scratchers figure out how to make a Sprite respond to gravity (fall), is "how do I make my sprite bounce ?".<br> <a href="http://scratch.mit.edu/projects/EdnaC/70950"> <img src="http://scratch.mit.edu/static/projects/EdnaC/70950_sm.png" /> </a> http://scratch.mit.edu/static/projects/EdnaC/70950_sm.png GravityDemo http://scratch.mit.edu/projects/EdnaC/70385 Gravity Demo: What is "Velocity Y"?<br> <a href="http://scratch.mit.edu/projects/EdnaC/70385"> <img src="http://scratch.mit.edu/static/projects/EdnaC/70385_sm.png" /> </a> http://scratch.mit.edu/static/projects/EdnaC/70385_sm.png