This week we started work on making our own maze games! While some went for a more simple control style, I decided to make my maze work somewhat differently. The normal style of movement people chose was: W=Up A=Left S=Down D=Right. But I decided that I would take a different route with my game. I chose to have W and D move the sprite foreword and backward. While A and D rotated the sprite left and right, this makes for a very different, and in my opinion more difficult maze game. When the sprite touches the edges in your pursuit for the finish line, it returns back to its starting point and is ready for you to try again. Overall the project was fairly easy, as we have already used most of the mechanics for it in our intro to scratch. But in order to make more of a challenge, I decided to mess around with the rotating controls a bit, which proved to be more difficult to program. If I had more time I would have added more levels that would start when the sprite comes in contact with the finish line, as well as enemies and maybe even teleports. I will attempt to add some of those features during class this week.
Controls: W: Move Foreword. D: Move Backward. A: Rotate Counterclockwise. D: Rotate Clockwise
Sunday, September 22, 2013
Sunday, September 15, 2013
Algorithm Summary
In the second day of class we were assigned the task of creating an algorithm that determines the day of the week for a set date. My partner jplafor ( http://programmingwithjplafor.blogspot.com ), started brainstorming ideas, and after about 10 minutes I managed to pull an equation out of thin air that actually worked for what we were doing. That equation is D - (7W). Where D is equal to Days from the first of March 2001, and W is equal to the amount of weeks from that day, rounded down to the whole number. D is determined by the equation (([Year]-2001)365)+M+A+L. In this equation M is equal to the amount of days for each month, ie input 10 = 213 because at the start of October 213 days have already happened since the first of march. A = the date selected, ie the 5th =A=5. And L is the leap year equation, where you divide ([Year]-2000) by 4, and round down in order to find the amount of leap year days to add to the equation for the day. Once all the variables are determined, and the equation is done out, you then have D. To determine W, you divide D by 7, and round down to the whole number. Do that equation out and you will have a number between 1 and 7. 1=Thursday, 2=Friday, and so on. I spent a few hours putting this into a scratch program, but I am still troubleshooting it. But it is nearly working.
EDIT: This should work perfectly fine now, but make sure to select the year first, and then press b before continuing date
Controls: Q and A: Up and Down for Day of the month
W and S: Up and Down for Month
E and D: Up and down for Year
EDIT: This should work perfectly fine now, but make sure to select the year first, and then press b before continuing date
Controls: Q and A: Up and Down for Day of the month
W and S: Up and Down for Month
E and D: Up and down for Year
Initial post
In the first few weeks of our programming class, we made steps in order to reach certain locations in the school, noting that it is very important to not leave any small directions out, because a computer needs specific directions, and cannot interpret anything on its own. We also learned the basics of scratch IDE, we learned how to, make sprites move around using the arrow keys (I made my sprites animated when they walk), we made sprites walk around the edge, we made a program that when a ball bounces into another ball, the second ball rolls (even if we did it in a somewhat cheaty way), and lastly we made sprites move randomly, and when they collide they made a sound to signal the collision. All of these tasks were fairly simple, and I was able to complete them within 2 days without much trouble, even though I wasted 15 minutes animating the sprite on one of them.
Here are the Projects Mentioned in this post:
Here are the Projects Mentioned in this post:
Subscribe to:
Posts (Atom)