Post feature Report RSS Introduction to the ArmA/II Stargates (Article 1)

This article will help explain the overall design concept of the ArmA/II Stargates.

Posted by on

Welcome Ladies and Gents,

This article is a way of unveiling piece by piece what we've been working on for the last 2 (very long) years.

Mods History:
For those of you who played with the Operation Flashpoint (ofp) Stargates you may remember the point where DSF's Stargate system first broke away from its original creators BxBx... At first the changes were trivial such as sound and timing changes but by v1.2 (DSF's System) we had implemented manual dialling and rudimentary multiplayer support; further changes continued (some by DSF, others by Walmis) right up to the 1.4 beta where we left ofp for ArmA's greener pastures.

Now ArmA was a massive hurdle for this Mod as a lot of fundamental changes within the games engine completely derailed all our previous work but seeing the potential we decided to continue on... the result was the Stargates v1a Mission Makers Release which I'll hold up my hands and say was a complete failure; it was at that point we're we realized that the old ofp code just couldn't cut it in ArmA. The old code was messy, full of hacks and still contained parts of BxBx's original code, it simply wasn't designed to process all the new information contained within ArmA and soon became overloaded.

The only solution was a complete rewrite of all the Stargates base code, so begrudgingly I started to design a new system from the ground up.

Mods Future:
Well I should congratulate you if you've managed to read this far and not get bored, here's your reward; In this section I’m going to try explain the modular aspects of the new code and the contrast between the old code.

The first fact you must understand is the Stargate codebase in now modular (compared to the shear bulk of the old code) and comes in 3 parts.
1. The Stargate (model and handler code),
2. The DSF Base code (logic code),
3. The DHD Dialler (model and handler code).
The most important of these parts is the DSF Base code which can be considered as the brains of the mod, the Stargate and DHD are just extra bolt-on's (are you still with me?); to help you get an idea of what I mean I’ll try giving an example:

Think of the DSF Base code as a box with an input and an output.
__________________
| |
| DSF Base Code |
Input >>>>> >>>>> Output
| |
| |
---------------------------

Now the input comes from a dialler, for this example lets use a DHD, when you press a glyph it is passed into the DSF Base code through the input.
__________________
| |
| DSF Base Code |
[Key 1 (Earth)] >>>>> >>>>> Output
| |
|Buff:1 |
---------------------------

The DSF Base code takes this input and processes it, it this case it stores it in a buffer, eventually you'll want to engage the Stargate so you press the centre touchstone.
__________________
| |
| DSF Base Code |
[Key Touchstone] >>>>> >>>>> Output
| |
|Buff:1-7 |
---------------------------

The DSF Base code then processes all the inputs it has received and supplies an output.
__________________
| |
| DSF Base Code |
Input >>>>> >>>>> [Stargate Engaged]
| |
| |
---------------------------

This output is then picked up by the Stargate and acted upon.

Now this is a very simplistic explanation of what goes on but you get the picture, the bonus of designing the Mod this way is that the DSF Base code doesn't care what’s providing the input or what its outputting to; this means that Jo Blog’s could design a new DHD or Stargate and plug it directly into the system without having to do any messy coding at all. It also has the side effect of making the system completely multiplayer compatible.

Now modular design is but one of the many improvements we've written into the new code, if people have enjoyed this brief explanation then I’ll start trying to explain the other changes in future articles.

Questions and criticisms are welcome.

Post comment Comments
snotmaster0
snotmaster0 - - 62 comments

Wow, very cool ideas there! Keep up the good work!

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: