Battle for the Solar System: Tactics

Happy New Year, all!

Just joined so that I could share a game that I’m working on - a turn based strategy type game, set in space. It’s only at v0.1 at the moment, but things have gone quite smoothly so far. At the moment, there aren’t any real mission, just some training sections and randomly generated scenarios, which involve blasting down the enemy units.

I’v got a load of features to add to it in the coming months, including a campaign (the details of which I’m still trying to work out - the game’s based on a novel trilogy I wrote, so have to fit things into that).

Screens:

http://www.battleforthesolarsystem.com/images/games/TBFTSS-Tactics01.jpg

http://www.battleforthesolarsystem.com/images/games/TBFTSS-Tactics02.jpg

http://www.battleforthesolarsystem.com/images/games/TBFTSS-Tactics03.jpg

http://www.battleforthesolarsystem.com/images/games/TBFTSS-Tactics04.jpg

You can get the game here:

http://www.battleforthesolarsystem.com/games/

and the gameplay manual can be found here:

http://www.battleforthesolarsystem.com/games/tacticsManual.html

It’s only been tested on Linux so far, but the game uses LWJGL and OpenGL, so it should run on Windows and Mac OS, as well.

Will post updates as they come along!

Uh oh! UnsatisfiedLinkError for the lwjgl library!

C:\Documents and Settings\Owner>java -jar C:\DOCUME~1\Owner\LOCALS~1\Temp\Rar$DR
06.766\TBFTSS-0.1.140101\TBFTSS.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: C
:\Documents and Settings\Owner\natives\lwjgl.dll
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.load0(Unknown Source)
        at java.lang.System.load(Unknown Source)
        at org.lwjgl.Sys$1.run(Sys.java:70)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
        at org.lwjgl.Sys.loadLibrary(Sys.java:95)
        at org.lwjgl.Sys.<clinit>(Sys.java:112)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:132)
        at com.parallelrealities.tbftss.GameWindow.<init>(Unknown Source)
        at com.parallelrealities.tbftss.Main.main(Unknown Source)

Try testing it on other computers before launch :slight_smile:

Hmm, I don’t have Windows, so I could only test on Linux.

According to the LWGJL, you need only use:


System.setProperty("org.lwjgl.librarypath", new File("natives").getAbsolutePath());

to get the natives to work. Are you running the jar from the extract directory, as it looks like you’re running it from elsewhere. Does it work if you cd into the actual extract dir…?

I believe that if you do the following, it should work no matter where you run it from:


System.setProperty(
    "org.lwjgl.librarypath", 
    new File(getClass().getProtectionDomain().getCodeSource().getLocation().toURI()).getParent() + "natives");

I don’t claim that this will work immediately. I haven’t tested it so it might need a file separator in there somewhere or it might need to be converted to an absolute path or something like that. I can’t be bothered to look up the docs for all those methods.

Looks cool! Very good graphics wise for a v0.1 release. Do you do the art yourself? Also, the particle effects look good.

Thanks!

I do the graphics myself, yes. I’m not an artist at all, so I’m glad they’re at least functional.

As for further game development - right now, I’m working on ideas for the campaign and what it could involve. I don’t want to have a linear set of missions, would rather have the player need to secure and keep star systems safe, while pursuing major goals. The fighters will be able to level up (better accuracy, better dodge) and the player will be able to purchase more (if they run out of money, they will need to use Darts until they can afford other fighters again).

The campaign will start to show up in version 0.3 or so, but might still break saves every now again as things change. Hopefully not often, though.

Oh, and I’m working on improving the AI, as I know that that’s quite ropey. Something I realised when I was making the game was that, unlike ground-based TBS games, there is no cover and no line of sight. Since we’re out in space, you can see everything. I was going to put in a limited sight range, but didn’t feel it worked in practice.

If anyone wants tips on how I drew the fighters, I did the following (in Gimp):

  • Drew an outline of the general appearance
  • Filled in the major components - cockpit, wings, etc, with different colours and shades
  • Used a few gradient fills as needed
  • Used the burn and dodge tools to add highlights and lowlights
  • Tweaked the edges as needed
  • Drew a black outline around the fighter

I then continued to make tweaks as need when I looked at the sprite in game, such as darkening or lightening parts. Not too much, though. Another tip is to look at screenshots of arcade games from the 80s and 90s (and games on the SNES and Megadrive), and zoom in a lot to check out the shading and forms. Can seem daunting at first, but once you get the general principal, it’s not too bad. Well, I say that, but I’m not making animated sprites, so that might be a whole other ballgame! :wink:

Thanks for this, dude! Seems to work fine in Eclipse. Only had to add a / before the natives. So,


System.setProperty(
    "org.lwjgl.librarypath", 
    new File(getClass().getProtectionDomain().getCodeSource().getLocation().toURI()).getParent() + "/natives");

Will see how it goes on my next release. If all fails, I’ll just write some shell scripts to handle the launching :wink:

I’ve just uploaded a new build of the game. This isn’t quite 0.2 yet, but it’s getting there.

New features include:

  • The start of the campaign (using test star systems)
  • Improvements to the enemy AI
  • A new mission type - Patrol
  • Difficulty balancing

Those who are interested can grab it from here:

http://www.battleforthesolarsystem.com/games/TBFTSS-0.1.140105.zip

Problems over here (win7 64bits)

