GalaxyHack Screenshot Multiplayer AI script based strategy game.

GalaxyHack allows you to design a fleet of spaceships which can then be tested in AI script based battles against fleets designed by other players. Though battles take place in real time, the strategy comes before hand, both in writing short AI scripts in a very-easy-to-use proprietary scripting language, and also in the set up and selection of your forces.

License: free
Requirements:

  • SDL
  • SDL_image
  • SDL_mixer
  • Boost filesystem

Sound:Play in X:Play in Console:Multiplayer:Network Play:3D Acceleration:Source Available:
yesyesnoyesyesnoyes
Suggest an update

Comments

./galaxyhack: error while loading shared libraries: libaudio.so.2: cannot open shared object file: No such file or directory

I have sdlmixer installed what else do I need?
Re: can't run binary posted by James Gregory on Apr 14 2004 3:47 PM
libaudio is apparently provided by The Network Audio System (NAS). I never specifically link to this, so I can only assume it is automatically linked when I specify -lSDL.

Have you tried

cd /usr/lib && ls | grep libaudio

to see if a symlink might sort out the problem? Though if other SDL games with sound run fine for you, this shouldn't really be neccessary. If anyone else has any ideas I'm listening...

Re: can't run binary posted by James Gregory on Apr 14 2004 3:59 PM
Oh, also try searching

/usr/X11R6/lib/

for a libaudio to symlink to.

Re: can't run binary posted by James Gregory on Apr 14 2004 4:02 PM
or indeed wherever it is you have X11 libraries installed.

Or indeed try ls -R from /usr or / or whatever.

Re: can't run binary posted by straver on Apr 14 2004 4:39 PM
I found /usr/lib/libaudiofile.so and after making a symlink from libaudio.so.2 it worked.

Btw the game window had no borders.
Re: can't run binary posted by James Gregory on Apr 14 2004 5:31 PM
It's not supposed to. I have a 1024*768 screen and so the window fills up the screen when I run it in windowed mode whilst debugging.

You probably want to use one of the available command line options to make it full screen, and if you want make it use hardware acceleration too.

The license is GPL.
I think the reason I'm not seeing any of the links on the site (apart from the one to the forum) going anywhere is because they're done as Javascript menus. Personally I usually keep Javascript switched off for stability (and my other browser doesn't even support it), and I'm not the only one who does so.

Game sounds pretty neat though! I'd be interested to have a look some time.

Re: Aha! posted by James Gregory on Apr 26 2004 8:09 AM
I've tested it in IE, Mozilla and Lynx (which can't do javscript menus but the way it interprets the layout means all the links appear in any case), so I have made an effort to make the web pages work across different browsers and on different computers.

I think javascript is enough of a standard now that if you purposefully switch it off then you're purposefully being awkward. I don't know what you mean about turning off javascript for "stability", I haven't seen a web browser crash for years.

Re: Aha! posted by SpoonMeiser on Apr 27 2004 7:38 AM
I don't turn javascript off, but I don't think websites should rely on it. There are a number of sites on the net that use Javascript for excessivly annoying pop-up advertising. Many browsers don't provide decent control over what Javascript can, and cannot do, so turning it off sometimes makes sense.

I think that the benefits that using Javascript brings to a site is greatly outweighed by the convenience of having it turned off.

Just my thoughts
Re: Aha! posted by James Gregory on Apr 27 2004 8:19 AM
I doubt many people with Internet Explorer turn off javascript, as people only tend to use it if either a) they're not the sort of computery person who can be bothered trying out various other browsers or fiddling with options, they use it because it's there and it works. or b) they use it because they don't want the problems caused by using a browser that differs from whatever everyone else uses.

This means that if you've turned off javascript you're probably the sort of person who uses Mozilla or Opera or something. In Mozilla you can stop javascript from doing particularly annoying things just by going edit->preferences, I assume the same is also true of Opera.

Re: Aha! posted by anonymous on Apr 29 2004 1:38 AM
i thought this comments section was about the game not fucking javascript!
Yet Another Custom Language? Why?

