Advertisement

Author Topic: SPON Scuba v0.1.0 (DO NOT SUBMIT)  (Read 7940 times)

0 Members and 1 Guest are viewing this topic.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
SPON Scuba v0.1.0 (DO NOT SUBMIT)
« on: 23 Oct 2008, 19:53:03 »
SPON Scuba v0.1.0
- Released: 2008-10-23
- Install size: 38k (mission scripts) / 92k (addon version)
- (mission version) 100% scripts with no addon dependencies
- (addon version) Requires XEH (1.9 or higher), but a copy of the latest version is included in the release.
- Requires ArmA 1.09 (or higher) and SPON Core (v0.5.1 or higher).
- See attached README.html for full details

Overview
Explore the vast undersea kingdom at last...and blow it up! Underwater swimming and demolitions.

Requires that the SPON Core be installed in the mission (v0.5.1 or higher). Both SPON Scuba and SPON Core are available in two versions: One is a client-side addon and the other is mission-script-based, which does not require any addons to be installed on client or server. Both require ArmA 1.09 or higher.

Recommended for use with the ADO Combat Diver model (From ADO compagnie addon which requires ADO armes). I am not in any way affiliated with the ADO mod.

Features
    * Swim upwards or downwards in water (Uses <Helicopter Up> and <Helicopter Down>, which defaults to 'Q' and 'Z' keys).
    * All equipment, that would otherwise be lost, is preserved while swimming and re-equipped when getting out of the water.
    * Player can hold breath when swimming underwater, for a certain time, then starts taking damage. Resurfacing replenishes breath.
    * A player with air-supply equipment will use that when swimming underwater, rather than holding breath, until it runs out (AI are considered to have an infinite air-supply).
    * Accelerated swimming speed for players, at about 2x normal (pretending we are wearing a wetsuit and flippers).
    * AI can be made to scuba too, though they won't do it normally (using SPON_Scuba_swimAtDepth function).
    * AI breathe when underwater, producing bubble effect (particles).
    * Compatibility:
          o SP: Yes (not team-switch), but see limitations, below.
          o MP: No
          o Missions or addons that don't share key event handlers: No.

Limitations
    * When equipment is re-equipped after swimming, all large magazines will be refilled and primary/secondary weapons reloaded!
    * As far as the engine is concerned, you are really floating on the surface of the water, so AI can still see and shoot at you at that surface position and you can't swim under boats.
    * AI have infinite air-supplies.
    * Can't touch off underwater satchel charges when inside a vehicle (not implemented yet).
    * Satchels are placed instantly, when they should take a couple of seconds (not implemented yet).
    * When using SPON_Scuba_swimAtDepth, the AI will instantly move to that depth. They won't smoothy swim to it (not implemented yet).
    * When taking suffocation damage, there is no aural or visual indicator (not implemented yet).
    * No limitation of depth that can be dived to. Should take damage below about 50m due to pressure (not implemented yet).

Known Issues
    * In MP, other players flicker quite badly and appear both in their actual submerged position and on the surface at once! This also means you can be shot by other people firing at your "surface-image", even if you are swimming far below the surface.
    * When swimming very near the sea bed, movement for the local player can be a bit jerky.
    * You can still take equipment out of the cargo of a boat while swimming, even though you already have gear preserved (when you get out, you can be carrying too much gear).
    * AI getting reequipped when they get out of the water always equip their pistol, if they have one, rather than correctly going back to their primary weapon.

Plans
    * Harpoon gun!
    * A lot more configuration options.
    * A better display than using a hint.
    * Fire pistol when treading water on surface (not firing when underwater or through water).

Design Aims
    * Explore an entirely new dimension of the game!
    * Avoid addons, in favour of scripting, as far as possible. 100% mission-scripts version available!

Credits
    * Inspired by an underwater swim script at the start of a mission by Goons.
    * Thanks to everyone at BIS and OFPEC forums for public testing, feedback and suggestions.
    * Dyson, Loki, et al, for private testing.
    * Thanks to Solus for allowing me to include the XEH addon in the release (and, of course, for making the great addon in the first place!)

Change Log
- v0.0.1
    * First release.

(See readme.html for full details of changes before current version)
« Last Edit: 24 Oct 2008, 18:16:13 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline USM-CPT.Dyson

  • Members
  • *
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #1 on: 23 Oct 2008, 21:24:37 »
Oodles of fun for the hole community! Hopefully a fix for the MP issues can be found.
CTI SectorLink
Version: Beta 7
http://hosted.filefront.com/Spyder001/

Offline loki72

  • Former Staff
  • ****
    • Loki's Nightmare
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #2 on: 23 Oct 2008, 22:39:24 »
once again.. the engine limits are broken... :clap: :clap:

Offline Odin

  • Members
  • *
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #3 on: 23 Oct 2008, 23:16:09 »
 :clap: This is going to be fun great job Spooner, I can't wait for the Harpoon, no whales will be safe.

Offline Undeceived

  • Members
  • *
    • My missions and campaigns
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #4 on: 23 Oct 2008, 23:21:00 »
Wow!! This is possible?? Great!!!
Just imagine what can be done with this?! New addons, new missions, etc......
Superb work, squad buddy Spooner! ;)
Current project: Black Lands (Arma 3)

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #5 on: 23 Oct 2008, 23:35:29 »
@Undeceived: A lot could be done with this in missions, even if just used for insertion and extraction (or even just intro/outros). Unfortunately, I've opened a whole can of worms with this (i.e. potential work); adding a 3rd dimension to ArmA really does boggle the mind, even if other people have done it before in OFP and in isolated missions in ArmA!

@Odin: My WIP abstract scripted harpoon is actually firing road-cones, since you can't fire real "ammo" underwater (bullets, etc, just collide with water itself!) which is very far from a sensible plan, so don't hold your breath (sorry, bad pun) on that one. Might be a non-starter unless I make it a proper addon-only system, which I'm loathe to do.

---

Since I released this today, someone told me about the CoC Combat Diver (for OFP). They put the player inside an invisible vehicle, which is more clunky in a lot of ways, but would, at least, work a lot better in MP.

DeanosBeano suggested making swimming animations that offset the character from his position, so you could still technically be at a surface position, but yet be seen beneath the surface (as opposed to be at the surface and continually be setPos downwards to fool you).

Both of these solutions to the MP issues are possible, but they would require a fair bit of work and experimentation as well as only being available if using an addon. I'm not sure if I'm interested in going that way, but I can't see any non-addon solutions to the problems with this script in MP.

If anyone knows of ArmA-compatible diver/frogman/seal/etc. player models then please tell me about them, since I might as well use them in conjunction with this. I wouldn't want to put them inside my release, but I could at least suggest people use them to avoid everyone swimming around in combat fatigues ;P

Oh, and although I mentioned them in the credits, thanks again to Loki who showed me Goons' mission that had a simple swim-insertion script in it (And, of course, to Goons, without whom I'd never have been inspired to built this pack up).
« Last Edit: 23 Oct 2008, 23:41:07 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #6 on: 24 Oct 2008, 16:12:19 »
very nice little thing you have here spooner , tested it out today and had some fun with the sharks :).
 it seems not long after someone else had a similar brainwave and decided diving would be good , its great how two similar addons come along when there was none just days before i think there really is a paralell universe ya know .
 
anyway here is a link to some beautiful scuba units by ADO. http://www.armaholic.com/page.php?id=3386
its part of a large pack but they are v nice.
I love ofp

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #7 on: 24 Oct 2008, 18:46:59 »
Yeah, I'm sure Norrin was cursing when I coincidentally released something that looks a lot like the script he has apparently been working on for the AAW mod. Totally parallel development though; neither party having any idea the other was working on a similar project.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #8 on: 24 Oct 2008, 20:57:29 »
The question is whether the flickering is local to each client, or only from the server. What if the swimming client PV's his position to the server, on which a monitor script setPos's his position to keep the server engine from making him a floater?
urp!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #9 on: 24 Oct 2008, 21:27:41 »
If you setPos the local player on each client as it does currently, then everyone else sees you on the surface, but a bit jerky (due to the normal setPos syncing across the network). You don't even appear at your submerged position to other players. This is worse than when you setPos in the air, since the engine forces men to the surface of water, rather than just having a buoyancy effect pushing you up (whereas it only exerts gravity on men above the surface of water/ground, so setPos flying is jerky, but you see the guy in the correct position).

