Announcement - Utility BuoyBlaster

This new Commander's Edition of Harpoon Classic includes land units, neutral and unknown sides, an improved radar and area ECM model and a host of other improvements. Rounding that out are over 200 scenarios and the WestPac Battleset. Try out this great new version of the classic Harpoon!
Post Reply
MarkShot
Posts: 7552
Joined: Sat Mar 29, 2003 6:04 am

Announcement - Utility BuoyBlaster

Post by MarkShot »

Do you ever get tired of tapping to lay down a field of buoys? Well, I have implemented a hot key utility that drops a series of buoys. The initial starting rate can be set. Additionally, the rate can be increased or decreased while the utility is running. The H363/ANW version allows one or both type of buoys to be selected. The utility needs to be bound to a programmable function key, mouse button, or some other hot facility. I am using a programmable gaming keyboard.

I have implemented this in WinBatch which is a Window's scripting language. WinBatch is not freeware. However, this could easily be converted to Visual Basic which could then be freely distributed along with the Visual Basic runtime.

The code for the HCCE version follows below along with a sample screenshot.

WinTitle(WinName(), "BuoyBlaster")

; Mark Kratzer 12/19/07
;
; Utility to feed buoy drop characters into HCCE at a steady
; rate. It will be activated via the G15 keyboard as G15 macro
; key.
;
; Usage is to plot a path for a helo and then start this macro.
;
; It will prompt for an initial frequency, but also use a default.
;
; Hold SHIFT key down to increase delay. Hold CTRL key down to decrease delay.
;
; Staff messages cause a temporary suspension.
;
; Pause the game to terminate.


; ----- Definitions ------

GameWindowName="Harpoon"
BuoyDefaultInterval=5
AckSound="AckSound.wav"

; ----- Initialize -----

; ----- Drop Buoys -----

WindowName=WinGetActive() ; get a custom frequency
BuoyInterval=AskLine("BuoyBlaster", "Enter seconds (wall clock) between buoys?", BuoyDefaultInterval)
Delay(1)
WinActivate(WindowName) ; return focus to HCCE

While @True

Delay(BuoyInterval) ; wait for next buoy drop

If IsKeyDown(@SHIFT) Then
BuoyInterval=BuoyInterval+2 ; increase by two seconds
Beep() ; two beeps for longer delay
Delay(1)
Beep()
End If

If IsKeyDown(@CTRL) Then
BuoyInterval=BuoyInterval-2 ; decrease by two seconds
If BuoyInterval<1 Then BuoyInterval=1 ; cannot go negative
Beep() ; one beep for shorter delay
End If

If StrIndex(WinGetActive(),GameWindowName,1,@FWDSCAN) Then ; Does HCCE have focus?
SendKey(".") ; emit buoy
PlayWaveForm(AckSound, 0) ; play sound for buoy drop
Else
If WinGetActive()<>"Staff Message" Then
Exit ; if pause or lose focus, then terminate
End If ; temporarily skip during staff message
End If

End While

Image
Attachments
BBS1.jpg
BBS1.jpg (29.72 KiB) Viewed 172 times
2021 - Resigned in writing as a 20+ year Matrix Beta and never looked back ...
User avatar
NefariousKoel
Posts: 1741
Joined: Tue Jul 23, 2002 3:48 am
Location: Murderous Missouri Scum

RE: Announcement - Utility BuoyBlaster

Post by NefariousKoel »

That's pretty sweet Mark!

Now to get someone to VB it.
User avatar
mack2
Posts: 243
Joined: Fri Jun 29, 2007 2:00 pm

RE: Announcement - Utility BuoyBlaster

Post by mack2 »

Someone stick it in the game.


User avatar
TonyE
Posts: 1583
Joined: Mon May 22, 2006 9:50 pm
Location: MN, USA
Contact:

RE: Announcement - Utility BuoyBlaster

Post by TonyE »

