Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (541)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
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] 3 4
  ignore  |  Print  
  Conquer - LWJGL Turnbased Strategy  (Read 20263 times)
0 Members and 1 Guest are viewing this topic.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #30 - Posted 2005-05-23 22:05:59 »

Quote
Yeah, it is evil, but necessary.  Until Sun fixes the bug themselves, I simply have to deal with it.  That IS the only way to solve the problem as Webstart is currently too stupid to ever refresh the .jnlp file on its own.


FYI off the top of my head, this isn't actually true; but...fixing it requires you to run a custom server, or a J2EE server into which you can embed the JNLPServlet, because you need to switch webstart into it's "preferred" codepath: the "versioned download protocol" (the default for ordinary webservers is called something else, e.g. "timestamp download protocol"). There's a clear sense that Sun wants you to only use the versioned download protocol, even though it's impossible on ordinary HTTP servers, since it requires you to inspect the incoming request and dynamically serve different data.

This, incidentally, is part of why JGF runs a proprietary web server: so that it can be easily upgraded to the versioned protocol in the near future. The versioned protocol fixes a fair few bugs in Sun's default/ordinary download protocol...certinaly, the code would have been a lot easier to write.

malloc will be first against the wall when the revolution comes...
Offline Malohkan

Senior Devvie




while (true) System.out.println("WOO!!!!");


« Reply #31 - Posted 2005-05-27 16:08:33 »

Warren, I THINK I fixed that crash you got Smiley

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline sma

Junior Devvie





« Reply #32 - Posted 2005-05-29 06:38:35 »

Quote
@sma:  I thought I recreated that less than 2 months ago... weird.  I don't even know how to see how old it is Smiley  I'll redo it again I guess.  As for the other certificate types you mentioned... I don't know of them.  If they cost money, I don't think I'll go for it any time soon Smiley  I'm a broke college kid who has enough trouble getting gas money.


I tried you game again, and it's still the same invalid certificate Smiley

To check certificates, there're at least two ways. If you get the Webstart security warning dialog, click on "Details."  An ugly (it seems the Java Webstart team is unable to create anything but ugly dialogs with bad usability) dialog with certificate details opens. It shows a number of fields from the certificate.

But let me first try to explain how an X509 certificate based public key infrastructure (PKI) is supposed to work.

RSA or DSA based cryptography can be used to sign data, assuring both that nobody tampered with the data and that the data is indeed from the person who said so.

