Monday 17 May 2010

Comms console

Today I added the ubiquitous chat console complete with 4 colour coded channel presets, Global, Side, Group, Vehicle. Complete with command parsing (/setkey lets you send keys to any object you're standing before which is handy). The console also has a command history using the UP/DOWN cursor keys. 

Chat entry toggled by hitting the ENTER key ala Warcraft.  Be aware that the primary action key has moved from the ENTER key to the "P" key (P for primary and also handily close to the square brackets used for menu navigation.

Clipboard paste is supported via..

Extern "Win32"
{
 Function OpenClipboard(hwnd%)
 Function CloseClipboard()
 Function GetClipboardData:Byte Ptr(Format:Int)
}
if(OpenClipboard(0)) String.FromCString(GetClipboardData(1));


Console text entry mode also disables all input mapper KEY_DEVICE inputs to avoid conflict. It was important to Flush the keybuffer on exit otherwise all those spaces translated into SUPER JUMPS after entering text. Besides, you should always flush before you leave.

Network comms chat is working fine except an occasional (Not Responding) display "freeze" only when the server was active. I thought was a problem with my Raknet interface but logs show packets still being processed by the game. The problem seems related to not wearing the TrackIR pro-clip device when the network is active. As soon as I put on the head tracker device the display responded normally as if nothing had happened, even chat catches up. Most odd as I've not experienced this with TrackIR before.

Commands for server control are working including IP ban/unban. I do need to harden the user interface for network connections, the menus need to change to show the connection is already active and offer a disconnect. And the client needs a suitable connect-time period before giving up and allowing a re-try. We will begin NAT testing when I've got that sorted.



Last night I made a DLL into which I was able to pass a structure containing flight data. It did nothing beyond reading it back but will be handy for exporting game data to third party programs.

My TrackClip Pro has fallen apart. Only glue is holding it together.

4 comments:

  1. It's funny you mention the WoW chat. It kinda grows on you over time and it's nice to know that you'll be able to enter it the same way. Mmmm... I wonder what the /dance emote would do inside the Apache...

    ReplyDelete
  2. See new image :)

    (You don't actually dance, we only have a cube and a mellon to represent your ground avatar atm). But emotes are things I want to add eventually, for ground crews and pilot hand signals. They look great in videos with thumping rock tracks.

    I'm told that "P" for primary action is perhaps not as user friendly as "E" since we have WASD controls on the ground. So I will change that by default I think.

    ReplyDelete
  3. LOL! So can we be an alliance or horde pilot too? :P

    Yeah "E" would probably make more sense (and/or mouse button 1). More like an FPS when you're on the ground.

    Are you adding a menu for emotes too? (ala WoW or similar). Would be easier for folks to use instead of having to remember all the emotes.

    ReplyDelete
  4. I don't think I'll be adding menus anywhere, trying to avoid them as much as possible. Animated emotes are pie in the sky gravy items atm but it's easy enough to add /help emote. And if we do add animated emotes we'll probably hotkey 4 of them for making video.

    Dave is building a huge city right now and I'm working on NAT punchthrough so time to move on.

    ReplyDelete