Hehe, that's why I don't like interface bug reports, I'd rather be spending my time writing a new (and inherently easier to extend) interface than fixing the old clunky one.&nbsp; Anyway, just waxing philosophical :)
Sincerely,
Tony Eischens
Harpoon (HC, HCE, HUCE, Classic) programmer
HarpGamer.com Co-Owner
MarkShot
Posts: 7552
Joined: Sat Mar 29, 2003 6:04 am

RE: Announcement - Utility BuoyBlaster

Post by MarkShot »

Tony,

I know you were planning to open the game up by pushing subsystems into DLLs and then publishing APIs. That would be cool, but still limits enhancing the game to truee programmers.

Have you looked at Sonalysts two game Sub Command and Dangerous Waters?

They have a facility call doctrine language. This is effectively an interpreted means to define the behavior of various game entities. So, there are doctrines for an AI sub and how it prosecutes a contact, how an AI sub evades a torpedo, how AI torpedos run and conduct a search, ...

This has allowed the players to enhance the game. Effectively, the game provides a call out these doctrines as needed. Additionally, the game provides some standardized functions that can be called and some built-in variables.

What all this does is provide non-programmers with an easy way to enhance the AI and make game platforms behave in a more realistic fashion. Such could be done with Harpoon. So, any player could do a little work on how a helo conducts an ASW search. In fact, if you provide a dialogue box tie-in, then you have the means for the players communicate requests for various types of search patterns and what not.

There are a number advantages of this over the DLL approach:

(1) Does not require technical expertise. Almost any player could tweak.

(2) The doctrine language is semantically very high-level and effectively self documenting.

(3) Easier to test and debug.

(4) Does not require builds; easier to distribute changes.

(5) Since the intent is not to open source Harpoon, such an approach keeps modders/hackers out of the address space of the game. The DLL approach encourages hacking and reverse engineering.

The negatives are:

(1) Requires more CPU cycles. So, very complex models of physics motion, sonar behavior, electromagnetic behavior, ... would be too expensive to implement like this.

(2) Modding becomes so easy to do that it could fragment the community if the idea really takes off.

(3) The AI will have no more secrets from the player, since it will be easy to see exactly how objects behave. For example, when hunting a sub, I will know exact how it will go about trying to evade. Of course, randomness and variable policies can be built.

Tony, I know you said to respond to your paper over at HarpGamer, but I hope it will be okay that I put these thoughts here.

Once again, thanks for all your superlative efforts on this game!
2021 - Resigned in writing as a 20+ year Matrix Beta and never looked back ...
User avatar
TonyE
Posts: 1583
Joined: Mon May 22, 2006 9:50 pm
Location: MN, USA
Contact:

RE: Announcement - Utility BuoyBlaster

Post by TonyE »

Yep, I have looked at those games and my intent is more to allow long term viability of HC via such DLL and API interfaces.&nbsp; At some point Matrix/AGSI will pull the plug, almost assuredly there will be people who don't want that plug pulled.&nbsp; By adding the more raw and programmer centric interfaces my hope is that more core changes to the game will be possible.&nbsp; At the same time a programmer type can come along and make scriptable enhancements via those DLL and API interfaces.&nbsp; Take the export DLL interface for example, my test DLL shunts all of the output to a text file that a non-programmer can massage in Excel.&nbsp; an export DLL can be created that has a simple ini file, xml file, or scripting language driven set of filters, giving you a more accessible way of massaging the data than writing your own DLL.&nbsp;
&nbsp;
In sum, my hope is to allow development of the game past the time when the source code is available, and doing so also allows the more accessible interface to the data that you desire.
Sincerely,
Tony Eischens
Harpoon (HC, HCE, HUCE, Classic) programmer
HarpGamer.com Co-Owner
MarkShot
Posts: 7552
Joined: Sat Mar 29, 2003 6:04 am

RE: Announcement - Utility BuoyBlaster

Post by MarkShot »

Well whatever you do do and however you do do it, it will surely be better than what we have today. Thanks!
2021 - Resigned in writing as a 20+ year Matrix Beta and never looked back ...
Post Reply

Return to “Larry Bond's Harpoon - Commander's Edition”