You have a pair of keys (very long numbers) which are used to encrypt or decrypt data. One key must be kept private, the other can be published. Data encrypted with the private key can only be decrypted with the matching public key (I won't go into details why this is so). This way, assuming that the private key was really kept private, I can take your public key and verify that the data you said you encrypted were really encrypted by you - nobody else could have done it without the matching private key.

So to sign something, you compute a cryptographic hash (MD5 or SHA1 are two well known algorithms) and encrypt that hash value. This is called signing. The encrypted hash value is the signature. The cryptographic hash has two important features: changing a single byte will result in a diffferent hash value and you cannot recreate the data just from the hash value.

Now, to verify the signature, I need to hash the data myself (using the same algorithm of course), decrypt your encrypted hash value and compare both values. Is is called signature verification.

I need your public key for that and this is where certificates come into play. A certificate is a (trusted) statement that a certain public key is from a certain person.

That person is the so called "subject" of the certificate. The certiciate stores a so called X500 name, which is that funny looking C=US, ST=North Carolina, L=Greensboro string, something that predates the idea of an URL. It says that you're from the US, state NC, town Greensboro and so on. That X500 name is supposed to identify you.

But anybody could have created that certificate, just taking a public key and adding that X500 name.

Therefore, certificates are always issued by a trusted authority. Some other person I need to trust. That "issuer" says by signing the whole certificate that the subject data is correct. Signing a certificate works exactly like signing any other data and as you might guess, this is a recursive thing.

To verify the signature of the certificate, I need the certificate of the issuer. And I need to trust that certificate. Therefore, one talks about certificate chains which establish trust from a really trusted certificate authority (also called CA) to your certificate.

Most webstart applications (unfortunately) use self-signed certificates where the guy who created the certificate simply says "trust me". That's of course of no real value and computely bogus if it comes to real security.  I could recreate your self-signed certificate to the byte. Anybody could.

Better let a trusted authority sign your certificate. Unfortuntely, these authorities normally take money for that service Smiley

If a CA signs a certificate, it assigns a serial number (which can be used to revoke a certificate later on - for example if the private key leaked into the public) and a validity. A certificate is only valid for so many months.

You should be able to see all that information in the details dialog of Webstart. Your certificate expired "Sat Dec 18 22:55:12 CET 2004"

I said that there's a second way to look into certificates. Windows comes with a nice viewer that opens automatically if you double click on a "*.cer" file. You can export those files from a Java keystore.  Unix fans can use the mighty openssl tool to print certificate details.

But I talked more about certificates I ever wanted and add a few comments to the game in my next posting.

Stefan

.: Truth Until Paradox!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline sma

Junior Devvie





« Reply #33 - Posted 2005-05-29 06:57:52 »

I hope I'm looking at the latest version. I flushed my webstart cache but I still see this early-eighties-computer font everywhere. Update: Oh you said that you didn't change the font, okay.

That flickering focus moves from "Add human player" to "Type" when I type the first letter. Why?

I think, I'd really prefer if the setup screen is not over the starmap when I try to randomize the stars so that the game looks interesting. I'd also like to suggest to distribute the players better so that there's a certain distance. The space right to the starmap should be enough to put the controls there.  Or do it like the original and display a tiny minimap.

Rearding your subwindow title bars. Your windows use a white font on a black background. So does your title bar and your menu bar. Therefore it's difficult to distinguish. Typically, the window that has the input focus has an emphasis. This isn't the case with your window system. Font size (yes the menu font is slightly larger - which makes the menu more important as it should be) doesn't really help me. Do you develop on a very bright TFT? It seems that there're dark gray borders around the red labeled buttons but I can barely seem them and overlooked them completely before.

Regarding help: Providing help windows is good, but even better is if you make the UI so that you don't need to provide help.  Something like "don't comment bad code, rewrite it" Smiley

I just read the help on the Grid Bord and zoomed into the starmap. Something I though where leftovers from misaligned graphics operations (sorry) are actually tiny ships. I've a 1600x1200 display and played the game in a window - that might explain that I overlooked that before.

Regarding counting: Don't make me count. I don't want to infer information that a computer could present me directly. That's what I'd call ease of use.

Stefan

.: Truth Until Paradox!
Offline Malohkan

Senior Devvie




while (true) System.out.println("WOO!!!!");


« Reply #34 - Posted 2005-05-29 17:47:01 »

Quote
I hope I'm looking at the latest version. I flushed my webstart cache but I still see this early-eighties-computer font everywhere. Update: Oh you said that you didn't change the font, okay.

Some people like it, some don't Wink  I'll notify my artist we have another vote against the Font hehe.

Quote

That flickering focus moves from "Add human player" to "Type" when I type the first letter. Why?

This was an attempt to keep people from missing it and playing a game without any human players (just the two default AI players) and being upset that they lose so quickly without playing... having never added themselves to the Player list.  I suppose the pop-up warning when starting a game without Humans is enough now... I'll remove the flashy stuff and see how that goes.

BTW the flash moves from one field to the next as if to say, "good, you got that box, now make sure you don't forget to do this one either."  Any ideas on how to make that more intuitive?  Just let the user figure it out?

Quote

I think, I'd really prefer if the setup screen is not over the starmap when I try to randomize the stars so that the game looks interesting. I'd also like to suggest to distribute the players better so that there's a certain distance. The space right to the starmap should be enough to put the controls there.  Or do it like the original and display a tiny minimap.

Since the Randomize button is on the far left of that window, you can simply drag the window to the right a bit, and voila, it's completely out of the way and you can still tweak all the planets how you want Smiley  I'll see about adding a mini-map in addition to this anyway.

Quote

Rearding your subwindow title bars. Your windows use a white font on a black background. So does your title bar and your menu bar. Therefore it's difficult to distinguish. Typically, the window that has the input focus has an emphasis. This isn't the case with your window system. Font size (yes the menu font is slightly larger - which makes the menu more important as it should be) doesn't really help me. Do you develop on a very bright TFT? It seems that there're dark gray borders around the red labeled buttons but I can barely seem them and overlooked them completely before.

The red labelled "Menu" button is equivalent to the Windows "start" button.  The following blocks are each of the Frames that are active.  You say the borders are too hard to see... but on Windows as I see it... maybe it's just my theme, I have NO borders to those boxes, so I don't think it matters if you can't see them.

The window that has input focus has it's corresponding box at the top highlighted yellow.  It's the "New Ga..." that you see on the 800x600 resolution.  I'm sorry I still don't understand what's wrong with this setup.

Quote

Regarding help: Providing help windows is good, but even better is if you make the UI so that you don't need to provide help.  Something like "don't comment bad code, rewrite it" Smiley

I'll do my best to keep working with that in mind Smiley

Quote

I just read the help on the Grid Bord and zoomed into the starmap. Something I though where leftovers from misaligned graphics operations (sorry) are actually tiny ships. I've a 1600x1200 display and played the game in a window - that might explain that I overlooked that before.

Yup they're there.  If your window is too small to see things, zoom in or change your resolution.  Perhaps if that's really an issue you can give me a suggestion to make it better?

Quote

Regarding counting: Don't make me count. I don't want to infer information that a computer could present me directly. That's what I'd call ease of use.

Counting?  I'm not sure what you're referring to.

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline Malohkan

Senior Devvie




while (true) System.out.println("WOO!!!!");


« Reply #35 - Posted 2005-05-29 17:51:56 »

ahh and about the certificate.  I'll renew that soon Smiley  I don't really see a great need for having to pay for a "special" certificate when the truth is, ANY software you download and run outside of Webstart automatically assumes full permissions.  Why do I have to do extra work to convince people I'm safe when just downloading and running software and never seeing any "certificate" is already the norm?

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline Malohkan

Senior Devvie




while (true) System.out.println("WOO!!!!");


« Reply #36 - Posted 2005-06-10 06:45:20 »

Conquer now saves the following:
  • Options settings
  • Player list
  • Map size
  • Planet number

I also added a mini-map to the Planet Setup screen so you can more easily set up new games.

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #37 - Posted 2005-06-10 11:47:24 »

It used to work for me.  Now I get the following exception:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
java.lang.NoClassDefFoundError: com/sun/org/apache/bcel/internal/verifier/exc/InvalidMethodException
   at conquer.Conquer.<init>(Conquer.java:98)
   at conquer.LWJGLRunner.<init>(LWJGLRunner.java:98)
   at conquer.LWJGLRunner.main(LWJGLRunner.java:55)
   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.continueLaunch(Unknown Source)
   at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
   at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

I cleared the webstart cache and it still happens.

Offline Malohkan

Senior Devvie




while (true) System.out.println("WOO!!!!");


« Reply #38 - Posted 2005-06-10 15:40:05 »

very interesting!  I never would have forseen that.  Thanks!  The fixed version has been uploaded.

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #39 - Posted 2005-06-11 01:43:47 »

That could be your 16k entry.  It is somewhat addictive.  Simple and interesting.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Malohkan

Senior Devvie




while (true) System.out.println("WOO!!!!");


« Reply #40 - Posted 2005-06-11 06:44:32 »

yeah I'd have to strip it down like crazy though.  Don't know if I can handle that Wink  I'm a victim of feature creep.  I would never be satisfied submitting something with that limit.  Right now the jarred up class files amount to 200k.

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #41 - Posted 2005-06-11 07:28:45 »

Played this for the first time Smiley

I initially felt overwhelmed by all the windows and couldn't immediately figure what to do.  I found the help, but then kicked off a computer versus computer game as I hadn't added any Human players.  Started a new game, but didn't know what to put in the 'Type' box when adding a new player.  The Help system rescued me, although I note that the box says 'Add Human Player', but is also used for adding computer players.

Having successfully started a new game, everything dropped into place & I had an enjoyable game, where I started off well, but then over depleted my starting bases, allowing the computer to make a comeback.

Overall, the basic game reminds me a bit of the board & cardboard ship game 'Starfire' by Task Force Games (now out of print)which I played a lot in my Uni days.  I believe it got turned into an online version at some point.  It was a good game, but took hours & hours to play with the 'Empires' rules (where you captured planets as per your game), so games seldom completed.

Ships came in several hull sizes & you could fit in your choice of engines, cargo bays, armour, shields & various weapons, as your cash & hull size permitted.  In practice there were two basic strategies.  You either built lots of cheap small light ships with one weapon, or a few expensive heavy armoured ships with multiple weapons.  If you attacked a heavily armoured ship with lots of light-weight ships, then the heavy ship could cut down a few lightweight ships every turn, but couldn't kill them all at once.  In the meantime the combined firepower of the remaining ships would wear down the heavy ships shields.

Overall I loved your game.

*Wonders where he put the Starfire games*

Time flies like a bird. Fruit flies like a banana.
Offline Malohkan

Senior Devvie




while (true) System.out.println("WOO!!!!");


« Reply #42 - Posted 2005-06-11 18:52:30 »

Thanks for your response!  I'll fix that but with the name of the text field Smiley  I'm glad it went well for you.  I hope to add more features in the future to make the game more interesting without making it overly complicated.  We'll see how that goes Smiley

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #43 - Posted 2005-06-14 19:05:54 »

Every time I try to start up a game of Conquer after I have played it exited, then try to play again a day or 2 later, I get this exception:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
java.lang.NumberFormatException: For input string: "-8453889<PLAYERS.DUMBAIPLAYER>name=Comp 1<PLAYERS.DUMBAIPLAYER>"
   at java.lang.NumberFormatException.forInputString(Unknown Source)
   at java.lang.Integer.parseInt(Unknown Source)
   at java.lang.Integer.valueOf(Unknown Source)
   at com.gamelizard.util.DBConnection.SaveMap.getInt(SaveMap.java:87)
   at conquer.players.Player.createSavedObject(Player.java:244)
   at conquer.MuffinManager.loadMuffin(MuffinManager.java:70)
   at conquer.MuffinManager.<init>(MuffinManager.java:34)
   at conquer.LWJGLRunner.<init>(LWJGLRunner.java:84)
   at conquer.LWJGLRunner.main(LWJGLRunner.java:55)
   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.continueLaunch(Unknown Source)
   at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
   at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

I have to remove it and then re-download it every time.

Offline Warren_Head

Senior Newbie




Java games rock!


« Reply #44 - Posted 2005-06-15 14:00:22 »

Finally remembered my password again, sigh..

Looking good now, you fixed the error I got  Wink and nice end game info screen.
If you could add/change the add human player thingy you've got a syntactically sound game to my liking.
(just set 'human' and a team name into the gui by default and show an 'Are you sure you want no human players?' window when the player wants to start ... or something)


The idea is simple, but its very hard to beat the cpu, although I've noticed that they ALWAYS go for your nearest planet first, thereby allowing you to replenish that one with ships from the planets further back. But I still suck at it  Tongue
Offline Malohkan

Senior Devvie




while (true) System.out.println("WOO!!!!");


« Reply #45 - Posted 2005-06-15 16:41:09 »

@CaptainJester:  should be fixed now, thank you!

@Warren_Head:  I changed the text to "Add Player" now.

I'm currently adding some keyboard support so you should be able to do all the functionality you use now with the keyboard.  I'm thinking perhaps if you have so many Planets that they go into the double digits, pressing a letter will just cycle through all of the planets whose names start with that letter.  For most games you'll have instant, [letter] [letter] [action] for each move.  For larger games, you'll have to cycle just a bit.  We'll see how it goes! Smiley

I'm also pondering a dumber AI to help those first learning.  Most of my friends still need some tactical advice when first learning.  For me playing the original, I had to get my butt whooped a few times to realize how I needed to strategize Wink  Still I think a dumber AI could be helpful.  I'll work on that too!

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline Malohkan

Senior Devvie




while (true) System.out.println("WOO!!!!");


« Reply #46 - Posted 2005-06-15 18:30:38 »

Warren, I just added your suggestion for the defaults in the text fields.  I hope that helps new players get started Smiley  I also added key support.  Click on the Grid Board to give it key focus, then press the first letter of the desired planet you would normally click on, and if it's the wrong one, click Tab or Shift+Tab to cycle through other possible planets that start with the same letter until you get the one you want.  Once you've selected a source and destination, typing the number in (backspacing if you need to) should work like normal.  Enter submits, End does Submit All, and Space ends your turn.

Try it out and let me know how it's working!

Known limitations:  Selecting a planet doesn't show it in the InfoDisplay yet.  You can't send ships to your own planets yet.  I'll fix both of these soon, but go ahead and try it out and we'll see what else should be done with it.

Thanks!

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #47 - Posted 2005-06-15 18:42:03 »

Found a bug.  I made my settings 1024x768 fullscreen.  After I exited and cam e back another time, it restarted the game in a window.  The window was 800x600, but the game was still drawing for 1024x768.  Also the cursor would not go all the way to the top of the window, so I could not access any of the menus.  When the cursor got about 2 inches from the top, the native cursor would appear outside the game window, so it looks like your mouse coordinates didn't jive with actual coordinates.

The other problem is fixed now.

[EDIT]
I wiped the game and redownloaded, but it still did not erase some old settings, so it is still happening.

[2nd EDIT]
I tried a complete wipe of the cache, not just deleting conquer, and that removed the old settings.  Can play it now.

[Update]
It happens whether you are in windowed or fullscreen mode.

8: Undefined index: online
File: /home/jgo/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 161