Alice Community

Alice Community (
-   Share Worlds (
-   -   Flight Simulator with AI (

Dj Tech42 06-27-2011 03:35 PM

Flight Simulator with AI
I have been working on a flight simulator in Alice. I hope you enjoy it!

Make sure you read the comments in the Speed Control and Gravity method (my first method) in order to figure out the controls, and you can look at release notes for each version.

In Version 5, I have added a basic dogfight mode where you face a computer-controlled enemy.

Latest Official Release: 7.5
Latest Beta Release: 8.0 Beta 2

[U][B]Official Releases:[/B][/U]
Version 7.5 for Windows: [url][/url]
Version 7.5 for Mac: [url][/url]

[B]Betas (Only download if you are part of developing this game or if you are curious to see the new features being developed. These betas will probably be buggy/unstable. (sometimes laggy)):[/B]
8.0 Beta 2 Windows:
8.0 Beta 2 Mac and Linux:

[B]Version 7 & 8 Credits:[/B]
zero00-main menu design, jet engine volume control
arty-fishL-scripting for saving to files, string to int conversion script
legolizard-mouse position scripting

[B]Note: [/B]If you are getting an error in versions 7.0 and 7.5, go to the iOTool object and click the properties tab. Set the variables that have "file" in them (Current_File, Preferences File, Highscores File, Calibrated File, Calibrate X File, Calibrate Y File, etc.) (NOT return string and NOT return number) to the path you want the files to be stored in (i.e. C:\yourcustompath\Prefs.txt). Make sure that the file name is in there.

Windows version default path is C:\.
Mac version default path is /Users/Shared/

You can also take away the file paths and just leave the file names in the variables if you want the game to save the files to the Alice directory. If you do it this way, you don't need to worry about file paths. This will be default on 8.0.

[B]EDIT: If you are visiting this thread in 2020, please note that the only working link here is for 8.0 Beta 2 for Mac and Linux (updated Feb 12, 2020). I am currently looking into finding the Windows version for 8.0 Beta 2 as well as the 7.5 versions for all OSes, but I have a feeling that will be harder to find.[/B]

jediaction 06-27-2011 03:40 PM

Is it over 20MB?

Dj Tech42 06-27-2011 03:50 PM

Yeah, that's why I posted it on DropBox

arty-fishL 06-27-2011 05:48 PM

That's a pretty brilliant, well thought out game. Especially good for a newbie to the forums.

One major issue is - you forgot to set the [I]Settings Window[/I] object [I]is showing [/I]to [I]false[/I], so you cant click on any options to start the game, but if you fix it (I did when I played it) it plays perfectly fine.

Dj Tech42 06-27-2011 06:28 PM

Thanks! Thanks for the warning about the Settings Window, too. I thought that setting opacity to 0% would do the same thing, but it doesn't. I will have to remember to always set isShowing to false so the mouse clicks don't get messed up. I have edited the post to include the new link.

reuben2011 06-27-2011 09:57 PM

Sounds like a promising game. I'll tell you how it is after I play it. ;)

Dj Tech42 06-29-2011 08:28 PM

Here is Version 6.0 Beta if anybody wants to try it out!

[B]If you haven't played the game yet, please play the version posted at the top. This is the new beta and it might have bugs that I don't know about yet. [/B]I haven't gotten to do extensive bug testing on it.

Version 6.0 Beta has added a timer to the dogfight modes so you can compare your times with other people on Alice Community Forums :D

There are also some other things added, changed, and fixed, which are discussed in the release notes.


Dj Tech42 07-10-2011 07:26 PM

Version 6 should be up soon. I just have to fix a couple of bugs first.

Dj Tech42 07-10-2011 07:53 PM

Version 6.0!
Version 6 is completely done!

You can now time yourself during the dogfight modes and post your times in this thread!
Just include what difficulty you were playing on and the time.

I added a tutorial for first time players.

Stalling is a lot more realistic now.

There are also a bunch of bug fixes and other new minor features.


room14 07-11-2011 12:22 AM

I can't load the world! :mad:

Dj Tech42 07-11-2011 11:58 AM

That's strange. :( Does an error come up or does it just freeze up? Did you try the older versions?

room14 07-11-2011 03:04 PM

I tired both I comes up with unable to load error
It's probably because I have An ancient version of Alice2.2

Dj Tech42 07-11-2011 04:45 PM

Why don't you update Alice? I'm guessing it is because you have added files to it that would be overwritten if you reinstalled.

Dj Tech42 07-11-2011 04:47 PM

I think the reason it didn't load is I used the int function, which was added later to Alice 2.2.

Dj Tech42 07-19-2011 06:18 PM

Version 6.5 is here!

-New "Brutal" difficulty brings a tough new challenge to expert players.
-Harder enemies across all difficulties
-Enemy can shoot behind them now
-New visual assist in Easy, Medium, and Hard to see where the enemy is aiming to shoot
-Fixed some bugs
Look at the release notes for more information.


Nighthawk0973 07-19-2011 06:43 PM

try switching file hosting services. I'll review this game if it's good enough but if it's not that great I'll just give it a small review... anyways DropBox won't let me open the .zip to take the file out without having the .zip AND the .a2w file downloaded. My personal preference :)

Dj Tech42 07-19-2011 08:38 PM

Last time I checked, it wasn't in a zip file...

room14 07-19-2011 08:40 PM

hey I downloaded the new alice and looked at your game it's cool!
there are few bugs and you'll need a better ai, but I like it.

Suggestion: what about having a better plane and having more planes to choose from?

Dj Tech42 07-19-2011 08:42 PM

Thanks! Hopefully in Version 7, I can improve the AI. Are the spatial relation functions working for you now, then?

I looked at some other plane models and some of them are really cool. I might add a plane selector soon. I guess I could use parameters to make it easier to program.

room14 07-19-2011 08:46 PM

The funny thing is, I can play the function but I can not make the function.
more like I can play it and I can add it but if i add it, it does not work.

pity 'cos I have a cool ai that should work.

Dj Tech42 07-19-2011 08:47 PM

Does it come up with an error or does it just not do anything?

Is it possible to open a project to copy the functions over so they work?

room14 07-19-2011 08:48 PM

do nothing.

room14 07-19-2011 08:50 PM

tried not() function with it and it works but if i invert the direction(left to right) it still does nothing..

Dj Tech42 07-19-2011 08:55 PM

I don't know much about debugging Alice, so I can't help you there. :( Do you want me to test what you have so far?

room14 07-19-2011 09:05 PM

It's doubles up as a user control thing as well as an ai.

Dj Tech42 08-04-2011 08:02 PM

I'm happy to announce that Alice 2.2 now works on my computer again! Thanks Alice development team! I can start working on this again.

Dj Tech42 08-07-2011 02:41 PM

My game is pretty laggy now. I was wondering if anybody could figure out how to make it more efficient.

[B]Warning! This is a beta version of 7.0. It has many bugs and is very slow to run. Only download this beta if you want to look at the code and help figure out what is causing the game to lag so much.[/B]

7.0 adds:
-Mouse Control (Thanks to legolizard for the scripting.)
-Saving of Game Settings (Preserves settings so they remain the same when you run the world again. Thanks to arty-fishL's iOTool plugin.
Warning! The code in this game for saving hasn't been tested on Windows or Linux yet. It is recommended that you disable this feature or you probably will not be able to run the world. Details in the release notes on how to do this.
-Improved AI (not in this version. It will be coming in the official 7.0 release.)

Flight Simulator 7.0 Beta download:

Beta 2:
-Jet engine sound for player's plane (Thanks to zero00 for showing me how to change volume of sound while the sound is already playing. Volume of jet engine changes with how close the camera is to the plane.)
-Fixed turning speeds (plane turned just a little too fast in the first beta)
-Shows how to use new mouse control in tutorial


legolizard 08-07-2011 04:25 PM

That was really cool. Also and this may just be because I have a gaming computer, but your game worked perfectly. No lag, no memory leaks, nothing.:)

Dj Tech42 08-07-2011 04:52 PM

[QUOTE=legolizard;40442]That was really cool. Also and this may just be because I have a gaming computer, but your game worked perfectly. No lag, no memory leaks, nothing.:)[/QUOTE]

Thanks. It still lags a bit on my computer (It's almost 2 years old now), so I'm going to look for ways to speed up the game a little bit by the final release of Version 7.

dubastot 08-08-2011 05:24 PM

Perhaps try reducing the number of if statements and loops.

Dj Tech42 08-10-2011 07:17 PM

7.0 Beta 3 is here! This beta enables the saving functionality (with the iOTool). There is a Windows version and a Mac version due to the file systems being different on the operating systems. Before you start the world, go to the iOTool's properties and change the 6 string variables (current_file and the other file variables) to the file paths you want the files to be in. When you run the world for the first time, it will create the files and ask you to calibrate your mouse. When the calibration message comes up, put your mouse cursor at the bottom-right corner of your screen. This will tell the game what your screen size is, so the new mouse control of the plane will perform correctly. You only need to calibrate once. Do not exit the world or click/press anything until the red message disappears. The red message tells you that the program is loading/saving.

When everything is set up, the world will load its preferences and the calibration. After about 4 seconds, you will be able to start the game. I hope you like the new saving functionality! It is cool how you don't need to set your preferences up or calibrate every time you run the world. It just loads your previous configuration! In the final version, it will record your times and store them in the high scores file so you can look at your best times for each difficulty and compare them to other people.

Thanks to arty for the awesome iOTool and the string to number conversion script used in this version. I hope you guys can test this out so the final version can be relatively bug-free.

Download 7 Beta 3 for Windows:

Download 7 Beta 3 for Mac:

Nighthawk0973 08-10-2011 08:55 PM

This sounds exiting. Would you mind me giving it a full review even though it's in 'Beta'? I mean, I'll see how good or bad it is first... if it's really bad I'll just assume it needs more work and give you some feedback.

Dj Tech42 08-10-2011 09:21 PM

Sure! The only reason it is still in beta is because there are 2 more things I want to add for the final version. You can review it now because it shouldn't have too many bugs.

Nighthawk0973 08-10-2011 10:31 PM

Welp than here goes!

Snowfire Games Presents...

Flight Simulator (WITH AI! :D)

The Review...


Flight Simulator with AI (let's just call it FSAI for short) is a great aproach towards making a flight simulator. However, while it might be in it's beta phase, the 'bugs' are the wors of problems. So is FSAI a good game? Lets find out in this review

The Presentation of FSAI definately could've been worse. The main menu looks nice but once you start to leave the city there is no detail in the scrolling menu. The fact that you must configure where you want to save the files out of games is a bit sad too. The GUIs are very responsive however, and their design and looks are decent as well. My biggest gripe is probably with the tutorial mode. While it explains the concepts of flying your plane just fine, the fact that your always in the middle of flying while learning at the same time makes learning the game a bit difficult. The game also puts a lot of information in one short time, given the fact that the control scheme isn't very easy to remember, it would've been nice if the games tutorial went at a slower pace. Especially since flying and not crashing while reading text is a nightmare....
My biggest gripe with this game has probably got to be with the graphics. There's no visual design unless your at the city and that means you'll be staring at a lot of the same alice grass... The clouds look nice on the other hand and all of the planes animate smoothly with one exception that I'll talk about later. And while there is no sound effects the music is brilliant and there is more than just one music track.
The gameplay isn't as good as it could've been. While all the controls run smoothly it'll take most people a while to figure out the mouse is configured so that idle is in the top-left area of the screen. Provided you remember the controls however getting your camera in the perfect position should only take but a minute. The controls all work smoothly but when your acually shooting it's a bit tougher than you'd expect. First of all your switched to first person mode for percission aiming when you press P. I think you should've been able to shoot at any time. Second of all every time a shot is fired the game freezes up for a split second. I don't know if this is because of a studder in the frame rate of something in the code but it makes Dog Fight impossible to play.
Replay Value
There is definately a lot of modes here and there are different dogfight difficulty levels too. the Problem is sense 'Simulation' is just flying around the dull environments with no purpose, and dogfight lags when you acually shooting, I don't know why anybody would want to play this game. Howeversince there are the difficulty levels for dogfight it would last for a while if you where willing to put up with the shooting problem, or if it doesn't affect you at all.

The Verdict

Presentation: 8.5
The Presentations OK but the tutorial could've been better. And the GUI
was almost there too...

Audio/Video: 6.0
The level design is to a minimum and given the fact that there's only one area in the entire game, is just sad. There is a savior to that, and it's probably what impresses me most about this game: the Music, which is brilliant. As with lot's of alice games.

Gameplay: 8.5
The Game runs brilliant. There is no lag you you can tweak camera to your likeing. It's a too bad there's that one problem with the shooting or else this gameplay would almost get a 10.

Replay Value: 6.0
Well, if you like the simulation mode, I guess this could last a while to you. But the dog fight just fails horribly because of the shooting. Still there is the diffcultys if your willing to live with these issues. But in the end a game that's not really playable to start doesn't even have a '(Not Re)Play Value'

Final Score: 7.5(Good)

There isn't much wrong with this game. While some problems could've been fixed most of this runs perfectly. However that issue you get when trying to shoot (or when enemies shoot) is really sad since it prevents the acuall purpose of the gmae from being fun. Sadly, this is not a good enough game to keep it loaded in my Alice for a while. In fact this is one of the worlds that will be deleted when I get around to cleaning my Alice Save Folder, if I get around to it.

Dj Tech42 08-10-2011 11:08 PM

Thanks for the review. I will work out whatever is causing the freeze with the shooting.It doesn't seem too bad on my computer, but I did notice it a little bit. I will also work on making the level(s) more interesting. I would like to add building collision detection, too, to add more of a challenge. Possibly some heat-seeking missiles. You can shoot whenever you want. I guess I didn't make that clear in the tutorial.

Well, now I know what to work on. I hope I can make the dogfight mode really fun in future versions.

zero00 08-11-2011 01:24 AM

Incredible game! :D
Also, good job using Arty's IO Tool! Wish I knew how to use it! :p

Also, I thought I could help out with the game a little. I took a copy of your game and changed the main menu a little. I replaced the 3D text objects you used in the main menu and replaced them with billboards. Nothing else was changed. If you want, I could do some more UI design.

You can download it [URL=""]Here![/URL]

BTW, regarding the warning in the main menu about not clicking on anything while the IO Tool is working. Could you make the main menu buttons invisible until the IO Tool is finished, then fade them back in the view?

Dj Tech42 08-11-2011 10:56 AM

[QUOTE=zero00;40584]Incredible game! :D
Also, good job using Arty's IO Tool! Wish I knew how to use it! :p

Also, I thought I could help out with the game a little. I took a copy of your game and changed the main menu a little. I replaced the 3D text objects you used in the main menu and replaced them with billboards. Nothing else was changed. If you want, I could do some more UI design.[/QUOTE]

Looks cool. Thanks! It would be great if you could help with UI design.

BTW, regarding the warning in the main menu about not clicking on anything while the IO Tool is working. Could you make the main menu buttons invisible until the IO Tool is finished, then fade them back in the view?[/QUOTE]

Yeah, that sounds like a good idea. I will definitely implement that for the 7.0 final version.

zero00 08-11-2011 11:58 AM

[QUOTE=Dj Tech42;40595]Looks cool. Thanks! It would be great if you could help with UI design. [/QUOTE]
Sure! :D

zero00 08-11-2011 12:09 PM

I'll keep working on the copy of the game I posted above.

Also, I think I found a bug (or something). If you stay on the main menu for too long, the camera flies through the sky.

Dj Tech42 08-11-2011 01:24 PM

Can somebody give me the AlicePreferences.xml file? Somehow I lost it and I can't enable scripting anymore.

It should be in your .alice2 folder

All times are GMT -5. The time now is 04:17 AM.

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