Updated Homework. Due Tuesday

caps mockup

My game is a fairly basic adaptation of a game my friends and I play called caps. Four people sit on the floor with a cup of WATER between them in two teams about 12 feet apart from each other (the blank circles are the four people) Each team takes turns tossing caps at the other teams cup. If they make it the other team gets a “rebuttal” attempt to negate the point, if they miss a point is scored. First to seven (must win by two) is how we commonly play. This game play will be recreated with an arrow that grows and shrinks in a cycle and when a player clicks on the circle that represents their “player” the cap will be shot at the “strength” or “distance” corresponding to how large the arrow is and then the cap will either miss or be made into the cup, creating a “splash” effect and initiating rebuttal playto determine if a point is scored. (If you are confused on the rules) I understand that programming a “drinking game” may not be a acceptable in the class and if that is the case I will change the graphics to coca cola and pepsi caps. Otherwise I believe I have a good conception of how the game will work and how I will program it and hopefully if I design it correctly I would love to actually get it working on a iphone or ipad over the Christmas break and would be a great exhibition of the skills and abilities I acquired in this class and could actually be something I get others to play even outside this class. -Don

By saudiduck

riverChallenge Assignment due 11:59 pm. on Wednesday (11/21)

Well that was fun I guess. At a time where every waking moment should be spent trying to finish an inordinate amount of assignments, projects, meetings and “life stuff” I was actually able to find some solace in coding this assignment. Something about typing code in and then getting a direct, specific and uncomplicated result really is a hard feeling to recreate. Yes, the opposite feeling of typing something that makes complete sense and then receiving a page of errors, backwards swimming piranhas and having to read lines and lines of codes looking for an accidental “:” instead of a “;” can cause an opposite, mind numbing sense of frustration, but when everything works when coding it actually works and nobody can take that away from you. Anyways I enjoyed this assignment, and like I may have mentioned previously I am getting to a point where I can put “action script and flash experience” on a resume or linkedin profile and not worry I would be called out on it and not be able to perform. If I needed to complete a project for a client in flash I feel like I would be able to do so with a few references to old files made in this class or a few key google searches. I didn’t run into many troubles with this assignment that weren’t merely clerical or syntax related. I had some trouble getting the piranhas or “alligators” to always face the correct way but I don’t feel so alone as the example project had a similar problem and a few emails to the chain have mentioned a similar issue. The “river loophole” issue was an interesting problem to solve but I eventually solved it by not allowing the farmer to drop an animal (or cabbage) when in the river. Although it may not have been the logical issue we were intended to solve I felt like the player shouldn’t be allowed to drown the animals anyway and solved the problem differently but with sufficient justification. I made some modifications to the provided code such as making the sprites smaller in order to make the game easier to test, but once again since we are using a primitive collision detection method this modification can be justified because the game is easier to actually win at, and giving a player a fighting chance can be seen as an important aspect of game design. Anyone play the final few levels of Mario 64 where there is no “ground” just floating platforms? Possibly the Achilles heel of one of the greatest games ever designed!

My game in action including the boat I added to the farmer. Although he might be a very good at solving logic problems, he is not Jesus and should not be believed to posses the ability to walk on water….

Lastly one other simple modification I made to the game was a test to see if the farmer was in the river. If he is a simple “goToAndStop()” command brings his movieclip to the second frame which includes a make shift boat below his feet. Exit the y-range the river and another similar command brings him back to frame 1. All in all the assignment was a great assessment of our abilities and exhibition of the knowledge we have gained this semester. -Don

A link to my final .swf:

http://dl.dropbox.com/u/110092052/Don/riverChallenge/riverChallenge.swf

By saudiduck

Air Raid homework 2 (Due before 1:59 am on Thursday, 11/15)

My final Air Raid game with new cheezy space invaders graphics!

After a few struggles I was able to complete the functionality for the Air Raid assignment. I was even able to change out the graphics to give the game a personal touch. All in all I didn’t run into too many problems going through the code. The collision detection was a fairly brute force but straightforward approach that benefited greatly from the hitTestObject method which once I was explained how it works collision detection became much easier. I am excited on how far I have come with my abilities in flash and finally feel as though I could truthfully say to a potential employer or colleague that I have experience in action script and flash programming. I am also excited to see where we go with the brief time we have remaining in the class. -Don

