View Full Version : Game/AI SDK!
Vael May 18, 2005, 09:01 PM I was wondering if I was the only one here who noticed this:
Soren in the E3 Video:
We're releasing the Game/AI SDK which is basically the game and AI code that people can compile into a DLL to basically change the game.
This means that Firaxis will be releasing the game code for Civ 4! I guess they weren't kidding when they said that the game will be very moddable! :eek:
PeteT May 18, 2005, 09:13 PM No, but you beat me by 10 minutes.
To mod the game at this level, though, will require a knowledge of C++. There are lots of tutorials available on the net.
microbe May 18, 2005, 09:24 PM This means that Firaxis will be releasing the game code for Civ 4! I guess they weren't kidding when they said that the game will be very moddable! :eek:
It doesn't mean Firaxis is releasing the game code. I believe it merely means it allows you to build a DLL with callbacks so the game could use. "You don't call me, we'll call you."
ainwood May 18, 2005, 11:41 PM Yes it sounds very interesting, but like microbe says, it only allows modifications to what they will let you modify. I do wonder how they will control security and cheating though - different players using different DLLs could create problems (I guess multiplayer will give an out-of-sync, but GOTMs???)
Maybe we (at CFC) need to have an 'approved modded dlls' library?
Arathorn May 19, 2005, 07:25 AM It's not source code...it's an SDK. But you're far from the first to notice. I mentioned this is another thread a while back. It's tremendously exciting to me. I wonder more than a bit about the user-friendliness of the system, but...WOW! The potential there is tremendous.
Arathorn
stormbind May 19, 2005, 07:53 AM You know, CivEvo had this years ago. It doesn't do much because end-user AI tends to be buggy :sad:
PeteT May 19, 2005, 08:10 AM Soren:
the game and AI code that people can compile into a DLL
"the game and AI code" is also known as "C++ source code".
"compile": The process of changing a program written in a source language (for example C++) into machine executable instructions. The compiled routine is then ready to be link-edited and then loaded into storage and run.
"DLL": Dynamic Linked Library. In computer science, a library is a collection of subprograms used to develop software. Libraries are distinguished from executables in that they are not independent programs; rather, they are "helper" code that provides services to some other independent program. A Dynamically Linked Library is a library that is linked to an executable program (in this case the Civ 4 executable) at run-time.
PeteT May 19, 2005, 08:18 AM Oh, and check out Locutus's reaction over at Poly:
Locutus:
Wooaah!!! Did you guys catch that last part of the interview: THEY WILL BE RELEASING THE SOURCE CODE OF THE GAME AS WELL!
Man, I'm buying this game, I'm buying it no matter how much bad news might still come out in the next months... I've been sold!
Arathorn May 19, 2005, 08:56 AM There is no way a game company will release source code. 0% chance. Never gonna happen.
They are releasing an SDK. You will be able to overwrite some of their code with your own code, if you so choose, and the fact that they're even releasing some APIs for that is semi-revolutionary. You will compile your own code, built from the Software Development Kit (SDK), and overwrite portions of their code. It will not be a source code release.
I expect most created things (including my own, honestly) to be buggy and probably worse than the default AI. But, with time, and a collaboration, who knows what might be possible. The potential, especially with a community like CFC, is tremendous. It's a pretty sweet deal. But it won't be source code.
Arathorn
PeteT May 20, 2005, 06:43 AM More news out today (thanks Draken):
http://pc.gamespy.com/pc/civilization-iv/617487p2.html
The new mod tools are laying Civilization bare. As with some of the previous games, a lot of the data is easily changed from a text file. But now Firaxis is using Python (an accessible scripting language) to do everything from the interface to random map algorithms. They'll even be releasing the source code. "It's way beyond anything we've ever done before," he says.
This is a really radical thing to do. Its no wonder that people are having so much trouble believing it.
Arathorn May 20, 2005, 07:09 AM The economical model simply won't support it. I believe gamespy is drastically wrong, probably pulling from users who are wrong and taking things out of context. It simply won't happen. The economics of it aren't viable. No way.
Arathorn
Quentin May 20, 2005, 09:09 AM I don't think gamespy is wrong, just that they don't mean what you think they mean. I've also heard that Half-life released their source code in its SDK. I got the SDK and it really wasn't all that big a deal.
I'm guessing this releasing of the source code is only minimal.
MamboJoel May 20, 2005, 11:48 AM From what I heard, we are going to be able to overight classes, attributes and procedures compiled into the game's DLLs for the AI. Our custom implementations will be in Python, which is an untyped interpreted language not managing exposure (Public, protected etc... methods attributes and classes, interfaces) if I recall.
That's what is a litlle scary :
- Interpreted makes it much slower than compiled. AI processing was allready very slow in some big Civ3 games.
- Untyped : considering the large community that will overight, overload elements of the AI the fact that variables arr not going to be typed ensures some very bad bug problems.
- Exposure : If everything is public, than you can override things that are lethal and that should not be overridden for apps to work correctly. Python looks to mee as it it's not tough enough to handle large designs -such as the one used by Firaxis in C++ (I guess). It's not just about programming, it's about developing (analyse, design, program).
Anyway, I'm very happy about this addition, but I'm quite scared when thinking about the mess it can result in.
warpstorm May 20, 2005, 03:04 PM If you are building a DLL it will not be in Python, but will have to be in C++.
Python is not untyped; it is strongly yet dynamically typed. A subtle difference, but an important one.
The interpreted part is true. Python is slow. I assume this is why they are including the SDK so that you can compile the parts that they know need to be in C++.
If the private parts of the API are in the C++ routines, Python's looser rules won't apply to them at all. BTW, Python does have private methods and attributes. (Strictly speaking, private methods are accessible outside their class, just not easily accessible.)
Have you ever embedded a Python interpreter into your programs (or C++ into your Python programs (or...))? It is not (usually) a horror story even for very large scale projects.
MamboJoel May 20, 2005, 07:13 PM Have you ever embedded a Python interpreter into your programs (or C++ into your Python programs (or...))? It is not (usually) a horror story even for very large scale projects.
Thanks for the info. I really hope your right about that, though keep in mind this looser (about type and exposure anyway) solution will be in the hands of a whole wide community...
If i remember well, Python works with modules that encapsulate variables, types etc... Is there any naming container system -namespaces- to organize the different classes, strucs etc ?
I feel a little afraid with the whole issue :rolleyes:
I'll try to find reason not to be in the doc.
Ramalhão May 20, 2005, 10:28 PM As I understand, the SDK will allow us to edit several aspects of the game, as well AI, putting everything in a single DLL. So, this DLL will be used only for the created scenario, not for the entire game.
I doubt any company will release the source code of a software that is already selling. Maybe people at GameSpy forgot to add some words or they didn't hear exactly. I think Firaxis will release only the source for AI programming, as everyone blame it, calling weak. Firaxis possibly will "look" the codes made by communities and may add some good AI modifications in a patch or expansion pack, so Civ4 may be harder on each patch :).
Crazy Jerome May 21, 2005, 08:16 PM For the benefit of the non-programmers out there, here is an explanation for why releasing an AI SDK is not "releasing the game source code"--regardless of what some reviewer may have misunderstood.
The game is made of multiple DLLs, that is the source code for a single application (aka "executable", aka "EXE") is typically split into multiple files that are compiled and assembled separately. The DLL is loaded into memory when the EXE (the CIV application in this case) is run. What this means, in laymen terms, is that someone with the source code for an individual DLL can change this code, recompile the program, and then copy it over the previously compiled DLL. Thus, without having the source code for the rest of the program, said programmer can change the program behavior handled by this particular DLL.
Therefore, here are the possible places for AI behavior. (I'm not saying that all of these will contain AI behavior, but all of them could.) Where something is will determine who can change it and how:
1. The main EXE. It's doubtful that anything as specific as AI logic is here, but if it is, it's probably of the nature of #2 below.
2. A general controlling (aka "traffic cop") DLL that coordinates when AI logic is executed compared to other parts of the game. We won't get the source code to that, because someone with access to that code could add whole new aspects to the game.
3. An AI DLL other than the one produced by the SDK that exists solely for the purpose of keeping certain AI code out of the hands of the community. There could be nothing here, or it could be extensive because of certain aspects that Firaxis wants to simply not hand out. Another reason would be because something was so critical and performance sensitive for a good game that Firaxis decided not to risk sharing it with the community.
4. The DLL(s) produced by the SDK. This contains the AI source code that Firaxis wants to release. A community programmer can change the internal implementation of this code (that is, change the behavior of the AI) as long as the "public signature" of the code is kept the same. For example, if the AI SDK contains a single method called when the program wants to determine whether to attack X or not, the programmer can change how this method works--but based only on the information available to the method before. He can't add three alternate methods or suddenly start considering things unavailable before.
5. The Python scripting--limited similar to how the SDK is limited. You can write any detailed information you want, but only within the public signature of the called methods and with the information available to same. No doubt, the big difference between what goes into the SDK versus the Python scripting is based on game speed and/or routines too risky to trust to an inexperienced programmer (if any).
6. Data defined in the editor that sets different predefined levels of AI behavior.
The big question here is how the #4, the SDK is handled. I can think of at least two different ways. One way is that we get the actual source code that produces the standard DLL. Given what they have said, this might even be true. Not only can community programmers change the AI, they get all the benefits of seeing the existing AI. Sometimes, a small change from an expert player could be a big enhancement.
Another possibility is that the SDK is setup to mirror another DLL that contains the standard AI logic. The program uses the standard AI logic except when overridden in the SDK. The advantages of this are that a modder can make a few small changes in the areas of interest and otherwise retain all the standard behavior. Or course, the modder could do this for himself anyway. But with this setup, it would be far easier for others to evaluate the change and verify that the AI SDK source so produced didn't contain malicious code. And of course Firaxis could more easily control when modded code was run.
Vael May 23, 2005, 12:17 PM For those who don't think Firaxis is releasing the game code:
"It's all the code I write. It's all the AI and all the game code. It's the rules of the game," says Johnson. "This has been done a lot with shooters, but it's never really been explored with strategy games."
Using this package, modders will be able to do everything from writing their own game types to pretty much builiding their own game based loosely on Civilization, changing literally anything they want.
So what do you guys say now? ;)
Crazy Jerome May 23, 2005, 09:03 PM My experience with any member of the press when they talk about a subject that I know something about is that the press doesn't. I extrapolate from there on other subjects. :D But in this case, I do actually know something about programming.
I'm sure that what was written was what the reviewer heard. I'm equally sure that it wasn't what was said. NO game (or any other commercial program) releases the whole source code. Well, an open source game does. But if Civ4 where open source, it would have been released already, since that's the whole point of open source.
I want everyone to remember this. Because I guarantee when it comes out there will be at least one or two fans here whining because "the full source wasn't released as promised." :D
vbraun May 23, 2005, 09:19 PM So what do you guys say now? ;)
There not realeasing the code for the game engine. That would just be absurd as already mentioned. :)
The reason I'll be happy about this is that I'll be able to add something to my resume becasue of civIV and all the Python scripting.
Quentin May 23, 2005, 10:11 PM That quote also says that "has been done a lot with shooters", and what has been done with a lot of shooters is releasing only PART of the source code.
ainwood May 23, 2005, 10:21 PM For those who don't think Firaxis is releasing the game code:
So what do you guys say now? ;)
I tend to think that it will not be the entire source code - they said you could compile a DLL, not the actual Civ4.exe.
In short - as has been said before, it will probably allow you to modify certain aspects. E.g. you might be able to modify the AI routines, but not the code to actually draw the sprites on the screen.
Crazy Jerome May 23, 2005, 10:35 PM What is looking promising is that all, or night close to it, of the actual AI source code may be available. That is not tiny! I think that is what is getting the reviewers confused. That will actually lead to a much better AI in the long run, because there are lots of ways that Firaxis could have released a good chunk of the AI that would have still left critical items off-limits.
Gramphos May 23, 2005, 10:35 PM I guess they would ant something that moders can use without having to license Gamebryo or any other comersial library used in cIV.
Also, they would never let you compile the true game exe as that would be the same as saying goodby to any copy protection.
Reinhard May 24, 2005, 12:57 AM Why would they be releasing an SDK if they were releasing the source code. And as somebody mentioned, there are no shooters where the source code was released. Unless you consider the theft of HL2 sources releasing...
troytheface May 24, 2005, 01:12 AM none of these people know what will be released- they are guessing and going on past procedures- i say they could release the full source code and the world would not stop spinning- a handful of people could play around with it but most of us would rather go outside or something. :goodjob:
NHJ BV May 24, 2005, 04:22 AM The number of commercially-made games of which the source code has been released can be counted on one hand, I believe. There are a few instances of very old games of whichthe code has been released, but not of any game newer than ~5 years I'm pretty sure.
I agree that it was probably meant that AI code and game-rule code (as in, victory objectives, resource system, unit stats) will be released. that's still impressive, though :crazyeye:
Quentin May 24, 2005, 05:07 AM I suspect there might also be code for the interface like the main menu or advisor screens but of course that is just a suspicion :). Full source code is close to impossible. There's like a 0.0000000000000000000000000000000000001% chance they will release the full code.
Reinhard May 24, 2005, 08:31 AM Having encountered several similar cases before, i can say that typically no code is released, but an API where the methods designed by the original creators can be overridden.
For example, a method called AI_START_PRODUCTION or AI_NEXT_TURN could be redone to suit your needs. At this point you would also have access to all the information used by the program, such as units, buildings, player statistics etc.
Ramalhão May 24, 2005, 08:57 AM I'll use Unreal Tournament example. This game is a FPS, as everyone may know. There are several mods for this game, one of most popular is Tactital Ops - something like CounterStrike (which is a mod for Half Life).
TO uses all game engine avaiable in UT and changed almost all graphics and rules. This way, modders create another game, but it requires UT to be installed. Why? Several routines which are needed are UT routines. Routines to place graphics in their positions, to avoid people passing walls, to analyse if someone was hit, to go up/down stairs etc. Modders changed the original UT rules (shot everything that moves) to a game which requires more attention and tactic.
And you should read carefully:
It's all the code I write. It's all the AI and all the game code. It's the rules of the game.
He said only the code he wrote can be changed, AI and game code (rules). People can change graphics and rules, but cannot see the whole code.
People can mod Civ4 to make several of their dreams true. People who wants to see barbarians become civs may do it in a mod. People who wants to create cities in water (like SMAC) will be able to do it. A full SMAC mod may be made. A mod using C3C rules may be made :D.
And simple things could be made easily, as add new religions, civic options, civs, leaders, units, buildings. People can remove religions and slavery if they don't want to see it in the game.
Colonel Kraken May 24, 2005, 09:35 AM Do you believe it would be possible to change the combat system with this kind of thing? I don't mean just stats, but I mean changing from one-on-one to stacked combat that takes into consideration flanking, ranged fire, leadership, etc.
Vael May 24, 2005, 09:36 AM Okay okay guys, no need to stomp me into the dirt, I see it won't be the full source code. :blush:
But some people were (and still are? :crazyeye:) claiming that there won't actually be real code released with Civ 4. That's essentially what I was saying though, I didn't think they would release ALL the code.
PeteT May 24, 2005, 10:13 AM Exactly. In the original quote, Soren talked about "the game and AI code that people can compile into a DLL". If the entire source code were to be released, he would have been talking abour compiling an exe.
Lief Ericson May 24, 2005, 10:46 AM People can mod Civ4 to make several of their dreams true. People who wants to see barbarians become civs may do it in a mod. People who wants to create cities in water (like SMAC) will be able to do it. A full SMAC mod may be made. A mod using C3C rules may be made .
So...you're saying that people might be able to make a SMAC 2 using CivIV? *drools*
NHJ BV May 24, 2005, 11:13 AM Maybe even Colonization II... :cool:
vbraun May 24, 2005, 03:50 PM And simple things could be made easily, as add new religions, civic options, civs, leaders, units, buildings. People can remove religions and slavery if they don't want to see it in the game.
Maybe even make Religons give certain bonuses/disadvantages. :)
Ramalhão May 24, 2005, 08:51 PM So...you're saying that people might be able to make a SMAC 2 using CivIV? *drools*
Maybe it will be possible. It depends on how many code will be avaiable to change. But it will need several people spenting their times to create huge mods too. So, it may be possible to do, but it's uncertain now :p.
vbraun May 24, 2005, 09:10 PM You should be able to change anything, you just won't be able to edit the actual CivIV game engine.
aldude999 Oct 28, 2007, 12:36 AM i was just reading the manual they said early 06 i havent seen it
Lillefix Oct 28, 2007, 07:18 AM You mean this:
http://www.2kgames.com/civ4/downloads.htm
2/3rd's down
"Software Development Kit
Download the Civilization IV Software Development Kit, which contains the core game DLL source code, allowing gamers to completely rewrite or modify their own Civilization world to their heart's content.
Download the SDK from 2k games (6 MB)"
|
|