Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Fleet Game  (Read 5704 times)
0 Members and 1 Guest are viewing this topic.
Offline georgeecollins

Senior Newbie





« Posted 2013-02-17 15:42:06 »

Flat Fleet is a game prototype I made in Java with lwjgl.  It's an open ended action game in the style of old vector graphics game. 
I had some time between jobs to make this and I had a lot of fun with it.  No one has really played it except my son, so I know there are some bugs and probably other problems that I would love to get feedback on.  

www.backyardrobots.com/fleet/fleet.html

Offline zngga
« Reply #1 - Posted 2013-02-17 18:12:48 »

I am interested in playing this, but can't because I run a Linux box  Emo Could you package a Linux version, and I am sure all the Mac users here would enjoy a Mac version.

My code never has bugs... it just develops unexpected features!
Offline georgeecollins

Senior Newbie





« Reply #2 - Posted 2013-02-17 18:29:32 »

Sure.  I have tested a mac version but I havent tried a Linux one.  It shouldn't be too bad to make those versions.  I will try that and post when they are up.   
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline actual

JGO Coder


Medals: 23



« Reply #3 - Posted 2013-02-17 19:31:53 »

Nice game.  I like this style of graphics.
No one has really played it except my son,

So that explains the "FLEET COMMAND XXX CAPTAIN SPENCER DO YOUR HOMEWORK XXX REPEAT DO YOUR HOMEWORK" message . : )

The game has exited abruptly at two points. Once when I just left a port after having bought a new ship (it was being dragged behind me). The second time was when I was in port and clicked "Inspect".  There were no error messages, the game just quit.  I am on Windows 7.


EDIT:

If you are looking for some feedback, it would be good to make the corner buttons a little more descriptive (it's not obvious that an upward arrow would show a map). I didn't even realize I could click on them at first. Might not be a bad idea to group them together too.

I spent a lot of time sailing aimlessly because i wasn't sure where to go or where the action was. It would be nice to have some sort of mini-map? or something that would give you an indication of where you are, etc. as you are sailing.

Offline georgeecollins

Senior Newbie





« Reply #4 - Posted 2013-02-17 20:28:28 »

Actual-  thank you for trying this.  I will see if I can recreate those bugs.  You are supposed to drag guns and other components into the inspect box which I am sure is totally confusing. 

The 'M' key has a map of the world.  You can also click in the lower right corner to get the map.  Clicking on an island will target it.  Clicking on the top right is missions/ objectives. 

I added a Mac and Linux version now.  I have tested the Mac and I will try the Linux soon. 

Offline georgeecollins

Senior Newbie





« Reply #5 - Posted 2013-02-17 20:50:16 »

I fixed the bug when you click on the 'inspect' box.  You are supposed to click on the guns on your ship and drag them to the inspection box to see their properties.  Or you can click on the available components and put them into the inspection box to see if you want to buy them and put them on your ship. 

Thank you for finding that bug. 
Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #6 - Posted 2013-02-17 20:51:04 »

[...] the style of old ray traced games.

Wait wait wait! I don't think thaat's what ray-tracing means.

Nice game though. Smiley

Offline actual

JGO Coder


Medals: 23



« Reply #7 - Posted 2013-02-17 21:24:08 »

[...] the style of old ray traced games.

Wait wait wait! I don't think thaat's what ray-tracing means.

I've heard it referenced as Vector Graphics.
Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #8 - Posted 2013-02-17 21:40:01 »


I'd go with vector graphics, sure. I'm fairly sure ray tracing is quite different, though.

Offline zngga
« Reply #9 - Posted 2013-02-17 23:09:35 »

semantics, semantics.

My code never has bugs... it just develops unexpected features!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline zngga
« Reply #10 - Posted 2013-02-18 00:09:41 »

I just downloaded the Linux version and ran it, here is the exception and stack trace:

Exception in thread "main" java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
   at java.lang.Runtime.loadLibrary0(Runtime.java:823)
   at java.lang.System.loadLibrary(System.java:1028)
   at org.lwjgl.Sys$1.run(Sys.java:73)
   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:135)
   at FourExample.main(Unknown Source)
   ... 5 more