By saudiduck

Air Raid homework (Due before 1:59 am on Tuesday, 11/13)

A demonstration of my animated explosion, complete with extra appendages…

Tonight’s assignment came in two parts, with the first part being considerably easier. The animated explosion was fairly straightforward and was pretty easy to follow along with in the book. The second part took more insight and considerable more work. I was able to code the majority of the parts of the air raid game outlined in the book. My aagun moves, grows, shoots and even stops shooting after running out of bullets. My planes are realized at random intervals in one of two directions but unfortunately still have some problems being deleted and do not detect collisions with bullets yet. I have most of the functionality complete and hopefully will be able to complete the rest of the game soon. -Don

By saudiduck

Election Day Special: Thursday’s homework

(The counter works it was just hard to hit the insanity button and not have it get covered by stars, you can kinda make out some of the three numbers)

This assignment was pretty straightforward but does much to foreshadow some very fun and interesting capabilities we now have with flash. “Compartmentalization” of code is a very powerful tool for designing complex systems and we now know at least the basics. I had a few slip ups in my understanding though. Although as you discussed the frame event listeners are somewhat problematic in some areas, they are a very powerful tool for “quick and dirty” animation and so I was excited to try them out. My intention was to have the stars spin on the screen using the rotation property like so:

addEventListener(Event.ENTER_FRAME, spin);

function spin(event:Event):void
{
this.rotation += 2;
}

Unfortunately it did not seem to work and I cannot understand why at this stage in the game. Frame listeners may behave differently within other classes besides the main action script file in which case I would be interested in how to achieve my same desired results in another manner.-Don

Link to SWF: http://dl.dropbox.com/u/110092052/Don/classFrameExercise.swf

By saudiduck

Solving the Problem by Changing the Channel: Programming a Hangman Game in Actionscript

For the Hangman assignment we were encouraged to pick a “theme” and a “lose mechanic” for our game that stemmed from a subject we were passionate about. For mine I picked evidently picked “frustration” and “repeated death by for-loop”… Just kidding, although I did encounter both of these topics frequently throughout the execution, my actual topic was television. Not the most creative passion for my topic but one that was sufficiently “me” for the desired results of the exercise.

Continue reading

By saudiduck

Letter Madness homework due before 1:59 am on Thursday (10/25)

Okay I see where you’re going with this! Although previous assignments have helped us become more comfortable with strings, characters, arrays etc. I have programmed a hangman type game before and wasn’t a hundred percent sure how all of the skills acquired would be helpful in actually programming the hangman game, now I clearly see. Honestly I may even start with all of the code I have in this project (barring some large requirements outlined in the assignment guidelines) and go from there as I can clearly see the framework of a basic hangman game from the code we have written for this assignment. I guess made incorporating an animation for the “scoreboard” might need to be shoe horned into it but even that might not be too difficult. Anyways I actually had less trouble with this project than the previous one and enjoyed the simplicity and challenge of using a single event listener method for all 26 buttons and then parsing out a single character from a giant “event” database of information. Had trouble installing the scrabble font on a lab computer so went ahead and completed the project without it hoping that the core functionality of the program is the more important part of this assignment, but do wish to figure out my issues with fonts in the next couple days as _typewriter is starting to get old. -Don

No

Notice the flourish of making the sentence grammatically correct in the cases of 0,1 or multiple instances of the letter being apparent in the passage.

By saudiduck

Wordplay Homework (Due before 1:59 am on 10/23)

In general this project went pretty smoothly for me. I will admit that my code may not be the most cleanly written as I ended up outsourcing some actions to secondary methods to try and share the functionality, but for the most part I think I achieved the desired results without too much hassle. The only concern I might have is that I may have split the string into word and character arrays a different way than others but I was able to achieve the same functionality regardless. Also not sure how or why your cat friendly button only does one word at a time, but found it easier to use a loop to do all of them at once which I hope does not mean I missed learning some sort of specific functionality, but I doubt it. Below is a screenshot of the program finding the 80th letter after the block of text has been made feline friendly. -Don

