Wednesday, June 4, 2008

G.A.M.E.S.

It has been decided that we have been studying Flash in the field of GUI for Advanced Mastery of Educational Studies, or G.A.M.E.S. I have been working with Max's player code, which has made my job about 1000x easier. He was able to get a better wall code, one that doesn't have any really large bugs like before, and one that allows you to run along a curved wall (I just wished that we had discovered this before the last week of school). My job now is to put it into effect. I am making a "usable program" that focuses more on a maze style of usability. I guess this could be considered a final project... or at least something better to show an audience. Here is an example of a "level":

Only a few days until presentations... I'm sure we'll be ready by then. We'd probably be ready now, but a little less prepared. Though, our current trend of presenting has been to wing it.

Friday, May 23, 2008

I found a site!

I wasn't able to solve my problem, but I did find a good site that will help me solve my problem. http://www.emanueleferonato.com This guy really knows what he's doing. I remember that our freshman project for this class we found that Glenn Rhodes was a good source of help. This time, it will be Emanuele Feronato.

Thursday, May 22, 2008

Unproductivity

Today was the first day in a while that I got nothing done. I fruitlessly searched for any sort of help that I could get about good wall code. Of course, with Richard's web filter in place, any site that has "game" in the url is blocked. This is our wall code so far:


onClipEvent(enterFrame){
if(this.hitTest(_root.player.head)){
_root.player._y = this._y + 14;
}
}



This is in the wall itself.












That is where we get the bugs. I want to fix that before the year is over. I guess I'll just have to find help at home, since I can't get it here at school.

The other half of class was spent on Google earth, finding Zhanar's house.

Wednesday, May 21, 2008

Out on a limb.

So I decided to "break away" from our current project, just temporarily. Since Max decided to tackle the AI for our enemies, I wanted to do things with a more puzzle oriented feel. I started out and things went well. I actually did not have a crash all day for the entire double period on Monday. It was amazing. The day, however, wasn't void of problems. The wall problem that we've always had bugs me, so I am trying to fix it. I had an idea, which I tried quickly, but it didn't work. I think I need to invest more time into it, but checking forums and online sites might be more useful. Getting in touch with people who have solved this problem before is much, much easier. Once I find a good solution, making levels will be a whole lot easier.
Another problem I had is one of those "it should work... but it doesn't" problems. That will be a pain to solve.

Hopefully we will be able to get a working product by the time finals roll around...

...well, something that's worth showing at least. It would be best to have a final product. Something that has a version greater than .4...

Monday, May 12, 2008

We had a project?