If you tell the other clients to setPos your player, then you appear to them both on the surface and at your "correct" submerged position. Both separate images are hazy though and you can still be shot by other people if they aim at the surface-you, implying that the game sees you on the surface, regardless of where you appear. An important side-effect is that longer turn your diver around if it is being remotely setPossed...

I'm using waitUntil loops in all cases to ensure that I setPos exactly once a frame. As you can see when playing locally, your view of swimming AI and your own viewport is perfectly steady.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline OldBear

  • Members
  • *
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #10 on: 25 Oct 2008, 00:01:12 »
Incredible !
Too bad it don't work in MP.
Hope somebody will find a way around like in COC OFP addon.

@ Spooner : GMC@ADO from French ADO asked me to tell you he is already modeling a mini-sub and an underwater propeller for his "Commando Hubert" combat divers.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #11 on: 25 Oct 2008, 02:19:01 »
What I meant was setPos only on the client and the server, with the hopes that the server send the sync info. Probably a lost cause; sounds like the local engine is the problem.

Quote
An important side-effect is that longer turn your diver around if it is being remotely setPossed...
eh?
« Last Edit: 25 Oct 2008, 02:23:05 by Mr.Peanut »
urp!

Offline norrin

  • Tutorial Writer
  • **
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #12 on: 25 Oct 2008, 03:32:17 »
Hi mate,

You bugger :)  and I was just in the process of trying to fix the MP issues before I released too.   Sounds like our code may not be that different.  I got around the problem with being shot while you were underwater by using setCaptive true on the player while he was sumbmerged so even if the AI saw you floating on the surface when you were meant to be submerged they wouldn't shoot - seemed to fix the problem.  Anyway good luck mate - if you're working on this I won't bother releasing my script as there's no point in us replicating each others work.

norrin   
« Last Edit: 25 Oct 2008, 03:40:37 by norrin »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #13 on: 25 Oct 2008, 05:16:26 »
@Mr. Peanut:
I mean that if your player is being setPosed on another machine, then YOU cannot turn left/right with the mouse, though you can look up and down and move in other ways. Doesn't make sense to me, since setPos should only have a local effect if the object is remote when you setPos it

@Norrin:
Yeah, sorry, I've had people release things "very similar to" my nearly-ready work before and it has made me lose hair...

Yes, the setCaptive solution seems to have that problem covered. I think doing that while you are at least 1m deep would be reasonable. Thanks!

I realised that the MP issues probably wouldn't be resolved any time soon and probably not without messing about with various addon-based solutions, so I decided to release, knowing that at least it was a usable package, even if it was only SP-compatible. Seems to have gotten a lot of people excited, which is a good thing, but I know a lot of people will be disappointed by the limitations of only having SP working properly. Perhaps it will spur the MP solutions, as well as various diving-associated models, along if a lot of people shout loud enough about it too ;P

As far as abandoning your version, I'm very much in two minds about that. Obviously, I have only seen the video you posted and it is difficult to see which version does more or works better than the other (you have the advantage over me on that side). At the least, I'm sure you might have a few different features that we could merge into mine and/or collaborate a bit on it in the future, if you do decide it isn't worth working on two different versions (hell, I'm sure I could be persuaded to collaborate on yours rather than keep this one up to date ;P). I'm sure even if you haven't implemented them, you and the AAW people thought of features I never considered...
« Last Edit: 25 Oct 2008, 05:20:43 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline norrin

  • Tutorial Writer
  • **
Re: SPON Scuba v0.1.0 (DO NOT SUBMIT)
« Reply #14 on: 25 Oct 2008, 06:04:43 »
I'm very happy to help any way I can mate and I've PM'd you a link to my code - if any of its of use then feel free to take it.  I haven't had a chance to look through your code yet as I only found out about it 5 minutes before I posted here.  I'd run into the same setPos prob in MP and was just about to start trying solutions but you've probably already tried most of them by the sounds of things. Our original idea was to make some SCUBA units that had these scripts incorporated (they're still sometime off unfortunately) and this was just a proof of concept to make sure that it was worth doing.  Eventually we wanted to add a proper diver's swimming animation and increase the swimming speed in the addon as well as few other features.