Conquest of Planets (WIP) {Update: Jan 14}

Here is a game that I am working on for the 4K.

Conquest of Planets

Play it at http://marber8.freehostia.com/planet.jnlp

Instructions:
You are trying to take over 50% of the planets. The computer is trying to do the same.
There are 4 planet sizes. The largest planet has a defense of 50, then 40 for the next smallest, then 30 and 20 for the smallest. Ships have an attack and defense of 10. Ships are automatically built at your planets. The more planets you have, the more ships you can support. Also having more planets increases the rate at which you build them.

Your planets are red, The computer is blue and gray are neutral.

If you left click on one of your planets it will be selected. If you then left click on any other planet all your ships will be sent to that planet. If the new planet is already yours the ships will reinforce it. If it is neutral or the computer’s then you will attack it. If you click the middle button instead, then only half your ships will be sent.

If you drag select a bunch of planets then all your planets in the rectangle will be selected.

If you right click all your planets will be selected.

If you click on empty space all planets will be deselected.

I am still working on this, but any thoughts are welcome.

TODO:

  • is too easy so will increase the number of planets needed to win
  • make easy and hard options
  • improve ship generation

Got about 49% of the planets and;

java.lang.ArrayIndexOutOfBoundsException: 4
	at P.main(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

:frowning:

Aha! I saw a Flash game with this idea implemented nicely. And you’re squeezing it into 4k! :o

Cas :slight_smile:

Thanks. I put a debug version up to see if I can find the problem. Can you please try again?

Thanks. Yeah, I got the idea from that game. It’s called Star Baron: http://www.kongregate.com/games/alienpro/starbaron.

Just played it and got the same NPE.
It came up when attacking an opponents planet, in the moment when my ships arrived.

Hmmm. Can’t seem to replicate it with the debug version…


java.lang.ArrayIndexOutOfBoundsException: 4
	at P.main(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Occured when the AI was attacking a planet of his I had just captured.

Seems realy easy to replicate - managed it every game so far :-X

It occured for me when i was attacking one of his large planets with my entire fleet while he was attacking one of my planets

It is pretty fun, but a little easy i think.

perhaps it might be fun to have different planets generate different ships, i.e. small planets generate weak ships, big plannets strong ships. also a maximum range for the ships would force the player to progress through the planets. currently you can send all your ships from one side to the other with no penalty.

Another hint: Most of the time its hard to “click” a planet. Most of the time i need at least two tries until i hit it correctly. :frowning:

Slowing the speed ships travel would greatly improve that problem, possibly making their speed inversely proportional to the distance they are traveling - thereby making planet hopping the typical strategy.

Also I think allowing multiple concurrent attacks would add a little more depth to the game.

I’m in agreement with this being a little, easy, and some of the controls seeming unresponsive/failing to send ships. Needs a bit of work.

Also, to further continue the string of “game inspiration”, I believe that flash game you linked took it’s concept from an earlier game on kongregate (which, frankly, probably took it’s idea from some other indie game somewhere), called Nano War (http://www.kongregate.com/games/badben/nano-war).

It might be worth taking a look at how this game set up it’s mechanics, as it’s a slower paced, but still very intense game (I rather liked it, anyway). Having some indication of the strength of the neutral territory you’re attacking would be good, and I definitely think complete dominance should be the condition for victory, as it’s much more satisfying.

Perhaps, also, middle click for send all, and left click for sending half. Maybe this is just what I’m used to, but I thought it worked well. Although with the fast pace ship sending, maybe the 100% send is more practically useful. So perhaps disregard that. Or maybe use a ctrl-key modifier instead of a middle click, I’m not that fond of middle click as a thing I have to click rapidly/often. I’m not sure really though.

Good luck, hope to see this emerge into one of my favorites (I really enjoy these styles of games, for some reason)

Awesome gameplay, love it. One of the best game play concepts for a 4k that i’ve seen.

hmm, lost a planet to the AI early on, and now I have 7 of 5 ships.
Unfortunately I don’t actually have 7 ships… I have 0, but as it thinks I have 7, won’t spawn any more ><

Thanks for all the comments and bug reports guys. Will look into them.

Yes it is definitely too easy. I have over 300 bytes left to work with. I’ll see what I can do.

Thanks again.

wow i love it, fun game, it did crash on me tho…i guess i got to crazy moving ships.

would be great to introduce a maximum flight distance (indicated by a circle maybe), so you have to move a bit more strategic. so you can make levels where certain planets are only reachable from one neighboring planet, so you would have a fight for the transfer planet. also the build rate should depend on the planet size. if combined you could make a some interesting strategic challenges.

Edit: And change the goal to conquer all worlds. Let the enemy ships add to the defence af a planet.

I changed it so you now have to take over all the planets. The ships also move slower.

Fixed the ArrayIndexoutOfBoundsException and the ship counting problem.

It is still too easy. I will see if I can put a range limit. I think I will put an easy mode and a hard mode. This can remain as easy and hard will improve the computer in a couple of areas and see how that goes.

Thanks for all the comments so far. Keep 'em coming.

I guess you know it’s broken atm?