Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Reply
 
Thread Tools Display Modes
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 12-19-2008, 08:40 AM

Don't worry about your events, they should be either motions (which can be inferred fairly easily) or methods, which CAN have comments at the top and which should be named descriptively enough to figure out.


(')>
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 12-19-2008, 09:56 AM

Unfortunately, I was unable to get it to run under Alice 2.0 and Windows Vista Home Premium Edition. Have you made it into a movie, or is that even a reasonable thing to do?

Thanks,
Dick Baldwin
   
Reply With Quote
Old
Chris101b
Senior Member
 
Chris101b's Avatar
 
Status: Offline
Posts: 361
Join Date: Jun 2007
Default 12-19-2008, 01:05 PM

Well it is a game right now, and it is in the beginning stages. So if I was going to make a video showing the gameplay, I want to have either most of it done or all of it done. Might be a while though.

Quote:
Originally Posted by x2495iiii View Post
Don't worry about your events, they should be either motions (which can be inferred fairly easily) or methods, which CAN have comments at the top and which should be named descriptively enough to figure out.
As for the comments, most of the things going on occur in the events bar if you look. Only a handful of things go on in methods. I can add notes to all of the methods and that will hopefully clarify something. I can even right now go through each event and tell what each one means. That will definitely make it easier. Ill do it if you want me to.


I am nowhere and everywhere at the same time.

www.facebook.com/chris101b
Xbox Live GT: Chris101b
Youtube: (You guessed it) www.youtube.com/chris101b

Last edited by Chris101b; 12-19-2008 at 01:12 PM.
   
Reply With Quote
Old
Chris101b
Senior Member
 
Chris101b's Avatar
 
Status: Offline
Posts: 361
Join Date: Jun 2007
Default 12-19-2008, 02:18 PM

Ill just do it here:

When F (Sniper mode button) is pressed, the "Shoot while going into snipe" variable becomes true. (Because I had just learned how to use variables, I only figured out how to make the objects "BoundingBox" appear. So I use that for a couple of the variables. Figured everything out though now) What this does is that it makes it so that while the sniper is going into sniper mode (Doing the zooming animation) you cannot shoot. In the zoom in method I made it so that the box becomes false after it zooms in. In the "During" part, here is what is going on. The first "If Statement" says that if the gun is reloading you wont go into snipe mode. The "If Statement" in the main "If statement" says that if the person is firing a burst shot, he cannot go into sniper mode until after the 3 shots are done. (Note: Most all of the variables are changed in the methods and cannot be seen here) In the "End" part, it is saying that you cannot come out of snipe mode until after the shot has been taken. This is done by saying that when the sniper shot is taken, the "Box3 BoundingBox" becomes visible. Therefore in the time it takes to do the shooting animation (Sound, the up and down motion) you cannot zoom out on your own. You have to wait until the animation is done with.
Attached Images
File Type: jpg While F is pressed.jpg (65.7 KB, 139 views)


I am nowhere and everywhere at the same time.

www.facebook.com/chris101b
Xbox Live GT: Chris101b
Youtube: (You guessed it) www.youtube.com/chris101b

Last edited by Chris101b; 12-19-2008 at 02:21 PM.
   
Reply With Quote
Old
Chris101b
Senior Member
 
Chris101b's Avatar
 
Status: Offline
Posts: 361
Join Date: Jun 2007
Default 12-19-2008, 02:39 PM

The next few parts tell the gun to move up and down and to the left and right as you walk. When you let go of the button, the gun will return to its normal shooting location. This makes it much more realistic than if your gun did not move at all while you were running. I hope that when I add the bullets, that this will make it so that you can't just run and gun through the game because if you run and shoot, your accuracy will be thrown off due to the gun movements.

Alright, the next 2 events listed below do this:

In the Begin section, the main "If Statement" says that if the space bar is pressed and the gun is out of ammo, then it reloads. The "If Statement" inside that one says when going into snipe mode, the gun cannot shoot. The one inside that one says that if the gun is in snipe mode when space is pressed, then the gun shoots a sniper shot. The "If Statement" inside that one says that while the gun is reloading, do nothing (As in the gun cannot shoot while it is reloading) and if it isnt reloading, shoot the regular burst shot.

The next Event basically tells the program that when the F button is pressed, the sniper mode variable changes allowing everything relating to the sniper to happen. Then when you let it go, it becomes false.
Attached Images
File Type: jpg While Space is pressed.jpg (74.8 KB, 133 views)


I am nowhere and everywhere at the same time.

www.facebook.com/chris101b
Xbox Live GT: Chris101b
Youtube: (You guessed it) www.youtube.com/chris101b
   
Reply With Quote
Old
Chris101b
Senior Member
 
Chris101b's Avatar
 
Status: Offline
Posts: 361
Join Date: Jun 2007
Default 12-19-2008, 02:45 PM

I wont bother putting a picture on the last event here, but it basically says that when R is pressed (Reload button) if the ShotCount is at 0 then do nothing (Why would you reload if you haven't shot anything???). The "If Statement" inside that one says that you cannot reload while shooting. But if you are not reloading, then you will reload when the R button is pressed.

I really hope that this helps people understand the code. This is my first game that involves the use of variables and I am trying to make it show by ironing out the bugs and making it as realistic as possible. I want to get it right this time. Thanks for any feedback that you can provide, positive or negative.


I am nowhere and everywhere at the same time.

www.facebook.com/chris101b
Xbox Live GT: Chris101b
Youtube: (You guessed it) www.youtube.com/chris101b
   
Reply With Quote
Old
Ch0pStickS
Guest
 
Status:
Posts: n/a
Default 12-21-2008, 01:55 PM

Well, I will check it out sometime soon, but i have some comments first. First of all, you are making your code MUCH more complicated than needed. Also, by using objects instead of variables, you are using more than 100 times the amount of memory needed just for determining Boolean values. Try to make more use of parameters and variables, it will help in the long run.
   
Reply With Quote
Old
Chris101b
Senior Member
 
Chris101b's Avatar
 
Status: Offline
Posts: 361
Join Date: Jun 2007
Default 12-21-2008, 03:14 PM

I know, I stopped doing that. I believe I only used it in 3 variables. I will probably go back and fix it soon. I did that when I was first learning how to use variables and using objects was the only thing that I knew how to do. I now know how to use numerical variables, so I will most likely go back and replace that in the next version. As for the complexity of the code, I probably wont be able to change that because I am still not amazing at making games. I am programing the movements and stuff to the best of my ability right now, so at this point in time, the code is about as complex as it will be in the end. Right now, all I'm worried about is if it works or not, and it does. If I get better, I might go back and make it a little less complicated. What do you even mean by that? Can you give me an example?


I am nowhere and everywhere at the same time.

www.facebook.com/chris101b
Xbox Live GT: Chris101b
Youtube: (You guessed it) www.youtube.com/chris101b
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 12-21-2008, 08:19 PM

Personally, the only complications that I see are the previously mentioned use of objects instead of boolean variables. Other than that, the code seemed good. I really liked the gun turning red after the sniper shot, that was a nice touch! Keep up the good work!


(')>
   
Reply With Quote
Old
Chris101b
Senior Member
 
Chris101b's Avatar
 
Status: Offline
Posts: 361
Join Date: Jun 2007
Default 12-21-2008, 09:12 PM

Thanks for the support, the overheating is to balance out the fact that the sniper is going to be more powerful than the burst shot. I don't want people to use the sniper all the time, so if if they use it, they can't fire or do anything, which could allow them to be shot and killed by the enemy.


I am nowhere and everywhere at the same time.

www.facebook.com/chris101b
Xbox Live GT: Chris101b
Youtube: (You guessed it) www.youtube.com/chris101b
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.