Tuesday, July 28, 2009

test and debug

Well here we go this is what the class was building up to and im sure you're reading this blog post first so ill explain that i totally lost track of these blog posts.
to learn we must first make mistakes and mistakes i've made have lead me have helped me learn how to make my games look nice and be overall better of course i couldnt have gone anywhere if it wasnt for the other students and my prof. (he knows he's "the bomb dot com") Patrick Smith.

but this is it the experimentation part of the game deign process we look at our code if somthing isnt working correctly and in addition to that we learn from others until we can come up with a solution or find a way to incorperate the flaw into the gameplayi still thin that he goal of the class is not to learn flash coding but learn the process behind game development, using proper program practices, and if anything else how to document work that has gone into a design... which i have trouble getting around to doing.

Coding Enemies

first we had had our enemy follow our cursor location
secondly we set wave points having an on release function as well as using what we learned in character effects lastly we learned how to make enemies follow the hero and when its in a certain range the enemies will make the same moves as you the player makes
on the fourth version we had a camera follow the hero. it stayed stationary but the axis was allowed to change which gave the illusion of following the character

Here we go these are basically what we used for charater effects


_x


0
Zero, the left side of the stage.

_y

0
Zero, the top of the stage.

_xscale

100
100% of original horizonal scale.

_yscale

100
100% of original vertical scale.

_width


completely relative, that is, once changed, there is no stored value representing the original width of the element
_height

completely open
_rotation

-180 to 0 to 180
0 being the original rotation of the instance.
note that -180 and 180 are, visually, the same degree of rotation!

_alpha

0 to 100
0 being completely transparent; 100 being completely opaque

_visible

1 or 0; also, true or false
0 or false being invisible, 1 or true being visible.

read only:
_ymouse

The vertical distance between the mouse and the registration point of a movie clip.
To find the position of the mouse relative to the top of the main stage, use:
_root._ymouse



Here we go: running and platforms and jumping

Basically the movement is similar to what we learned earlier with overhead movement jumping is easiest to explain by showing you this
if (Key.isDown(Key.UP) && !jumping) {
jumping = true;
}
if (jumping) {
this.gotoAndStop("jump");
this._y -= jump;
jump -= .5;
if (jump<0) {
falling = true;
}
if (jump<-15) {
jump = -15;
}
}






Plat forms are simply hit tests that tell it not to fall anymore and then the hero is always falling if its not jumping or on platform the code is constantly checking to make sure if it is

Here we go: Drag and Drop

Dragging and droppping in flash by turning the pieces in to movie clips we set frames for which the computer was different colors green and yellow corresponding to the paint brushes we had. the code we started with was on the instances themselves

on (press) {
startDrag ("_root.yellow");


///this is what makes you able to grab the brush on press is while you're holding down the mouse button on a on release is of course when you let go of the muse button///


}
on (release) {
stopDrag ();
if (_root.yellow._droptarget == "/computer") {


///if the yellow paint brush is dropped over the computer this instance will go to its internal frame labled yellow where it is painted different color///


_root.computer.gotoandStop("yellow");
}
}
we moved this code to a layer devoted only to action script did the same for a green paint brush and also used some things we learned in character effects to make the selection move to a specific location on screen

Wednesday, June 3, 2009

colision detection , sounds, score keeping, and timers

well i posted all four of these because i did them the same day and i would like to consider them similar projects that and i hate having 100 short blog posts instead of a long hearty post. Oh and im kind of lazy.
collision detection was my first one which i ended up playing with on the last part of the game presentation last semester .hitTest ftw

we quickly moved from collision detection to score keeping mostly with the "if x is over y then points go up" .hitTest also during the score keeping we also had hit the button situations i used squids and during this i found out that you can have said buttons move so i have moving squids that when clicked either plus or minus the score.

after this i kept the same file open and made these same squids my player for music, so at this point i have the worlds most interactive mp3 player. (sad part is it only plays my story)

timer was added to my game test which is my constantly changing game file and i chose to use the dynamic text mySeconds++ type of code from the topic on the wiki.
i sitll got a lot to figure out but im starting to get the hang of this

finding solutions and learning from others

roughly both of these topics are relative because that's the pure basics of our class. to learn from others we got to be sure we are learning and not simply just plagiarize so when and if we copy code we make sure that we look up or try and figure out why the action script does what it does. As for finding solutions we roughly study look it up on the wiki, google solutions, and even you tube.