RSS feed My Blogs

If you already programmed in COM, feel free to skip the article. Yep. Nothing interesting for you here.

If you're a coder that has some experience with previous game engines but you're new to Unity, then read on.

So. Two programs and a technology for software development. And a picture:COM object and interfaces

That's a COM object. Our target is "Outer Object". It imlements several interfaces, the circles labeled A, B ...

In terms of inheritance, you could do that by deriving the class describing. Now of course, there are some problems when all them interface implement a function with the same signature, say void Update(): which Update() should be called in your case? The one from A? Or B? Or C? I personally don't like C, as a vitamin at least it is sour.

This is where COM ... comes in place. In COM, if you want to implement an interface on an object, you'll get a new instance of a class. That means that somehow, in your objects, you'll have at least three class instances, one that implements the functionality of A, one for B, well, you get the point.

Why the frowned face? Oh, stupid me, I forgot something: from now on, your object is no longer an instance of one class. No. That's gone. Think of it as a collection of classes, each working together to provide functionality for one object.

Now I can hear you saying: "But what if I need to use functionality from Interface A in the implementation of Interface B? How can I reach one functionality from the other?"

In all technologies that implement an object modeling mechanism (yep, that's the OM from COM), there will always be a mechanism to go from one interface to the other. In COM, it is called "QueryInterface". In Unity, you GetComponent.

Now it makes sense. This is why the First Person Controller prefab in Unity looks like this:

Unity's fps controller



You'll see that I underlined two components (get used to the term if you plan to use Unity). If you double click them, you'll end up looking at some C# code. Each of the scripts describe a class, each having a Start() and Update() function. Several components, working to define one object.
And here's another thing about COM: you can re-use components:

camera



The Mouse Look script is the shared component here.

That's it. Don't say I didn't warn you, if you know COM this was not a surprise.

Start a group Groups
2D Games

2D Games

295 members Fans & Clans

They are places where "Z axis" does not exist, only YX reign, the word is unknown 3D, games are simple but should be played, many of them will make us...

Share and Mod

Share and Mod

53 members Hobbies & Interests

Share and Mod is a group dedicated to sharing art assets for the Moddb community to help others out and to better mods needing help.

Desura

Desura

10,146 members Entertainment & Press

Desura is a community driven digital distribution service for gamers, putting the best games, mods and downloadable content from developers at gamers...

Modding Social Club

Modding Social Club

128 members Entertainment & Press

The problem with multiplayer mods is the lack of players; the solution is to play them. That's where the Modding Social Club (MSC) at ModDB comes in...

Serious Sam Fans

Serious Sam Fans

109 members Fans & Clans

The coolest social group on ModDB! Join if you play Serious Sam: The First Encounter, Serious Sam: The Second Encounter or even Serious Sam 2 or 3. Join...

shadowblaze clan

shadowblaze clan

2 members Fans & Clans

read below because that is our rules please obey them or it wil result in punishment if you dont obey the punishment you will be kicked from the group...

AvP2 Fortress

AvP2 Fortress

5 members Fans & Clans

This is the group of AvP2 modders responsible for developing the AvP2Fortress mod. If you whish to join us, please send us an e-mail.

Post comment Comments  (20 - 28 of 28)
KOM
KOM

hey thanks for watching the mod

Reply Good karma Bad karma+1 vote
Herr_Alien Creator
Herr_Alien

You lost me a bit :)
Anyway, I really like the game, and I do enjoy modding it. As for this particular project, it was needed.

I whish you guys good luck! I will definitely play your mod when it is released.

Reply Good karma+1 vote
SinKing
SinKing

I wish it would say "Seamen", instead of "Airmen" in your signature.

Nice go with releasing AvP2 Fortress, any new projects on the horizon, yet?

Reply Good karma Bad karma+1 vote
Herr_Alien Creator
Herr_Alien

Well, there is one project I'm working on. Since Sierra will pull the plug on the AvP2 master server, we're now focused in modding AvP2 to use a different and brand new master server.

That takes all my time at the moment.

On the more casual modding side, AvP2 Fortress will get some new maps, but again, developed by Windebieste. There's another guy making an interesting 1Flag-CTF map, there's a good chance of adding that one too.

Reply Good karma+1 vote
Husayn-al-Musayyab
Husayn-al-Musayyab

Good work in the AVP2 Fortress.

Reply Good karma Bad karma+2 votes
Herr_Alien Creator
Herr_Alien

Hey, thanks!

Reply Good karma+1 vote
Arxae
Arxae

srry wrong button for friends thingy :p axidentaly clicked deny -_-

Reply Good karma Bad karma+1 vote
Herr_Alien Creator
Herr_Alien

Hi,

Well, Ballistic 2 is a mod for AvP2. You can downlad the mod by clicking on the download link (the red button) from this page:

Moddb.com

Reply Good karma+1 vote
ShykoUzamakai
ShykoUzamakai

Hey How do i Down load alien vs predator 2 please respond

Reply Good karma Bad karma+1 vote
Post a comment

You are not logged in, your comment will be anonymous unless you join the community. Or sign in with your social account:

Level
Avatar
Avatar
Last Online
Country
Romania Romania
Gender
Male
Friends
Become friends
Member watch
Start tracking
Desura
Statistics
Rank
546 of 570,306
Visitors
19,639 (4 today)
Time Online
1 month
Activity Points
2,909
Watchers
5 members
Comments
351
Site visits
16,561
Contact
Contact
Send Message
Yahoo
garone80
Friends
luke199200
luke199200 Online
CTLN7
CTLN7 Online
GazTian
GazTian Online
Meister_Wolo
Meister_Wolo Online
Arxae
Arxae Online
TheKingKenny
TheKingKenny Online
foxatphoenixlabs
foxatphoenixlabs Online
ninjadave
ninjadave Online
FJS
FJS Online
x-M-x
x-M-x Online