I'm always a bit suprised when I see another game with its own scripting language. Looking over the documentation, it's certainly got some cute syntactic sugar -- but there's nothing there that couldn't be done with one of the many, many scheme implementations, meaning less work for the author (no need to maintain ones' own parser/interpreter/etc) and less work for the player (no need to learn YACL).

NIH syndrome, maybe? Or was writing a custom language part of the intent of the exercise?

Re: YACL? posted by James Gregory on May 6 2004 12:52 PM
The original reason that I made YACL is that when I started writing the game I wasn't aware how easy it was to embed ready-made scripting languages, and so I never originally realised that it was an option. Likewise the original reason it don't use someone else's GUI is that I wasn't fully aware of the options out there.

However, I get the feeling that maybe it wouldn't be a good idea to rewrite it all to use someone else's language even if I wanted to, for one particular reason: speed.

All existing AI script battle games that I am aware of give one single tank/robot/whatever to each player. By giving each player a whole fleet the game has the potential to seriously tax the processor if people write anything more than very short scripts. By disallowing, for instance, explicit loops and forcing people to use built in functions written in C++ that perform loops and return answers, the idea is it should be able to run quickly on a normal PC even if there are lots and lots of groups of units executing fairly complicated scripts.

Ideally I would like to use tabs rather than curly brackets to group blocks, which would then give it a syntax almost identical to Python and make the fact that it is YACL less obvious. But doing this would be rather boring and time consuming and so I think I might instead spend the time elsewhere - like maybe contributing to someone else's game, or indeed maybe just playing games.

Re: YACL? posted by anonymous on May 6 2004 3:36 PM
Hmm. Re the performance thing, considered use of microthreads (a la Stackless Python)? One could almost get it to a point where how frequently a specific ship's "CPU" ticks is affected by the complexity of its scriptage (so if someone writes something that crowds out another player's CPU time, the other player's script will have many more reaction cycles while the first player's just turns over once).

It's just a thought, of course, and the implementation difficulty added by such a thing would likely counteract quite a bit of the simplicity added by using a pre-built language... but then, it would certainly be adding another element to the game.

Re: YACL? posted by James Gregory on May 6 2004 8:12 PM
I did originally think about maybe making each group have its own thread, but when I started thinking about how to implement such a thing in code I realised I don't know anywhere near enough about threading to make it work - I'd have to spend a few months reading a couple of hefty textbooks first. So though that would be pretty clever, I decided to face up to reality and have tried to keep things fairly simple.
Re: YACL? posted by anonymous on Aug 29 2004 2:22 PM
Lua is the industry standard scripting language. It is used, notably, by Lucas Arts and Microsoft Games.

From the talk abstrat at the LL3 programming language conference :

Lua is a scripting language with a growing number of users, mainly in the game industry. Its main features are lightness, portability, efficiency, and easiness to embed. In this talk we will give an overview of the new virtual machine of Lua (version 5.0). We will describe how the machine uses a register-based architecture (instead of the conventional stack-based approach used by most interpreters) and how it optimizes the use of (associative) tables as arrays. These changes allowed a speed up of ~30% in the new version of the language.

Lua is the fastest bytecoded language on the Great Programming Language Shootout, tied with the bytecoded version of ocaml.

Lua is at http://www.lua.org/

Re: YACL? posted by James Gregory on Aug 29 2004 3:43 PM
Well, if anyone anyone wants to glue GalaxyHack to Lua / Python / stackless Python / Ruby / Lisp / interpreted BrainF*ck or any other scripting language that they would rather the game use, they can feel free. I'd be happy to rewrite GalaxyHack such that the way it deals with AI scripts is totally language-neutral if someone else is willing to write the code specific to whatever their choice of language is.
Re: YACL? posted by anonymous on Jul 28 2006 12:52 AM

An interesting offer.

Is it that hard to separate out a stream now? You must have something that reads your argot out of files now, which is a stream interface. Adding a port to take that same character stream is really all it takes. That way, any decent language could pop onto that stream port and 'speak'.

I haven't even glanced at the code, but as long as there is a method to obtain object status info, i.e. to 'listen', the simple port can be worked. This is how scripters speak to stuff such as gnuplot and TK.

Since this game looks like a variant of Corewars, something you should setup are 'hills'. That's a web-based playfield that takes code submissions and plays them against all prior winners. The new challenger is ranked against the existing 'kings', and bumps the lowest off the hill if it scores better. See a current Corewars FAQ for details.

Such 'hills' would bring ALOT of life to your game. Instead of isolated users, you get a growing group, and such events attract serious notice....

Hi there!

I have been browsing the Net for quite a while to look for good shareware/freeware/OSS generating simulations.

The "business case" is the need to develop a distance learning programme with simulations (otherwise learners get frustrated and 80% of them drop off), and the consultant hired to create the curriculum insists on delivering PowerPoint slides for superior user experience, and some Word and Excel for the simulations :-p

