UFO:Alien Invasion

Development => Newbie Coding => Topic started by: Legendman3 on July 25, 2010, 09:11:11 pm

Title: What language?
Post by: Legendman3 on July 25, 2010, 09:11:11 pm
What programming language is UFO: AI wrote in? Im learning a bit of C++ and I would like to know.
Title: Re: What language?
Post by: Thrashard96 on July 25, 2010, 09:16:29 pm
Depends on which file are you trying to edit. Ones are info and directories, while others are commands and instructions.
Title: Re: What language?
Post by: Legendman3 on July 25, 2010, 09:21:02 pm
Well then thats odd to me.. but give me a list of languages the game uses then.
Title: Re: What language?
Post by: geever on July 25, 2010, 09:25:00 pm
What programming language is UFO: AI wrote in? Im learning a bit of C++ and I would like to know.

The game is written in C. The map editor in C++.

PAUL1UZ5, may referred to ufo files, they're rather configuration files and have easy syntax.

-geever
Title: Re: What language?
Post by: Thrashard96 on July 25, 2010, 09:25:51 pm
In the pk3 files:

//ANYTHING

Model ../dir/dir/file.extemsion
Ammo ANYTHING_ammo

and so on and so on

In .C files:

{
  {
   Command (parameter1, parameter2, parameter3)
   }
}
Title: Re: What language?
Post by: Legendman3 on July 26, 2010, 12:01:07 am
Well Im not gonna go learn C so ill stick with editing the editor.  ;D
Title: Re: What language?
Post by: geever on July 26, 2010, 11:20:59 am
Well Im not gonna go learn C so ill stick with editing the editor.  ;D

C and C++ are quite similar, you just don't have classes here, no default value for function parameters and so. If you learn C++ I think you will be able to fix some bugs in a C code. ;)

-geever
Title: Re: What language?
Post by: bayo on July 26, 2010, 03:59:00 pm
or add add some new ones
Title: Re: What language?
Post by: Duke on July 28, 2010, 12:52:54 am
Well Im not gonna go learn C so ill stick with editing the editor.  ;D
C++ is a *superset* of C. That is, if you know/learn C++, you can always do C.
NO excuse ;)
Title: Re: What language?
Post by: Legendman3 on July 29, 2010, 08:46:29 pm
Oh. Well im new dont kill me with it.
Title: Re: What language?
Post by: Duke on July 29, 2010, 11:01:37 pm
Don't worry, I'm not gonna try to talk you into coding for UFO:AI.
The ufo code is a rather bad starting point for beginners. The examples in your C++ classes will be much easier.
However, once you've done your classes, you'll be able to partially read & understand the ufo code.
Title: Re: What language?
Post by: Destructavator on July 31, 2010, 11:54:43 pm
I'm the same way, having started with a C++ approach, although all that I know about it I've learned on my own, I did not sit in any class.
Title: Re: What language?
Post by: Thrashard96 on August 01, 2010, 09:23:07 pm
Me too...
Title: Re: What language?
Post by: Legendman3 on August 04, 2010, 11:02:21 pm
The examples in your C++ classes...

Lol I havent used classes self taught.
Title: Re: What language?
Post by: Duke on August 05, 2010, 01:10:13 am
ok. change that to
The examples in your C++ books...
Title: Re: What language?
Post by: Destructavator on August 05, 2010, 01:44:22 am
ok. change that to
The examples in your C++ books...

...Or favorite website.  Although I would personally suggest getting at least one good book in addition to all the Internet stuff out there.
Title: Re: What language?
Post by: Thrashard96 on August 05, 2010, 11:41:52 am
The .c files are easy to edit, but hard to understand what you're editing if you don't know what are you doing......
Title: Re: What language?
Post by: Legendman3 on August 05, 2010, 09:36:31 pm
are there comments?
Title: Re: What language?
Post by: Thrashard96 on August 05, 2010, 09:45:38 pm
Negative, no comments from me.
Title: Re: What language?
Post by: Destructavator on August 05, 2010, 09:59:14 pm
are there comments?

Do you mean code comments, in the UFO:AI source code?

When you feel ready to tackle this project's code, you might also find this handy:

http://ufoai.killfile.pl/doxygen/
Title: Re: What language?
Post by: Thrashard96 on August 05, 2010, 10:13:38 pm
I meant in "if you know what you're doing" that if you change something, then it will be bad depending on editing/adding something in the code - compiling fails and you have to wait a lot for retry compiling (i hate that it is happening with maps :().
Title: Re: What language?
Post by: Legendman3 on August 06, 2010, 02:56:03 am
Do you mean code comments, in the UFO:AI source code?

Yes. And I know what Im doing. Just because Im 10 years younger then most of you guess dosent mean Im not careful.
(makes a major error and breaks the whole svn).
Title: Re: What language?
Post by: Legendman3 on August 06, 2010, 02:58:26 am
http://ufoai.killfile.pl/doxygen/

O_______________O

Im not ready >.<.
Title: Re: What language?
Post by: Destructavator on August 06, 2010, 03:19:22 am
O_______________O

Im not ready >.<.

Yeah, UFO:AI code is quite advanced, very developed, and isn't the best thing to jump into after doing a "Hello World" type of thing.

I would start by making a simple, "dumb" little game, something that doesn't even have to be original or spectacular (for example, a space invaders clone) with one of the many 3D or Game Engines out there, then work your way up to more advanced stuff.

Some 3D graphics engine libraries are easy to use, others are rather difficult and more advanced.

I started with Irrlicht (C++, includes collision and gui stuff too) because it is EASY to use, just a few simple lines of code to display a simple scene on the screen with no hassle.  More advanced ones are Ogre, which require a lot of setup and other B.S. just to display a simple room with one object and one camera in it.  Even more complicated is Crystal Space, another one of the big ones.

There's plenty of other engines out there though, some easy, some hard to use.
Title: Re: What language?
Post by: Duke on August 07, 2010, 12:28:44 am
Destructavator, I have to partially disagree.
Writing even the dumbest game is something like step 4 or 5 in your career because you have to cover *all* aspects of a game, ie. kb/mouse input, graphics, game logic, savegames, config file,...
It may be your only choice if you're all alone, though.

But this is a community :) If we have 2 or 3 newbies each covering 1-2 of those aspects and maybe one experienced dev writing the overall frame, it would be much easier.
And that's what the 'Newbie Coding' forum is for ;)
Title: Re: What language?
Post by: Destructavator on August 07, 2010, 02:38:28 am
Destructavator, I have to partially disagree.
Writing even the dumbest game is something like step 4 or 5 in your career because you have to cover *all* aspects of a game, ie. kb/mouse input, graphics, game logic, savegames, config file,...
It may be your only choice if you're all alone, though.

But this is a community :) If we have 2 or 3 newbies each covering 1-2 of those aspects and maybe one experienced dev writing the overall frame, it would be much easier.
And that's what the 'Newbie Coding' forum is for ;)

Well, many "dumb and little" games don't even have much of that stuff, such as a savegames, any scripting system, or in some cases even a config file - a simple text menu on startup works in many of those cases, I was talking about simple programs that don't need the bells and whistles that more complex, larger games would need.

-But that's not the real point, my point was to start small before tackling something big and complex like UFO:AI.

You're right about the "community" thing though, it's nice that we have that here and it's a good idea.