GHads mind

developers thoughts & finds

Archive for the ‘Development’ Category

Introducing – GuildWars2 Commander Overlay

leave a comment »

Hi folks,

as the creator of I’m using my blog to promote this little goody 🙂

What is it? It’s a windows 7+ application/overlay above GuildWars2 showing timers and team movements for a game mode called World vs. World. Here three home worlds/servers combat each other player vs. player for a week by killing other raids or conquering castles, towers and supply camps. now enriches this in multiple ways:

– Cooperative team play by seeing where other teams are heading to. You may have a coordinater in Teamspeak ordering teams to go here and there
– Know beforehand if the camp you’re heading to with your raid still has a timer
– Predict enemy movements be looking at the map overview
– Allows for visibile scouts too so a leader can see which objectives are protected by manpower
– Getting infos about who has claimed an objective and how long it is held

The cool thing about this is the work-out-of-the box character. You as GW2 player just fire up the game and join a WvW map. The Client (after you logged in) can automaticly pick up the map and your character and will (not yet implemented) place you into the correct team based on the leaders teamname and your login. There is nearly zero interaction needed but the team leader will see the new player as a team member.

The client is free and our complete server infrastructure that is able to support thousands of players at the same time costs (incl. Domain) not even 10$ a month. On the technology side we are using many technologies like ZeroMQ, Google AppEngine with Gaelyk and Protocolbuffers. We’ve overcome OS and program language boundaries and created a secure communication over an unsecure tcp socket. There were many challanges and I hope to have the time to blog details here about some of them.

It took me and a friend (plus some recently joined supporters) a year now from idea to the current closed Beta Version and I hope a public Beta for my whole home world “Elonareach” will be ready within four weeks.

Stay tuned,

Written by ghads

June 23, 2014 at 3:53 pm

VBScript read/write binary, encode/decode Base64

with 4 comments

Hi folks,

this time a longer posting, especially the code listing below. Today I’ll show some VBScript sample code on how to read/write a (binary) file and encode/decode it to/from Base64. You may ask why… Okay, this is mainly usefull if you need to call WebServices with byte array parameters when your file lies on disk. BTW: with it’s relativly easy to call WebServices with VBScript and I should really blog an example later. 

Imagine a WebService to convert certain file types, e.g. image formats. With this sample functions (+ PocketSoap) calling it would be no problem and may turns out usefull for thumbnail generation, picture post editing and whatever you want to do with a binary file received by a WebService on server-side…

Okay, enough blabla, now the script, which is blasting fast btw. This should work out-of-the-box on every XP machine (vista untested), should be self-documenting enough to understand and you may use an image file for proof of concept, like I used a little smiley png. And yes, I named the Script “ReadFileEncodeBase64DecodeBase64WriteFile.vbs” (try typing first letters and press TAB when using cmd) as it’s only used for sample purposes. Happy coding!

Greetz, GHad

' Call via cmd: cscript ReadFileEncodeBase64DecodeBase64WriteFile.vbs [pathToFile]
' - Reads file from arg into byte array
' - Encodes byte array to Base64 String
' - Decodes Base64 String to byte array
' - Writes byte array to new file
' Sample WITHOUT any warrenty! Use at own risk! Copyright 2008 Gerhard Balthasar
Option Explicit
' common consts
Const TypeBinary = 1
Const ForReading = 1, ForWriting = 2, ForAppending = 8
' getting file from args (no checks!)
Dim arguments, inFile, outFile
Set arguments = WScript.Arguments
inFile = arguments(0)
outFile = "new_" & inFile
Dim inByteArray, base64Encoded, base64Decoded, outByteArray

inByteArray = readBytes(inFile)
base64Encoded = encodeBase64(inByteArray)
Wscript.echo "Base64 encoded: " + base64Encoded
base64Decoded = decodeBase64(base64Encoded)
writeBytes outFile, base64Decoded
Wscript.echo "Finished!"
private function readBytes(file)
  dim inStream
  ' ADODB stream object used
  set inStream = WScript.CreateObject("ADODB.Stream")
  ' open with no arguments makes the stream an empty container 
  inStream.type= TypeBinary
  readBytes = inStream.Read()
end function
private function encodeBase64(bytes)
  dim DM, EL
  Set DM = CreateObject("Microsoft.XMLDOM")
  ' Create temporary node with Base64 data type
  Set EL = DM.createElement("tmp")
  EL.DataType = "bin.base64"
  ' Set bytes, get encoded String
  EL.NodeTypedValue = bytes
  encodeBase64 = EL.Text
end function
private function decodeBase64(base64)
  dim DM, EL
  Set DM = CreateObject("Microsoft.XMLDOM")
  ' Create temporary node with Base64 data type
  Set EL = DM.createElement("tmp")
  EL.DataType = "bin.base64"
  ' Set encoded String, get bytes
  EL.Text = base64
  decodeBase64 = EL.NodeTypedValue
end function
private Sub writeBytes(file, bytes)
  Dim binaryStream
  Set binaryStream = CreateObject("ADODB.Stream")
  binaryStream.Type = TypeBinary
  'Open the stream and write binary data
  binaryStream.Write bytes
  'Save binary data to disk
  binaryStream.SaveToFile file, ForWriting
End Sub

Written by ghads

October 17, 2008 at 11:37 pm

Useful OS/free tools for admins/technicans

leave a comment »

Back from vacation I found this one some minutes ago at DZone. Must investigate further, I think I’ll compile my own list of useful and to investigate tools soon. Until then, here’s the link:

Greetz GHad

PS: Will post some useful Java stuff next weeks. Stay tuned…

Edit: Got one to investigate further… MetaWidget ( Sounds very useful and interesting!

Written by ghads

October 8, 2008 at 8:37 am

Development Ecosystem

leave a comment »

No time/knowledge/money to setup a full build/project/issue management system? Try Buildix:

Buildix includes:

  • Subversion for Source Control
  • Mingle for Agile Project Management
  • Cruise Control for Continuous Integration
  • Trac as a wiki and bug-tracker
  • …plus a little bit of our own ThoughtWorks magic, to glue it all together

You can rapidly deploy your new infrastructure: either run Buildix from a LiveCD, or install it on an existing Ubuntu system. Use it as the base of your own software projects. The ‘Add New Project’ wizard will get your team’s projects started quickly and easily.

Sounds good. Must look for similar environments for git/mercury/bazaar. I’m still not sure about which envionment I like to use for my home pet projects.

Greetz GHad

Written by ghads

September 22, 2008 at 1:00 pm

Collaborative development Q&A

leave a comment »

Have any question ’bout anything on development, IT, computers?

Try: and it will be answered in seconds! This really rocks!

Written by ghads

September 16, 2008 at 11:36 am

Posted in Development

Tagged with , , , ,