Initially, I had in mind some action maze software (like Quandary). While reading on, I found some commercial providers launch AI enabled training programmes such as flight simulators and - what is closer to my case - business training powered by fuzzy logic (see http://www.computeruser.com/articles/2207,1,1,1,0701,03.html). Thus, I started looking for AI enabled open source games as a potential turf ground for this dream application, and landed in your list.

The basic question is: can GalaxyHack, as existing at present, be re-modelled to feature user defined characters (avatars) and their behaviour, instead of driving tanks? If so, this could be a very interesting case for an eLearning simulator for virtual class training. The requirements are delivery over Internet with potential bad connectivity, and the trainer to be able to control the parameters of the game so it fits the context of the course he teaches.

There is one technology in the article mentioned above that I find interesting to facilitate low bandtwidth delivery - the Veepers of www.pulse3d.com . Any hint to a similar OS programme so I could model the appearance of characters in parallel?

Thanks in advance for your comments. Please send them to [email protected]

Kremena

Re: AI scripts for eLearing simulations? posted by James Gregory on May 9 2004 3:54 PM
N.B. for anyone interested, my email reply to this guy can be summarized thus:

"Erm, no, probably not"

Mmh, very nice game. Still feels a bit crude in some aspects, but AI scripting is a lot of fun.

It takes a little while to adapt to the syntax tough, and my buggy scripts tend crash the game at times. But I'm getting better at scripting :) In my latest victory two of my fregates patroled for 10 minutes around a capitalship, firing at long range while avoiding the ships short range defense :)

An interesting concept - design and program fleets of ships that are then used in combat. No real-time control of the fleets, only programming. The scripting language is extremely restrictive on little things like extra spaces. No built-in script editing. Multiplayer consists of downloading other people's fleets and running them locally. No sound effects (the author says he tried it and they were too 'annoying'). 2D graphics.
Re: Potential, but not there yet posted by James Gregory on Sep 9 2004 10:13 PM
- The fact that it gets confused by multiple spaces is a bit stupid, yes.
- Lack of built in scripting is somewhat annoying, but writing an SDL text editor would be a major undertaking. Maybe one day.
- The game used to feature internet play but I decided to remove it and replace it with the downloading thing because it's never going to be popular enough that internet play would make sense, and you don't actually gain much benefit from internet play if there isn't any real time game interaction in any case. The one line game-tome description really shouldn't begin with "multiplayer" any more but the update game thing doesn't give an option to change it.
Re: Potential, but not there yet posted by James Gregory on Sep 12 2004 6:11 AM
Well, point 1 is now fixed. I think I'm going to stop spamming the tome with release notices, though.
it would freeze on me every so often, but that aside, it's not a bad game. allow players to customize AI and set maximum point values for battles, allow capitol ship movement... just ideas...
A very specific kind of game, that does what it does very well. Probably not everyone's cup of tea, though.
I admit I didn't try out the game yet, since I mainly surf the Web from work, but it looks like it would make a nice tactical module for a space strategy game. If you allow for capital ships that can fight each other (maybe they don't need to move, though), and maybe for more diversified ships (based on hulls/components that a player would assemble in-game) with different characteristics, you would basically have all that's needed. Of course in a 4X game you would have only a specific set of pre-coded AIs available (the equivalent of different "battle plans") for each race, and maybe technology would allow you to discover better ones.
I'm just launching the idea, in case someone picks it up and starts something. But I'm a beginning programmer myself, and if the designer of this game likes my suggestions and starts implementing them (as features of the current game), I might actually do this 4X game myself a year or so from now and integrate GalaxyHack into it. I'm a Stars! fan, in case you were wondering, and I've been waiting for ages for a good sequel.
Re: As tactical module for a 4X game? posted by James Gregory on May 21 2005 3:20 AM
Funny you should say that, the comment immediately before yours is from someone who emailed me to suggest exactly the same thing, using xconq as the 4X engine and GalaxyHack as the tactical engine. And he suggested exactly the same thing w.r.t. fixed AIs. So someone else might be doing it, though I'm not convinced it's actually going to happen.
a very nice game.
i think in comparison to other write-your-own-ai-scripts games, this one is more easy to get into, [the proof is i did not get frustrated too soon to just loose interest and erase it from my harddisk ;) ]
sadly it is not improved anymore, but i just can recommend looking into it. there are quite some fleets to download to put your own space force up against
Where is configure?
Re: configure posted by James Gregory on Jul 27 2006 12:25 AM
There isn't one.
It would be nice if there was something like no-sound option. I'm not saying the ingame music is bad ;)
Re: --nosound posted by James Gregory on Jul 29 2006 8:57 AM
Options -> Music off?
Re: --nosound posted by anonymous on Jul 30 2006 9:23 AM
No available audio device terminate called after throwing an instance of 'std::runtime_error' what(): No available audio device

