Alice Community

Alice Community (
-   Share Worlds (
-   -   Infiltration 2 (Engine Beta) (

Chris101b 12-11-2008 04:33 PM

Infiltration 2 (Engine Beta)
1 Attachment(s)
I just thought that I would post what I have made over the past few days. If you have any suggestions/problems just tell me. I am also posting this because if I need help, then you will have what I have so far right in front of you. Here are the controls so far:

Arrow Keys: Walk/aim
Space: Shoot (Have not added bullets yet)
F Key: Zoom in/sniper mode
R: Reload
D: Roll left
G: Roll right
E: Quick turn 90 degrees left
T: Quick turn 90 degrees right
J: Hurt yourself (To test the health system)
Enter: Stop music

Note: Below is the most recent version.

Chris101b 12-11-2008 09:06 PM

The Infiltration 2 (Engine Beta V2)


1. Added a working snipe mode (No bullets yet)
2. Added the burst fire shooting mode (No bullets yet)
3. Added shooting flash effects
4. Added temporary sound effects

(Remember, this is just an engine beta, which means that there is no one to shoot and no story. I want to get the gameplay right before I start with the actual story)

Any questions/comments/ideas are welcome.

NOTE: Download the latest version in the first post

Chris101b 12-12-2008 06:30 PM

Infiltration 2 Engine Beta (V3)

1. Made it so that only 1 flash appears when in sniper mode
2. Made it so that the camera tilts up when the sniper is shot
3. Made it so that when the sniper is shot and the scope aims up, the camera stays at the same height. It doesn't slowly rise up over time.
4. Added the overheating gun barrel feature (The sniper is considerably more powerful than the burst shot, so when it is fired, the barrel overheats and you cant shoot at all for 7 seconds. This balances out the fact that the sniper is a much powerful weapon than the burst. If you are going to shoot with the sniper, make it count)
5. Better synced the flash from the barrel to the movement of the gun
6. Increased the time between burst shots slightly

Please do not hesitate to tell me what you think of the "engine" that will drive Infiltration 2. Give me your comments, suggestions for features, what did you like/dislike, or tell me if you have had any problems.

NOTE: Download the latest version in the first post

Chris101b 12-14-2008 12:52 AM

Can I get some feedback? Silence scares me. :(

DrJim 12-15-2008 08:54 PM

[QUOTE=Chris101b;7786]Can I get some feedback? Silence scares me. :([/QUOTE]

Be careful - silence may be better than the other options. :D

Actually it looks like an interesting concept - but with a quick look I really have a hard time figuring out what you are trying to do. Working through the events in detail (with no comments) - and trying to figure out what is happening - is sort of like one of the games where you just wander around looking for treasure.

My suggestion would be (1) to start working on an introduction/instruction screen and and a help package and (2) add some comments to the code if you want serious feedback.

Chris101b 12-15-2008 09:44 PM

That is a good idea. Ill add that in v4 of the program. Basically what I am doing is that I am getting the gameplay of the game down pat before I go into making the story and everything. I want to get rid of any glitches and want to show what the gameplay is going to be like. Also, if I'm stuck, you will have my up to date world right in front of you. It is basically a beta so that I can iron out the flaws. I will add all that information when I upload the fourth version on here soon. I just wanted some kind of feedback. If people found any glitches or if anyone had any thoughts on what I could add. Anyway, thanks for the heads up.

Oh and about adding notes to the code... it is really hard to try and explain the coding because I have put a lot of complicated stuff in there that is hard to explain in typing. There are a bunch of boxes underground that tell the program what to do. I tell the bounding box to come on and off for certain ones when I want something to happen. For example, I told the program that (Just making up something) when SPACE is pressed if box1 bounding box is showing do a burst shot, and if not, do a sniper shot. Well when you hold the sniper button, the bounding box of box1 becomes visible. That is why when you hold the F key, down, you snipe instead of shoot a burst. What kind of feedback I was really looking for was something like ideas, or anything that you liked or didn't like, or think that I should change. Stuff like that so that I can make changes to the gameplay now before it is too late. Thanks for the heads up. Ill add directions into the game now.

Chris101b 12-18-2008 12:48 PM

Well, V4 is done right now and I still have a lot to add (maybe). So here is a list of changes that I made. (special thanks to x2495iiii for helping me with the whole reloading thing)

1. Fixed a “Teleporting” problem with re-leveling camera when sniping
2. Added all sniper sounds
3. Added burst fire sounds
4. Synchronized the burst fire timing, and sound timing to play at the same time
5. Added a targeting reticule to the sniper scope
6. Made it so that you cannot shoot when going into snipe mode and coming out of it if you do not shoot (During zooming and un-zooming animation)
7. Fixed a minor “Side walking glitch” (The character was running into the smoke from the gun and moving to the right when walking in sniper mode)
8. Made it so that after you shoot, you cannot get out of sniper mode until your camera goes back level again.
9. Added notes to the game to give basic info and tell you how to play (It is in the main code box)
10. Added a reload feature to the game. You have 5 shots before you have to reload (will add permanent animations later)
11. Made it so that you cannot shoot the burst shot or zoom in with the sniper while reloading.
12. Made it so that you cannot reload while shooting the burst shot.

Please leave feedback... positive or negative, I dont care, just leave something that I can possibly make changes off of.

NOTE: Download the latest version in the first post

x2495iiii 12-18-2008 12:54 PM

Am going to try it right now. I'll leave feedback in an edit.

Very impressive, in my opinion. Has great potential. If you need any more help, don't hesitate to ask. Also, if you have any opinions or ideas for my worlds, go ahead and shout those out too.

(I'm finally a senior member! Sweet!)

DrJim 12-18-2008 04:21 PM

Oh and about adding notes to the code... it is really hard to try and explain the coding ...[/QUOTE]

I agree that an [B][I]explaination[/I][/B] is very hard to do in comments :eek: - but what is really helpfull is some sort of header information like "this section of code handles aiming of the gun", etc.

Usually, if you know what a section of code is supposed to do, you can figure it out from there. But if you have no idea of the goal - it's a treasure hunt without a map.

Chris101b 12-18-2008 10:59 PM

There is no goal. It is just a beta, a test. There is no goal and no reward. It is just a world that I am using to test the gameplay aspect of the game (Shooting, animation, sniping, etc) I want to get the character movements and stuff down before I make the actual game. Ill tried to add coding clarification but it wouldn't let me add anything in the Event Box. That is why I am having trouble explaining things. Any ideas?

x2495iiii 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.

DickBaldwin 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?

Dick Baldwin

Chris101b 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=x2495iiii;7975]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.[/QUOTE]

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.

Chris101b 12-19-2008 02:18 PM

1 Attachment(s)
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.

Chris101b 12-19-2008 02:39 PM

1 Attachment(s)
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.

Chris101b 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.

Ch0pStickS 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.

Chris101b 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?

x2495iiii 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!

Chris101b 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.

Ch0pStickS 12-22-2008 06:29 PM

some things you should add:

1. a shot counter

and also

2. a way to change the sensitivity of how fast it looks right and left.

btw, tell me if you need help with anything.

Chris101b 12-22-2008 08:35 PM

[QUOTE=Ch0pStickS;8060]some things you should add:

1. a shot counter

and also

2. a way to change the sensitivity of how fast it looks right and left.

btw, tell me if you need help with anything.[/QUOTE]

Those are really good ideas, Ill see what I can do. Thanks!

Chris101b 12-22-2008 09:39 PM

Alright, I want there to be collision detection in the game, so I have to use the "Arrow Keys Control Camera" thing. The only question is how can I make it so that people can decrease the speed in which the camera turns. I tried making it so that when left was held, the camera turned left -5 every 5 seconds but when I held the left arrow key, it would move to the right first and then start moving to the left (due to fact that it was a negative rotation). It slowed the camera down, but had an unnecessary right turn in the beginning. Also, if I made everything 0 so that there was no increase or decrease in turning speed, it was like the camera was lagging slightly. Is there something in the settings that let you control the camera turning speed? Unless all you want the camera to do is increase the turning speed. But if I do that, then when there is no alteration in turning speed, the camera will lag.

Chris101b 12-22-2008 09:49 PM

Alright, I think I actually got it, but it will require the player to change a couple of numbers in the events box. When the world is opened, the camera speed is disabled. If the person wants to increase the speed look sensitivity, then he/she has to go into the events, scroll down to find the two that are disabled, enable them, and then change the sensitivity to what they want. 0 is the lowest it can be, and they can change it to whatever they want. The higher the first number, the faster the speed. If anyone finds an easier way to do this please tell me. Thanks.

x2495iiii 12-22-2008 10:29 PM

can I see the code? I may be able to help.

Chris101b 12-22-2008 10:43 PM

Of course.

x2495iiii 12-22-2008 11:04 PM

Seems effective enough, though I only noticed a difference when I used extreme numbers. maybe 10 is too high of a denominator? i tried using 2, it made the difference between .25, 1, and 2 much more visible.

There is a different way. There is a turn at speed method at the lower end of the method menu for the camera. just have the number the user changes be the speed in whcih the camera turns. You may want to add some math on the end of it, though, as turning at speed .5 revs per second is FAST.

Chris101b 12-23-2008 02:01 AM

Alright, I changed the look sensitivity into a function. Because of this you dont have to change 2 things hidden somewhere in the code. It is now under the functions tab of the camera. Also, I'm going to leave the denominator at 10, because the higher the denominator, the higher the communicability. One thing though, how would I make it so that the functions number lessens when I go into sniper mode. I want to change this because whenever I go into the sniper mode, the look sensitivity is so much higher because the camera dimensions have changed. Is there anyway to change this function during the game so that the sensitivity isn't so high for the sniper mode?

x2495iiii 12-23-2008 04:53 PM

You could change the denominator to a variable which equals 10 while outside sniper mode and equals something else when in sniper mode.

Chris101b 12-23-2008 07:45 PM

Well I actually upped the look sensitivity denominator to 20 so that it is even more customizable and it seems to work fine. Also, I did what x2495iiii said and changed the denominator to a variable and fiddled around with it and made it work. Thanks for that suggestion. Now, no matter what your look sensitivity is on, the sniper mode will always use the same sensitivity. Unless of course you put it on some ungodly number which would make it impossible to play. Any other suggestions would be greatly appreciated. Do you want the sniper to be the same look sensitivity or do you want me to make it so that it is slightly slower than your regular sensitivity? Ill post the current world on here soon. Maybe either later tonight or tomorrow.:D

Chris101b 12-23-2008 08:53 PM

Alright, here is V5 and all the changes that came with it:

(Note: To increase the look sensitivity go to the camera, click on the functions tab, and click the edit button by the thing that says look sensitivity. Put it at whatever you want. The higher the number, the faster the turn speed is.)

(Another note: I have added a health system, so to hurt yourself, just press the "J" key. The way the health works is that once you are hit, you will start healing yourself in 5 seconds. This means that if you get hit once and then 4 seconds later you get shot again, your health will begin to re-heal in 1 more second. Once the healing process starts it cannot be stopped until you are healed. This means that you can still be killed though. I will try to change this to make it more like what it is in halo in the next version.)


1. Changed the boundingBox variables into numerical variables
2. Added look sensitivity
3. Added player health with recharging shield. (Press J to hurt yourself)
4. Added sound to the recharging health and a sound that signifies that your health has recharged.
5. Made it so that the look sensitivity is always at normal speed when in sniper mode.

NOTE: Download the latest version in the first post

x2495iiii 12-23-2008 09:45 PM

Good stuff, but I'd make the follwing changes:

Change the health bar's color to something like green, blue, or red.

Add a shot counter. Also I'd deactivate the Space bar reload that happens when you just mash the button. Adds challenge to the game.

Adjust the volume of the healing sounds (both of them) so that they're quieter. I could see them becoming annoying quickly at that volume in normal gameplay.

Chris101b 12-23-2008 09:50 PM

The health bar color is definitely going to be changed . I was actually going to try and make it so that the lower it goes, the more red it gets. I was thinking of making it either light blue or green. Ill add your comments to the list of changes and see what I can do, thanks.

x2495iiii 12-23-2008 10:29 PM

i was experimenting with using the slider as a health bar, I'll post it if/when I get it working

x2495iiii 12-23-2008 10:44 PM

Got a basic idea. Press and hold v to see the health bar "go down", then release for it to go back.

Chris101b 12-23-2008 11:53 PM

Hmm, I tried the bar and it is very sensitive to resizing once it gets past the beginning part. It also fails to recharge sometimes. Also, I tried to make it so that while the V key was held, that it would keep resizing and it basically shot off the screen. I might stay with the health system I have currently. I was thinking at different points I would tell the program that when it is at a certain distance to change to this color and repeat a few times. Also, my health bar is in its purest form. In versions to come I will add things around it, a thing that says health at the top, and the color changing thing that I said before. Thanks for your help though.

x2495iiii 12-24-2008 12:08 AM

Yeah I didn't finalize it, I figured you'd want to do that. Oh well it was just a thought. I figured it would be easier than making a color change method, since Alice doesn't give you the option of aking the RGB components into variables, you'd have to assign direct color transitions (Green to yellow, yellow to orange, orange to red, etc) instead of being able to go gradually from green to red.

If you do choose to keep your current health bar, though, could you make it semi-transparent? that'd look cool, like a digital HUD type thingy.

Chris101b 12-24-2008 12:20 AM

Very cool idea, ill have to do that. I knew that gradients didn't work in Alice, so I planned to do the "Green to yellow, yellow to orange, orange to red" from the get go. Shouldn't be that hard. I also added a border around the health bar and will have to add some more things to the HUD later on (like shot count, a thing that says that the health bar is the health bar stuff like that). Remember everyone, if you have an idea, feel free to tell me. Trust me, I wont laugh in your face if I don't want to put it in. Thanks.

x2495iiii 12-24-2008 02:32 AM

Personally, I'd add a crosshair or something to better show where the bullets go. maybe even a lock-on option (though those are HARD to write, I'm writing one now).

Also, I'd add a third weapon. Something cool, maybe even utilizing the Laser-like attachment underneath the badGuyRobot's gun already.

Chris101b 12-24-2008 02:40 AM

I am going to add a cross hair or a dot or something after I add the bullets. You have to add the bullets before you can mark where they will land.

Negative on the lock on targeting. I don't think that I will need that feature in the game.

A third weapon is a thing that I have tossed around for a while. I don't think that I will add a it though. The entire code has been built around the two weapons and I don't think that it would be necessary. That's not to say that I wont add a new weapon, but it is just something that I don't want to do right now. I might experiment with it later on though. You never know, if I get a spark of genius, I may decide to add one. IDK, it all depends.

All times are GMT -5. The time now is 04:28 PM.

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