so the libraries are not linked correctly on the build path.

My code never has bugs... it just develops unexpected features!
Offline actual

JGO Coder


Medals: 23



« Reply #11 - Posted 2013-02-18 00:28:34 »

Actual-  thank you for trying this.  I will see if I can recreate those bugs.  You are supposed to drag guns and other components into the inspect box which I am sure is totally confusing. 
It might be easier (both for the player to understand and for you to code) if simply clicking on the component brings up the stats in the inspect box.

Quote
The 'M' key has a map of the world.  You can also click in the lower right corner to get the map.  Clicking on an island will target it.  Clicking on the top right is missions/ objectives. 

I was able to figure that out but it it would make it easier on the player if they were labelled.

Two more things:
1. A small but nice enhancement would there to be a game over screen along with the option to start a new game when a player dies, instead of just exiting.

2. It seems like you should be able to collect floating cargo but I couldn't figure out how to do it. I tried driving over it, stopping over it, clicking on it.
Offline georgeecollins

Senior Newbie





« Reply #12 - Posted 2013-02-18 00:44:17 »

That is a great idea about the inspection box.  I will try that. 

In every port there is a component called 'cargo'   You can put this in ships instead of guns.  You can actually make a lot of money moving crates from one island to another but then the blue pirates attack you. 