"Hello Felinanne White, I'd like to buy a vowel!"

By saudiduck

Pre-HangMan Homework (Due before 1:59 am on Thursday 10/18)

Once again this homework proved to be pretty straightforward. Using our previous three assignments as reference I was able to build to the criteria of the assignment in a little under an hour and a half. I only ran into two significant issues. The first being the creation of the number tiles which were originally named “letter” + (the number on the tile) for the symbol names. When I also named the instances the same thing Action Script was very upset and spit all sorts of compile errors at me. Renaming the symbols to “letterOne,” “letterTwo” etc. and leaving the instance names the same worked out and allowed me to still have the functionality of ” this[“letter” + i] .” Secondly I have a strange runtime error displayed below:

Note the error in the output window lazily circled in red.

The error occurred when I was testing my program, rapidly clicking generate and reset to make sure my click counts and random number generating was fully operational.

My program running and functioning.

Essentially if I start clicking through too quickly the generate button will click but instead of running its appropriate method will through that error, but if I click again everything is fine, somewhat like the program hiccups under pressure as all other functionality is left intact and the program continues running. Did I break flash by clicking too fast? Not a major issue just thought I would see if anyone else experienced anything similar. -Don

By saudiduck

Mad Lib Homework (Due before 1:59 am on Tuesday 10/16)

I think I am actually starting to enjoy coding in flash and action script… I hope not too many other people from the class are actually reading my blog (I don’t except most of us actually are) because I may be jumped by everyone in class on Tuesday for saying so but I actually enjoyed doing this assignment. For the most part the Star Wars Mad lib assignment is an extension of the assignment we completed in class and the Eight Ball assignment with little to no new concepts added but just rearranged and combined aspects of both assignments into a new project. Thus I encountered little frustration or problems that couldn’t be fixed after looking at the compile errors or by referring to previous action script files (note to self and others stop naming all .as files Main.as, its convenient and easy but its hard to find a specific one now that we have so many.) As I believe I have mentioned previously in blog posts, I may completely reverse my opinion in the future as projects become more complicated and subsequently frustrating but, I am finding the way in which flash is such a intuitive marriage of coding and graphic elements to be not only fascinating but even enjoyable. Coming from a coding background where I was frustrated so many times with being unable to work and think on a big picture/macro level, and a video editing background where it is sometimes frustrating if not impossible to tackle problems on a micro level flash allows you to tackle problems with a combination of both. For example, coding such a project as was our assignment for Tuesday in java or C++ would require mastery of graphics libraries and UI elements that are extremely finicky and abstract when looked at as countless lines of code, but with flash I am able to essential draw a mockup like I would in photoshop typically and instead of then trying to create and rationalize that vision through code I just click on an element, give it an instance name and immediately reference it and give it functionality. In a discussion with Dr. Delwiche about “why flash is dead” he mentioned the fact that even though it may be dying nothing else with such an “smooth onramp to the fundamentals of object oriented programming” and I definitely saw what he was talking about when completing this assignment. In comparison to other programming I was asked to do in my previous major flash is building a house with legos, and the languages we were using were like building a house with wood, drywall, sheet metal and brick. The latter may be the way to build a house thats lasts through a storm but the former takes so little time and planning I could rebuild the house after every storm in a tenth of the time. Anyways I didn’t find much problems with this assignment and am still excited to move forward with the class. Just out of curiosity though I thought I might ask a question, in your defense of flash in the face of rapid discontinued support of flash you mention Adobe Air as the solution especially to mobile devices, does that mean I could code something in flash export in some sort of Air format and it would work on an iPhone or iPad? Because there is a simple app my friends and I have been wanting to have (basically a customized score keeping app for a game we play a lot) and I believe I could code it in flash now but would need it to work on an iPhone or iPad for it to be useful. Is this possible? -Don

link to swf file: https://dl.dropbox.com/u/110092052/Don/madLibStarWars.swf

A screenshot of my Darth Vade Mad Lib project. Why do 8bit fonts always look so cool? Also I realize now that dark is an adjective not an adverb but that is a PEBKAC problem (look the acronym up if you don’t know it, its worth it…) and not a functionality problem.

By saudiduck