:((

Music off doesn't help.

Re: --nosound posted by James Gregory on Jul 30 2006 11:20 AM
Open settings.dat in $HOME/.galaxyhack, change "Disable sound: 0" to "Disable sound: 1"
Re: --nosound posted by anonymous on Jul 30 2006 9:55 PM
Has helped. Thx! Now, i can prepare my own space invaders ;)
If "move nenemy type == capitalship" is the second ai, that means something is wrong with this game ;)
Re: Everest posted by James Gregory on Jul 29 2006 8:57 AM
Where is Everest the 2nd best? Particularly considering it is 6912 points?
Re: Everest posted by anonymous on Jul 30 2006 9:26 AM
hive10k has 10090 points, the next one is Everest with 6912 . So, hive10k is 1. and Everest is 2.. Am I right?
Re: Everest posted by James Gregory on Jul 30 2006 11:21 AM
"Points" means "how many points did I spend on ships, weapons, etc", i.e. less is better.
Re: Everest posted by anonymous on Jul 30 2006 10:01 PM
oops. :) my bad.
I removed all the spam comments, but it seems this is an eternal work with new spam arriving daily. :(
Re: Spam posted by James Gregory on Oct 12 2006 8:37 AM
Block via IP address/domain?
Re: Spam posted by nath on Oct 12 2006 8:41 AM
That is not really possible as the spam seems to come from a wide variety of addresses. It is most likely a botnet of some sort. I started a spamvampire on my home machine to create some traffic costs for the advertised site but I doubt it will help a lot as long as I'm alone...
Re: Spam posted by anonymous on Oct 23 2006 8:04 AM
Hi, I wrote the Spambot Trap article (http://www.neilgunton.com/doc/spambot_trap). I have been hit by a botnet of spambots over the last week or so. I have written about it a little bit as an update to the article. I have tried raising this as an issue on WebmasterWorld (the post got deleted without comment!), slashdot (rejected) and reddit (ignored). So I am at a loss as to why people don't seem to care about this issue.

My crazyguyonabike website is constantly getting hit by these, but I am holding them off so far. My block list is currently around 180.

I thought that my preview step on my forums was stopping them, but I notice you seem to have a preview step too, and you're getting hit.

Anyway, if you'd like to talk about it or just rant, feel free to contact me. I found this site through a referer on one of your other forums, where someone linked to my article.

Good luck! This is a problem that just drives me up the wall, I feel like punching someone.

/Neil

Re: Spam posted by nath on Nov 2 2006 7:45 AM
I have read through your site, quite interesting although a bit different to our problem.
I try to block the spam comments by silently discarding all anonymous posts containing "http". We will see if that helps.
Re: Spam posted by anonymous on Oct 12 2006 1:32 PM
They've also hit directfb and glchess. A couple of other odd pages here and there, as well.

Would it be possible to block or automatically delete posts containing html links to specified domains? Maybe just a scripted cron job on the server that greps recent posts and removes them if they match?
Re: Spam posted by scytheman on Mar 10 2007 7:46 AM
Maybe you can add some time check. Humans need a certain amount of time for writing posts, bots don't.
To have sound reach your ears you need some substance to guide it, air, liquid or concrete stuff, none of them is available in open space, so it is quite realistic to hear nothing when a spaceship explodes or fires its guns.
Some more variety on background music would be great.
The inline fleet editor would be nice if it supported hilighted AI scripting, elas.
All in all a promising game. Suggestions in random order:
  • planets or asteroids to explore/defend
  • in game AI monitoring for debugging
  • real tutorials with examples
  • Color coded AI scripting
  • warp speed
  • stealth mode
Re: no sound in space posted by anonymous on Mar 12 2007 3:19 PM
In regard to sound in space, that's mostly true. You'd hear your OWN engine and your guns firing, as they're attached to your ship -- and any advanced warning system should place a spatially-oriented sound cue to tell you when an enemy ship opens fire so you can take evasive action without the time spent looking down at your radar/lidar to determine where the shot's coming from.
Explosions nearby should create a faint whooshing sound as debris and the compressed atmosphere from the ship's interior expands, striking your ship's hull. Another ship passing close by would also create a whoosh as it's exhaust strikes you hull -- more or less, depending on how much matter is ejected from its engines' thrust. (A rocket throws out a big cloud, whereas crazy reactionless drives wouldn't throw out anything.) In addition, solar and other particles (since space is rarely close to a perfect vacuum) would likewise create a very faint rushing sound if your ship was under a great speed relative to the velocity of nearby particles.
And in a nebula, sound propagates just fine.

Log in or register to rate this game or post a comment.