This is the first day back to working on our flash project. For the past month we were working on the windmills. I think that it would have been better to work on flash, but Max was the one who initiated the whole "working on this while we're supposed to be working on that" thing. Now we're back to where we were, and I'm still having the same old problems as before. So far, it's crashed about 6 times today. No matter, I've been working on graphics now since Max seems to have a good amount of knowledge of the code. As of today, we are starting to make a "usable program" (because it isn't a "playable game").
Here is the library of things so far:



More to come.

Wednesday, April 16, 2008

Presentations... with another error

Well, since I haven't had a chance to blog about the presentations of last week, I will do that now, because my computer is having the same old problems with Flash.

Max and I went first. I didn't think we'd have a lot to talk about, but enough to fill 10 minutes for each of us. We did, in fact, have enough to fill about 35 or 40 minutes. We basically talked about everything we've done with Flash. Mostly we mentioned the Key presses, Hit tests and the Money variable.

Alec is working on C.
Zhanar is working on Visual C++.
Nate is working on Java.

All of these were interesting, but I don't have time to expand.

Monday, April 7, 2008

Maps

Since it is the new quarter, and we need to start working on our final project, Max and I have decided to split up the jobs. As of last Friday, I have been making maps/environments.

This is just one example, and it happens to be the first place that you are in. Then you travel into the city where you explore for a bit, and move out towards... where ever he's going.

I have been having many problems concerning the Vista/Flash war that my computer decided to conduct. I think I counted 6 crashes and one BSOD. Not very pleasant. One option is to not use my laptop, and just grab a school comp, then use my desktop for outside work... or maybe install XP pro onto my laptop... or keep suffering.

Thursday, April 3, 2008

Even the smallest progress is good.

I have made a little progress in my attempts to fix all of my problems. At the moment, I can run my program without any errors popping up, but the sword animation stops when I hit space, instead of playing. Also, when the sword animation is going, the feet animation does not play. When the sword animation is stopped, the feet animation plays. I'm sure there is a solution to this, but it might again be attributed to Vista. I never would have guessed that I would be blaming all of my compatibility problems on Vista. I say this as Flash MX 2004 stops responding...

But, with my new code I might be able to go somewhere with this. Then after I get that fixed, Max and I can collaborate. We should be able to make a decent ga... uh, program, once we start working together.

Wednesday, April 2, 2008

Vista hates Flash

Well, we've ultimately decided that Vista hates Flash, demonstrated by the slowness of opening a movie clip, the 80% chance that it will open correctly when I click the icon, and the whole UP+LEFT problem has now been tagged onto that. Max, who is working on XP here, can make an animation when Key.isDown(Key.SPACE)and move UP+LEFT, but I can't.
As far as making the animation for the sword swinging... I seemed to have devolved on the evolutionary chart. I don't quite remember what I did to to make the animation go, let alone trying to make it so that the animation plays all the way through once the key is pressed. I'm getting errors that I did not have before.

Thursday, March 27, 2008

Nothing still.

I tried again to come up with a solution, but again I failed at creating one.
I think it's about time to consult a forum, or FlashKit... or something, just so I can make some progress in the next few days/weeks/months/rest of the year.

Wednesday, March 26, 2008

Still no luck on my end...

Well, I had minimal success today. I was able to get the guy to turn in every direction and move that way, so he's always walking forward and not sideways (or moonwalking). The part that I didn't have any luck with was the sword button. I kind of screwed it up for now. What has been happening is that he would do the action when the space bar is down, and stop when it is not down. That problem made sense to me, seeing as the code did exactly that. What I want it to do is to play the entire clip and then stop. That way he'd finish his swing and you wouldn't need to hold down the space bar for the entire time. Once I figure that out I can add in other... how should I say... techniques. For example, he thrusts outwards when the the spacebar is pressed and a wide swing when the CTRL button is pressed. It should be interesting. And we've decided that the UP+LEFT movement problem is just a Flash bug. It might be solvable, but not by me. I'll do some looking into that later.

Monday, March 24, 2008

UP and LEFT??

We've made some progress over these two periods. I had to go take Yearbook pictures for almost a whole period (because we are desperately in need of them). What I have created so far is a guy, who's holding a sword, that can walk around and swing the sword.



Basic? yes. Awesome? yes. Useful? sure, why not. The one problem I'm having, however, is that the guy doesn't seem to want to move UP+LEFT when he's swinging the sword. He moves UP+LEFT when he's not swinging it, and he can move in any other diagonal direction while swinging it. It's frustrating, but solvable. Hopefully it wont take too much time to figure out. Meanwhile, Max is working on hit tests. As soon as he can figure it out, we can start making something cooler.

Thursday, March 20, 2008

Moving_guy

So far, our experiments with Flash have been somewhat successful. We've been able to move a figure in 4 directions (Up, Down, Left and Right) and also rotate the figure in those directions. That was a good feeling to get that done, because when we used Flash before, we weren't able to do that. Now, I have two problems/projects to do. Rotate the guy in the other four directions (between the four ie. UP RIGHT). Max has apparently found out how to do that, but I don't know what's wrong with my current code. It's frustrating... But my other project is to animate the figure when you're pressing a key, but not any other time. That shouldn't be too hard, seeing as we have a trusty resource called Flashkit.com. It solves most of our questions for us. The one downside is all the examples are in CS3, and I only have MX 2004. Hmmm...

Monday, March 17, 2008

It's back to Flash

Max and I have gotten back into working with Flash, since that seems to be a common interest with the both of us. It seems now, after working with C++ and JAVA that coding ActionScript will be easier. We've already worked out a few problems that came up. One was with a "quit" function and the other was a string problem. First of all here is the "quit" function:

on(release){
fscommand("quit");
}

The problem we were having was that you need to run the program as an SWF file. You cannot run the program in Flash. The other problem was just that Max didn't add in a +. When you code for inserting strings into text, you need "Your Text " + isherestring, or something of the sort. It's a lot like JAVA.

Overall... It looks promising.

Thursday, March 13, 2008

C++ get's an F--

I got Microsoft Visual C++, and am so far throughly confused. I guess it will be like NetBeans all over again. I need to find some easy to use instructions on how to actually use VC++. I tried writing a few simple things, but none of them would build correctly.


Confusion is not fun.

Wednesday, March 12, 2008

First Day Back

It's the first day back from a two week vacation (in which I attempted to learn Java) and I'm already having problems. I suppose I should start out this blog entry by explaining what I did before vacation started, since it appears that I did not write something then.
From what I can remember, and looking back at the program I made, I was working with strings. Since I used strings in Java, I can now compare methods. The one difference is that the program I used, NetBeans, has a visual component that Dev C++ does not have. In making the GUI, the program can define variables for you, whereas in Dev you have to define them. It isn't all that hard, however:

int main()
{
char firstname[50];


That's it. Then you can apply it to the program:


cout<<"Please enter your first name: ";
cin.getline ( firstname, 50 );


This was a fairly successful program. It isn't all that special, but it works the way I want it to, which is the important thing.

Now on to todays doings. I tried to download Microsoft Visual C++ because Max said that it was better and had more tutorials. In conclusion, nothing worked. It stopped responding before anything could even start responding. I'm going to try at home, since it might be something at school. If that doesn't work, Max has a disc with it on it.
While looking for VisualC++, I stumbled upon what's called DarkGDK, which essentially is a game creator/visual graphics additive for VisualC++. That, I believe, would be worth looking into. Even if we don't make any actual games, making an environment would be awesome.

More on this tomorrow.

Wednesday, February 20, 2008

[Blogs][Week]

Because of lack of time and lack of class, this blog will cover last Monday (the 11th) to today.
Monday:
Monday was not a very exciting double, considering all I was doing was trying to figure out what pointers did, how structures worked, and started working on arrays. I moved on from pointers unsuccessfully. I realize what they do, just not how they work. The tutorial was not very helpful, for it was more of a complicated example than an actual tutorial. So I moved on to structures, which made a bit more sense. Structures are used mostly for database programs, as it would seem.

int main()
{
database employee;

employee.age = 22;
employee.id_number = 543927;
employee.salary = 12000.21;


Structures and pointers are probably not going to play a big part in our project for now, unless someone flies out of the sky and explains it to me in layman terms.

With that, I moved on to arrays. An array is basically a matrix, but not quite. A more correct wording is that a matrix is an array. After writing out the tutorial and seeing that it worked, I decided to mess around with the numbers a bit. The double was over by now, and due to school holidays and snow days, I didn't have class until Friday, which was a short class.

Today
Today I messed around with the arrays some more. Essentially, I was just doing the same thing. Here is the code:

#include

using namespace std;

int main()
{
int x;
int y;
int array[50][50];


for ( x = 0; x < 50; x++ ) {
for ( y = 0; y < 50; y++ )
array[x][y] = x + y;
}
cout<<"Array Indices:\n";
for ( x = 0; x < 50; x++ ) {
for ( y = 0; y < 50; y++ )
cout<<" "<< array[x][y] <<" ";
cout<<"\n";
}
cin.get();
system("\n pause");
}



It makes a 50 x 50 array of x + y.
That's it for now.

Friday, February 8, 2008

*Blogpost

I started out the class period trying to fix my simple switch program. I was, for the most part, unsuccessful, though I did come up with a momentary explanation. The problem is that the message displayed doesn't appear on the screen after the case is activated, with the exception of a few times. What I think is going on is that the program has already registered the message from previous attempts so the time it takes to display and the time it takes to close the program is so small that the message doesn't appear. Whenever I change the code, the message comes up for a brief moment, then the program closes. That is the other problem, I can't seem to get the program to pause, but that's the least of my worries right now.
I moved on to pointers for the sake of keeping up with Max. Basically, I know what pointers are and how they work, but I don't know how to use them in an actual program. This seems to happen a lot. I understand what the code does, but I can't get it to function properly. I must say it is a pain.

Wednesday, February 6, 2008

Case 6: Blogging

Because I ran out of time to post a blog on Monday, and there was a snow day on Tuesday, and today was a school holiday, I will be posting today as if it were Monday.

I moved on to switch cases, and I found that they are easier than they sounded. For lack of a better example, they are like program menus. Here is a chunk of code:

switch ( input ) {
case 1:
cout<<"You chose 1.";
break;
case 2:
cout<<"You chose 2.";
break;
case 3:
cout<<"You chose 3.";
break;
case 4:
cout<<"You chose 4.";
break;
default:
cout<<"Why can't you follow directions?";
break;
}
What happens is you enter a number between 1-4 and whatever one you choose, it will run that case. If you pick something other than that, it will display a default message. Currently, I've gotten the cases to work, but the default doesn't work. Another problem is that the message (ie. You chose 4) doesn't stay. It quickly displays and then the window closes. That should be easily solved, but I didn't have time to solve it because...
The second half of the double period was a presentation of Zhanar's Sudoku Solver. We proved that, when solving a sudoku, I am smarter than a computer. That might be an incentive for her to make a logical Sudoku Solver, for the way that her current program works doesn't use logic. We went through the code and Zhanar explained what everything did. I didn't necessarily understand what all the code did, but I was able to understand the basic functions of each bit when explained. It was a good presentation.

Friday, February 1, 2008

Functions!!

These past two days I've been working with functions. Actually, I haven't done all that much. Yesterday (Thursday) was not a very productive day. The extent of my learning was reading about functions on the C++ Tutorial site. Due to many distractions, I never got to the coding part. Today, however, I did. It was as easy as I figured it to be. My only problems were human error (forgetting an int main() and a few ;'s. I actually solved a problem on my own, but it turned out to be my own fault again. I forgot to add cin.get(); at the end. Here is the code:


#include

using namespace std;

int mult ( int x, int y );
int main()
{
int x;
int y;

cout<<"Please input two numbers to be multiplied: ";
cin>> x >> y;
cin.ignore();
cout<<"The product of your two numbers is "<< mult ( x , y ) <<".\n";
cin.get();
}

int mult (int x, int y )
{
return ( x * y );
}

This program, which is an example from the tutorial, asks you for two numbers and multiplies them. A very basic example of functions.

I still have more to work on with the functions. The more advanced functions will be tougher and, judging by what's ahead of me in the tutorials, I might want to spend more time with the simpler things and make sure I have them down.

Monday, January 28, 2008

While ( I do loops)

Today was loop day. I finished up learning about if statements, and found all the answers to Friday's questions at the bottom of the tutorial page! I just hadn't read that far. As for loops, I found that they were also pretty easy, except for the last one. There are three different loop formats: For, While and Do-While. Essentially, For loops do whatever is in the parentheses and display the output. While loops is when the integer is true, do the following function. I'll have to revisit Do-While loops and work with them until I fully understand their use.
My current trend of doing the tutorials is to write a code that is similar to the tutorial yet expanded slightly, then incorporate some aspect of the previous lesson into the program. Because I was working with if statements before, I put an if statement into this program. The basic gist of it is:
It asks you for a number.
You give a number.
If you give a certain number it displays a message.
Otherwise it counts up by increments of 1 to the number you give.

After working with C++ for a good while now (actually only a week) things seem to be coming easier to me. I understand what functions do. The only previous coding experience was Visual Basic. The one difference between VB and C++ is that VB likes words/text whereas C++ has more shorthand codes.

More on Wednesday.

Saturday, January 26, 2008

if ( friday == short day) {

Fridays from now until the end of ski season will be short, partnerless days. That's not always bad though, it gives me time to catch up to Max, but I don't think that's going to happen any time soon. I moved on to lesson 2, which is about if/else statements. They seem fairly simple and very similar to the if/then statements of Visual Basic, only then gets replaced by cout or cin or some other function. I made the mistake of trying to expand on the example program before actually doing the program first, but I don't think that it means very much. I was testing to see if and was a legal function (example: if (x >= 0 and x <= 10) }). If anyone has any solution, or knows the actual coding for that type of statement, leave me a comment... please. In the meantime I'll be doing the next lessons, so if that pops up before someone tells me, I'll emphasize that.

Now I need to figure out what to do for my two hours...
...and don't we need to write up "proposals" for what we're doing (<-- question for Richard)


The bad pun titles are always going to reflect what I'm doing... and they're not going to stop anytime soon. :P

Thursday, January 24, 2008

//Day two

Today was day number two of the indy project. Today, I didn't do very much, but the little I did will help me very much in the future. When Max introduced me to C++, I checked out a tutorial site to get me on my way. I found out how to create a program, write the program to insert text and variables. It did not do all that much, but it was a good start. Today, I commented on all the lines, saying what every bit of code does in the program. As I said before, it wasn't very much but it will help in the future.
I also got a few books on C++, so I'll be looking through those as well as continue the Internet tutorials.

Wednesday, January 23, 2008

Computer Independent Study... Again!

It's time for yet another Independent Computer Study. This time it's all about software. I am working with Max this time. We each have our own ideas of what we want to do, so right now the hardest part will be setting a direction. An outline will greatly help here.

1. Coding
a. C++
b. C
c. Visial Basic
2. Graphic Programing
a. Maya
b. GMax
c. Wings 3D
3. Combining the two for a final project.

The project will be based mostly on the first section, the coding part. The graphic programing was a result wanting to modify (mod) an open source game that we each play. As far as I know, we're either going to do that, or make something from scratch. I believe that if we want to make something, we're going to have to mod something first. We'll see how this outline deforms as the semester goes on.

http://indyc.blogspot.com/ This is Max's blog. As you can see, he's already created something. Everyone has to start somewhere.

-Ethan