23:20:36 [main] ERROR com.parallelrealities.tbftss.Main - Unhandled error occurred. Game exiting.
org.lwjgl.LWJGLException: Failed to create window
at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:218) ~[TBFTSS.jar:na]
at org.lwjgl.opengl.Display.createWindow(Display.java:303) ~[TBFTSS.jar:na]
at org.lwjgl.opengl.Display.create(Display.java:845) ~[TBFTSS.jar:na]
at org.lwjgl.opengl.Display.create(Display.java:754) ~[TBFTSS.jar:na]
at org.lwjgl.opengl.Display.create(Display.java:736) ~[TBFTSS.jar:na]
at com.parallelrealities.tbftss.GameWindow.(Unknown Source) ~[TBFTSS.jar:na]
at com.parallelrealities.tbftss.Main.(Unknown Source) [TBFTSS.jar:na]
at com.parallelrealities.tbftss.Main.main(Unknown Source) [TBFTSS.jar:na]

Hmm, that’s a bit of an odd one. :clue:

At first, I thought it might be because the game was trying to get into fullscreen, but the line I use for creating the window is as simple as:


public GameWindow() throws LWJGLException
{
	Display.setTitle("TBFTSS: Tactics");
	Display.setDisplayMode(new DisplayMode(Constants.SCREEN_WIDTH, Constants.SCREEN_HEIGHT));
	Display.create();

	initVersion();

	initOpenGL();
}

Then again, maybe I should try and force fullscreen false in there. Runs in windowed mode on Linux, but perhaps Windows is a different story. Could also be the DLLs…?

Decided to install the latest version of LWJGL (had been using an older version before) and tested on Windows 7. Game loads up and works fine, now. Will post an update this weekend (will be v0.2! woooooo!) ;D

Not quite the weekend, but almost! Anyway, here’s the v0.2 download!

http://www.battleforthesolarsystem.com/games/TBFTSS-0.2.140109.zip

Fingers crossed it will run without problems on all machines (certainly runs fine on Linux). The game is still using some placeholder data, such as the star systems (which will be replaced with those from the books), but the actual combat sequences are playable. I’m cracking on with the v0.3 version now.

If you get any errors about serialization, you’ll sadly have to delete your save file (tbftss.ser). That’ll all settle down closer to v1.0.

works fine with windows 7 and java 6.

my 2 cents:

  • use a launch4j or similar programs to build exe => noobs find scary jars (windows noobs btw)
  • i prefer select with left mouse button and then right mouse button to make action => is possible ?
  • maybe a minimap/radar in left/right corner?
  • for noobs could be useful tooltip over buttons
  • what kind of library are you using for interface? seems good
  • I like to see when enemy moves :smiley:

good work so far!

Thanks for the comment, Gornova! I’ll definitely consider some of those. The mini radar is a good idea, as are the tool tips for a battle icons (which I’ll make prettier in later versions).

The interface is something I created myself. The widgets are simply some text with a background and some highlights. Whenever the player clicks the screen, I check to see if they’ve clicked a widget and invoke its function :slight_smile:

Now working on set missions, and the ability to buy and sell units!

Thought I’d post a little update - some screenshots from the upcoming v0.3. Still using the test systems right now, but planning on getting the actual star systems from the novels into the game from v0.5 onward:

http://www.battleforthesolarsystem.com/images/games/WIP/WIP01.png

The galactic map, showing a campaign mission active in the Alpha system. At the top, we can see (L-R) the amount of money the player has, the current time (year, day of year, hour), the number of active missions and alerts, the number of star systems belonging the allies, the number of star systems that have gone rogue, the number that have been invaded by the Pandorans, and the total number of units the player has.

http://www.battleforthesolarsystem.com/images/games/WIP/WIP02.png

The star system view, showing the units stationed there. The short description of the campaign mission is shown, and the player can buy, sell, and transfer units. Patrol and Start Mission are ghosted until the player has selected at least one unit to deploy.

http://www.battleforthesolarsystem.com/images/games/WIP/WIP03.png

Buying units. You can have up to 48 units stationed in a star system, and cannot purchase more than that. Darts are always free, which is why they cost nothing. I figured this was important in case the player runs out of money and cannot fight the war. Darts are, however, rather crap.

http://www.battleforthesolarsystem.com/images/games/WIP/WIP04.png

A random event in the Beta system, either an attack on civilians there, or general sweep mission. Random events expire after 48 hours and the player is penalised for not dealing with it (by way of a system stability decrease). Campaign don’t currently expire.

v0.3 is now out.

New features in this version include:

  • Ability to buy, sell, and transfer units
  • Anti-terror missions, where you need to protect civilians
  • Mini radar on the battle screen
  • A bunch of other tweaks
  • Linux shell script and Windows bat file for launching the game

You can download it from here - http://www.battleforthesolarsystem.com/games/TBFTSS-0.3.140126.zip

I’m moving onto v0.4 now, and have finally settled on how I want the game to play out. Things will hopefully start to stabilize in the next couple of versions, so people won’t have to delete their save files with each version bump!

is not working with Java 7 :

Exception in thread “main” java.lang.UnsupportedClassVersionError: com/parallelr
ealities/tbftss/Main : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: com.parallelrealities.tbftss.Main. Program will e
xit.

Hmm, that’s odd. I’ve actually compiled this version with OpenJDK 7:


steve@reddwarf ~ $ java -version
java version "1.7.0_51"
OpenJDK Runtime Environment (IcedTea 2.4.4) (7u51-2.4.4-0ubuntu0.12.04.2)
OpenJDK Server VM (build 24.45-b08, mixed mode)
steve@reddwarf ~ $ 

Was on 6 beforehand. I upgraded when I wasn’t able to run anyone else’s projects from here :clue:

Are you on Windows, Mac, or Linux…?

windows xp with Java 7:

java version “1.7.0_07”
Java™ SE Runtime Environment (build 1.7.0_07-b11)
Java HotSpot™ Client VM (build 23.3-b01, mixed mode, sharing)

That’s strange.

I’ve only ever seen that error happen when you try and run Java 7 applications with Java 6.