I agree also about a game over screen.  Really I wanted to do more ( I don't have to have islands for example, I was thinking about having missions that are like in mazes, and sea monsters, submarines etc. )  but I had to cut off at some point to get some feed back. 
Offline georgeecollins

Senior Newbie





« Reply #13 - Posted 2013-02-18 01:34:51 »

Zngga-
Thank you for trying this on Unix.  I am also having trouble running the package on my computer with Ubuntu on it.  I can build the project and run it in eclipse on my Ubuntu compurter, but when I export it as a 'runable jar' I get a folder, not an executable.  I am just not that familiar with this so I am going to have to figure it out.  Since it works in the IDE in Ubuntu I am pretty sure I can get it to work like it does in Mac & PC, I just have to figure out how to package it correctly.  Or something. 
Offline UprightPath
« Reply #14 - Posted 2013-02-18 10:06:59 »

Ah, instead of a hard game over, perhaps something like an 'escape pod' or the like, which can be used as an option?

Also, some sort of collision mechanic that goes beyond 'bouncing' off of enemies would be nice. When make a high speed escape and you just come to a dead halt when you hit a stationary enemy would nice.

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 793
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #15 - Posted 2013-02-18 15:14:45 »

When I was about to be destroyed:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
Exception in thread "main" java.lang.reflect.InvocationTargetException
        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 org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(Unknown Source)
Caused by: java.lang.NullPointerException
        at e.b(Unknown Source)
        at FourExample.a(Unknown Source)
        at FourExample.main(Unknown Source)
        ... 5 more

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 130
Projects: 4
Exp: 3 years



« Reply #16 - Posted 2013-02-18 18:36:43 »

When I was about to be destroyed:...
JVM's trying to save you...
Offline georgeecollins

Senior Newbie





« Reply #17 - Posted 2013-02-18 22:20:56 »

I just put up an updated version.  I believe I fixed the bug where you crash sometimes when you are near death, and the crash when you click on an empty inspection box.  I also implemented actual's excellent suggestion to have the inspection box populate when you click on a component of your ships, or a component you want to buy. 

I agree that I can do a better ship/ ship collision physics, but that will take a little more time then fixing the bugs.  I really appreciate the suggestions and I am sorry for the bugs. 

This is all very helpful to me.   Thank you. 
Offline UprightPath
« Reply #18 - Posted 2013-02-18 23:34:11 »

I'm just happy to see someone do a game like this, it reminds me of the old Escape Velocity games (Which were space faring rather than see faring). I mean over all? It looks great. And I honestly love the graphics style.

Another suggestion, as an alternative (Since I tend to end up getting on the bad side of the pirates really fast), is to have some option for ship-to-ship communications so that you can offer brides/buy things off close-by ships, things like that. It might be far off, but from what you've gotten up so far it doesn't look as though it would be too difficult to arrange.

Offline georgeecollins

Senior Newbie





« Reply #19 - Posted 2013-02-19 00:15:50 »

Thanks.  That is a really interesting idea to communicate with ships.  I think it is kind of confusing which ships are doing what (green/ blue / red) so some communication / status system would help.  I would like to have a way to win new ship components.  Once you by a component, it is available at all ports, but you have to find the 'plan' at a port.  It would be great if you could buy or steal a gun plan from somebody, or buy it. 

One problem with the vector style is that you can't true to it and have windows.  That means you can't have pop ups, but maybe I am being too much of a purist. 

Nobody seems to be having performance problems.  I could make the world like 10x as big on my computer but I was worried someone would get a bad framerate.  The other problem is that I don't have enough variety in geography.  I need continents or rivers or something.   I think I could figure that out though. 
Offline UprightPath
« Reply #20 - Posted 2013-02-19 01:35:44 »

Yes, it would be nice to have some idea of what the various people are doing (Especially since after the entry screen there's no explanation of who is what/where).

Before you work on things like rivers it would probably be better to work on the collisions, especially if the resulting rivers are less Mississippi/Nile and more like something else.

As for the pop-ups? Why not use layers instead? Freeze the game state, draw it, then make up your own pop-up style over the top of the game's state. Sort of like what you do for ports, but taking up a smaller part of the screen.

Offline UprightPath
« Reply #21 - Posted 2013-02-19 04:36:12 »

As a further idea/suggestion: A method for assigning fleet position/distribution. It seems somewhat random when you leave port (Beyond being able to select your first ship) and it can lead to some dangerous situations, such as the torpedos on a trailing ship hitting you suddenly (And painfully) because you didn't make a turn and things like that.

And sorry, I like the concept enough that I'll be bugging you for these things. Hah.

Offline actual

JGO Coder


Medals: 23



« Reply #22 - Posted 2013-02-19 04:37:38 »

I have not had any performance issues. I did have an issue where a red boat sailed through an island.

1. Red boat was chasing me and I went into a port.
2. After I went through the port screens and was back on the main screen the red ship came into the port to attack me
3. I hooked out of the port and to the right while the red ship got stuck making trying to make the turn.
4. I stopped so that the straight line path between me and the red ship passed through part of the island.
5. The red ship jittered and bounced into the land and eventually started sailing through the land (at a slow pace) in a straight line towards me.
6. After it passed through the shore on the other side and onto water, it resumed its normal speed.

I have not been able to reproduce the bug nor have I noticed any other cases where a ship has gone across land.
Offline georgeecollins

Senior Newbie





« Reply #23 - Posted 2013-02-19 05:10:46 »

It's actually quite possible for a boat or a projectile to go on land.  The easiest case to demonstrate is get a second ship, have it follow you.  Then get close to an island and spin a circle.  It will pass right through.  That's because I totally cheat the ships that follow you in formation.  You can also drive yourself into an island by bumping into the island and turning. 

I'm not doing a real rigid body simulation.  The ships don't have momentum and they don't impart angular momentum on each other so it's possible to turn into (and through) the thing you are colliding with. 

I started thinking about this because of the guy who commented about it being annoying that your boat stops when you bump into things.  This is really annoying when the two things are going in the same direction at similar speeds.  They should brush against each other and not stop each other because they touch.  But I don't have any real simulation of momentum in the game so its hard to have the ships collide accurately.  It's possible, it is just something I have to think about. 
Offline UprightPath
« Reply #24 - Posted 2013-02-19 06:57:04 »

The next few times I played, the crashing issue wasn't nearly so big of an issue. Of course, that was because I had a fleet and they just blasted through the enemies.

I did, however, run into a few more issue when I started to run missions.
Some weapons impact against your fleet while others do not: Guns and Torpedoes pose a great hazard to your own fleet, with your own ships typically dealing much damage to you than to your enemies (I know that I was shot to death by torpedoes on my own ships when I ran straight into an enemy). Mines though do not pose a danger if they come from your own ships, which makes them almost game breaking since you can lay out a ton prior to an encounter and make your opponents follow you through them.
Enemy ships (Red fleet) stopped reacting to me in general (Enough so that I could just sit there and bombard them without taking any damage in return). Other fleets would still react correctly and fight (Green would turn hostile when attacked, blue was always hostile with more spawning when I had cargo).
Selecting missions will sometimes cause the game to just crash (I'll start running the game through the console so that I can see what happens).

Offline georgeecollins

Senior Newbie





« Reply #25 - Posted 2013-02-19 23:36:15 »

Thank you for playing this so much. 

There is certainly a problem with friendly fire.  Your AI controlled ships can accidentally hit you.  They do a ray trace to see if they will hit someone on their team near by but this can be inaccurate because they don't correctly anticipate their speed and your speed.  I don't think I can make them perfectly avoid friendly fire without making them perfect shots, which has its own problems.   But it could be much better.  When I have a ship with me I often use it as a freighter only (just cargo slots) or only with rear firing arc guns.  That can work pretty well with the lead ship firing forward and the trailing ship firing backward. 

Mines can be way too effective, particularly since the AI does nothing to avoid them.  Having the AI avoid them sometimes is pretty easy to add.  I also think I would like to add a 'torpedo net' component that would afford you protection against torpedoes and mines in the arc of the gun slot it takes (forward, backward, left or right).  That could be pretty effective for groups of ships since you could have the leading ship have a torpedo net in the front, etc.  There are many components I would like to add, including radar, radar guided guns, flight decks with airplanes, missiles, etc.  Each will have different balance and AI issues.  I was sort of hoping to show that I could do more than just guns with torpedoes and mines, but the balance is wonky for sure. 

I have seen a bug where the red fleet just stops shooting at you.  I am not sure what causes this-- it could be that somehow their AI is fixed on a dead enemy or something else.  You have to play a while to get that problem and you have my eternal gratitude for playing that much.  If you see this problem, or crash when you launch a mission, it is really helpful to know the mission you were launching when you crashed, and if you can remember, which missions you have done.  I am trying to track down the problems but that is a huge clue. 

Again, thank you so much for trying this.  It is so helpful to get feedback. 
Offline UprightPath
« Reply #26 - Posted 2013-02-20 02:13:20 »

I'll end up playing some more tomorrow (I need to work on some AI stuff myself, hah).

Typically, the red fleet not responding seems to happen not only when you've played for a while, but after you've started missions that cause them to spawn (Typically the Merchanter Fleet mission, at least in my experience). However, I did notice that the stationary protectors during the 'Take Red Port' mission do still target and attack. Further, when I did that one as well, there was a single ship that was slowly rotating in place, dropping mines as soon as it could.

The crashes tend to happen only the first time I attempt the mission (Like say if I've done it once already and restart, it's never crashed on a restart.)

With the AI shooting you, I think that the biggest issue there is two fold (And neither is really easy to fix):
Bullets travel relatively slow, at least compared to the speed of the ships themselves. A cannon shoots at upwards of 100m/s while a ship travels at around 13m/s (This is a guestimate based on knowledge and calculations. A lot depends on what type of ship yours are supposed to be). While it was somewhat easy to miss at ranges, when you were close, it was likely that your broad side would hit without the other side being able to avoid simply due to speed. I know that fast projectiles just aren't as aesthetically pleasing/fun to play against though (I know I hate it games when I'm hit by things I have no chance to avoid.)
The above is compounded by the 'cheat' used for the fleets. However, without rewriting all of that, I can't see that being fixed so easily.

Most of my suggestions on how to change the weapons would make them more difficult to play with (Or at least make fighting a bit more difficult). Somethings like making the rotational turrets fire in an arc instead of a straight line (By that, I mean that the bullets should arch up towards the viewer then back down, with only the last few ticks of the bullets being dangerous), which is targeted using the mouse. Some control on the facing of stationary turrets (Unless I missed that already being there) would probably be easier to implement and make those weapons more useful for fleet ships.

Offline georgeecollins

Senior Newbie





« Reply #27 - Posted 2013-02-20 04:12:34 »

The bullets are very slow compared to the ships (at least vs. reality) so that your ship can sometimes 'dodge' a bullet.  I think that is fun, but it makes AI predicting if a bullet will hit very difficult since you have time to change course while the bullet is flying.  Fixed guns have faster shots then turrets. 

I was thinking about having following ships have their guns just be programmed to fire where you fire only.  Then they would just be an extension of your ship and always do what you would expect.  That would be the simplest I think.  That's the way the following ships drive.  Originally I had them use AI to follow (like the way the escorts stay with freighters) but the AI could never keep up because humans are just better drivers.  So I just stick them behind you by physics fiat.  I could have them shoot wherever you shoot too. 

It isn't hard to make the AI ships more effective, I actually tuned them down to make the game more accessible.  My son ( eight ) said it was too hard.  The trick is that it starts easy but I don't bring the AI up much and probably should. 
Offline UprightPath
« Reply #28 - Posted 2013-02-20 05:35:35 »

Yay, for even more beta testing/bugs, because it's a fun game.

In several of the game I've played (Perhaps all), near the middle of the map there is an 'invisible' mine layer, which just continuously drops mines into a single place. I say invisible, but it's not even really there. Can't shoot, can't do anything to the spot. Further, on the map in/around that area are several objects/things (I don't know what) that appear there that are not showing up in the actual game.

Ah, I think that a lot of ships don't keep up because many of them are just slower than the player's ship. I know I abuse that by loading down my other ships with guns and stuff, then my "flag" ship gets some mines and an extra engine to boost its speed. Then I get to drag all of these '900/400' weight ships around at a 28 speed.

As for how you can handle the fleet mechanics? My thought would be to allow the player to make a sort of "conglomeration" of ships, then allow them to decide which guns are allowed to fire within the conglomeration. So, you'd get to position the ships in your fleet in relation to your flag ship (So that you can actually use them to protect other ships), then select which guns would still be allowed to fire (Like indicate that the ones on this side are not allowed to fire. To make this less game breaking, something like lowering the speed of all other ships to the smallest in the formation would work (As well making the turn algorithm based on the max speeds of edge ships or something) and once a ship is damage past a certain point it goes into another AI that peals away and either tries to get back to a safe port or something.

Ah, I just had a crash while destroying an enemy ship. The results of the print out weren't too useful, hah.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
Find Start Point Failed
Find Start Point Failed
Find Start Point Failed
Exception in thread "main" java.lang.reflect.InvocationTargetException
        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 org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(Unknown So
urce)
Caused by: java.lang.NullPointerException
        at W.b(Unknown Source)
        at k.a(Unknown Source)
        at e.b(Unknown Source)
        at FourExample.a(Unknown Source)
        at FourExample.main(Unknown Source)
        ... 5 more

Press any key to continue . . .

Offline sproingie

JGO Kernel


Medals: 202



« Reply #29 - Posted 2013-02-20 05:59:15 »

Please use the code tag, not spoiler.
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (21 views)
2014-09-12 09:08:26

Norakomi (55 views)
2014-09-10 13:57:51

TehJavaDev (66 views)
2014-09-10 06:39:09

Tekkerue (33 views)
2014-09-09 02:24:56

mitcheeb (54 views)
2014-09-08 06:06:29

BurntPizza (38 views)
2014-09-07 01:13:42

Longarmx (24 views)
2014-09-07 01:12:14

Longarmx (30 views)
2014-09-07 01:11:22

Longarmx (28 views)
2014-09-07 01:10:19

mitcheeb (36 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!