Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 5
1  Discussions / General Discussions / Re: Java & Linux Chromebook: problem running my application in fullscreen on: 2014-08-13 20:04:32
The exclusive fullscreen mode of AWT has been broken under GNU Linux for several years. Most of the time, depending on the window manager, I still get the task bar above the fullscreen window.

How does it fail? Please can you give us more details?
It wouldn't bother me too much having a small task bar - it's obviously not perfect but it's better than the little 640 x 480 window I'm getting at the moment. I should of said what's currently happening shouldn't I Roll Eyes

oh, you are using Graphics2D ?
I'm just using
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
for( DisplayMode dm : device.getDisplayModes() ) {
           
            if (   dm.getWidth() >= ScreenWidth
               && dm.getHeight() >= ScreenHeight
               && dm.getBitDepth() >= 16
               && dm.getRefreshRate() >= 60 ) {

               try {
                  if ( device.isFullScreenSupported() ) {
                     device.setFullScreenWindow(f);
                     if ( device.isDisplayChangeSupported() ) {
                        device.setDisplayMode( dm );
                        break;
                     }
                  }
               } catch ( Exception e ) {
                  device.setDisplayMode(OldDisplayMode);
                  device.setFullScreenWindow(null);
               }
            }
         }

 

to get the full screen which works on most windows screens but then I usually also call the jar with the following which tends to make it work for nearly all the windows screens I've tried (even my own 24" wide screen). It doesn't seem to have any effect on Linux.
1  
java -jar -Dsun.java2d.noddraw=true AlienSwarm.jar

I use double buffering and paint, drawImage etc to build the screens.
2  Discussions / General Discussions / Java & Linux Chromebook: problem running my application in fullscreen on: 2014-08-13 17:19:58
I have my Java game I wanted to put on my chromebook. It works at 640 x 480 resolution and then adjusts the screen mode using device.getDisplayModes(). This works fine on most monitors but for some reason fails on my chromebook. The above method tells me it does have that resolution.

Any idea what I have to do?
Mike
3  Discussions / General Discussions / Re: Fewer end users? on: 2014-03-28 10:20:16
So do I get a nice concise argument for why they shouldn't remove Java from their systems for when moderators on that site suggest they do? Preferably in a way that Joe public (and I) can understand. Or should I just accept that the only way I can release software is as an exe and expect Joe public to download a new runtime for each install.
4  Discussions / General Discussions / Re: Fewer end users? on: 2014-03-27 13:37:50
Ended up just going Steam-only for simplicity's sake.
Is there a guide on how to do this. How much efforts required? You mentioned C++ before. What restrictions are in place? is there a sort of Steam emulator?
5  Discussions / General Discussions / Re: Fewer end users? on: 2014-03-27 12:58:27
Or even more to the point...why care about what people think?
tell that to Betamax
6  Discussions / General Discussions / Re: Fewer end users? on: 2014-03-27 12:19:18
We've been down that road before, having 100mb downloads is not a problem that needs solving in this day and age of high bandwidth.
Perhaps. I know if I saw a download for a little game that was 100MB then I'd probably move on. I guess we're all different. I know for my server I have to pay for bandwidth (I believe 20GB a month) which would mean at max I could only every have 200 downloads a month and that's not taking into account general usage of the site. I wonder what the cost of running this site might be if the average download here became 100MB?
7  Discussions / General Discussions / Re: Fewer end users? on: 2014-03-27 12:00:07
Perhaps we should have a little tutorial on how to bundle things as an exe. I've posted on here asking how to do this but I'll admit I find the various tools a bit (actually very) confusing. I guess it would be too much to expect the java compiler to optionally produce an exe for various OS. I assume this would be way more compact than producing 100MB downloads that play noughts and crosses.
8  Discussions / General Discussions / Fewer end users? on: 2014-03-26 20:54:08
I'm an advisor on a PC forum and I've noticed a strong dislike of Java these days. Here's an example from one of today's threads:
"I still strongly feel most people would be better off without Java and, if they have software that depends on Java, replace it with software that doesn't require it. It may require buying some of the software needed and/or learning how to use new software (granted, that can be daunting) but that is better than leaving one's computer vulnerable to attack. "
Is anything being done to reverse this general opinion? I know Java 8 has Lamda expressions but perhaps 8.1 might have something that will encourage users to trust Java again.

PS I advise on PC builds and not on Java
9  Discussions / General Discussions / Re: JDK 8 is released on: 2014-03-20 16:49:25
That's all well and good but if you've already spent time creating the damn things then you want them to continue working. What you don't want is the language to suddenly change and make all your stuff either obsolete or so difficult to run that any rational end user would simply give up. I also don't want to have to rewrite my code just so they can continue working with whatever flash in the pan technology is introduced with each time. I believe most languages, including Java, try to ensure that, once you write a program, it will stay working in future versions. That's not the case here.

Webstart suited me great because a user could run an application from the web and/or install it on his desktop with a nice icon. Additionally, I could offer updates and these would be passed out to users meaning I don't have to worry about umpteen different versions of the program being active at the same time. The user didn't need a degree in IT to run them either. As a final benefit I didn't have to send out anything from my server unless there was an software update so I had less bandwidth issues.

I could embrace ASM.js or Emscripten (whatever they are) but who's to say they won't be just as obsolete in a years time. I simply want some stability. If I had a set of features that worked well (webstart) then I don't want all that capability to just disappear over night. It took me quite a while to embrace webstart because I wanted to make sure I wouldn't have the rug pulled from underneath me. I guess I didn't wait long enough  Sad

Perhaps in a few years I might understand what lamda expressions are or I might even find some rational use for them. For the moment you'll have to forgive me that I'm not jumping up and down for joy with the latest Java version  Undecided
10  Discussions / General Discussions / Re: JDK 8 is released on: 2014-03-20 12:30:21
If you need some help to get rid of those warnings, let me know. I agree with you but I'll probably have to buy a "trusted" certificate Sad
I tried to PM you but you don't seem to have that facility. What is possible regarding all the warnings? Should I start another thread?
11  Discussions / General Discussions / Re: JDK 8 is released on: 2014-03-19 20:28:06
That can never happen. The whole concept of trusting arbitrary code to run without asking permission (as it does when you just happen across it on a web page for example) is about the worst idea ever conceived.
But if it's running within the sandbox then does it matter?

If I download an exe of the web and run it (after virus scanning etc) then I get fewer warnings then when I try to run a sandboxed Java app ... go figure.

EDIT: I'm fine with it asking permission but surely if you click the webstart icon then doesn't that kind of imply you want to run the program. What I object to is all the warnings that show up.
12  Discussions / General Discussions / Re: JDK 8 is released on: 2014-03-19 20:03:20
I used to release little games as applets and I thought Java was great. I then turned to webstart where people could run your stuff from their desktop. I thought Java was great. Then they released 7.21 which made applets and webstart programs show up with huge security warning popups. These programs stayed entirely within the sandbox but Java doesn't seem to trust itself. I could pay for a certificate (and that's assuming they'll give me one) but I just look upon it as extortion.

It's nice to see that they're doing another release but personally I'd put "having programs run without loads of warning popups" higher on the priority list than whatever "lamda expressions" are.
13  Discussions / General Discussions / Re: Jar not working? on: 2014-03-19 19:40:32
He mentioned that he'd updated his OS (on apple) and it must have upset Java. He then uninstalled Java and re-installed and things worked again. I'm not sure why this would of happened but at least I have an answer if anyone else has the same issue. Thanks for helping.
Mike
14  Discussions / General Discussions / Re: Jar not working? on: 2014-03-16 12:38:19
I'll ask him and get back.
15  Discussions / General Discussions / Re: Jar not working? on: 2014-03-16 11:55:06
I'm confused then. My (not so IT literate) apple friend sent me the following error and said it just wouldn't run on apple.



Mike

PS - I'd just like to say thanks to you all for replying so fast - I'd didn't expect any responses for a few days!
16  Discussions / General Discussions / Re: Jar not working? on: 2014-03-16 11:27:13
Thanks for confirming it works on Windows guys - I was beginning to wonder if it only worked for me.
Did you try the connect 4? (you don't have to play it but just say if it starts up).
Can anyone say if the chess works on apple?
Is there a better way of releasing the programs? downloadable jars seem a bit naff to me.

Mike
17  Discussions / General Discussions / Jar not working? on: 2014-03-16 10:30:11
I had a bunch of applets I wrote that played various games, I turned them into webstart apps because that seemed the way forward. Then the Java security model changed and none of that worked. I now just provide a link to the jar and let people save the jar locally and then run it from there. Unfortunately it's difficult to really test what happens on other peoples machines.

A friend has a apple computer and tells me he's enabled Java and lowered the security but can't get my chess program to work. Any body know why? or what I can do to fix this? Is releasing things as a jar the best way forwards for me? it's such a pain having to get people to download jars when the original code worked perfectly in their browser. It's also a pain because now I have no idea what version of the code people are running - with webstart I could ensure that everyone had the same bug fixes etc.

Many thanks

Mike

PS can anyone confirm that my little connect 4 program works? on apple or linux or PC?
18  Games Center / Showcase / Re: Asteroids on: 2014-03-03 12:09:21
In a full screen game I wrote I found it would run fine on some PC's and just get a black screen on others.
I found running the jar with the option "-Dsun.java2d.noddraw=true" worked for me.

java -jar -Dsun.java2d.noddraw=true asteroids.jar

I'm afraid I haven't tried your game yet though.

Mike
19  Discussions / General Discussions / Re: full screen with changed resolution on: 2014-01-28 20:30:50
I just tried running at 800x600 but I still get a black screen. I can still hear the game playing (as I could at 640x480) but I just can't see anything. There are no errors or warnings on the console but looking through that article suggests that the issue is with the direct draw somehow and that it needs disabling. It works fine if I pass the -Dsun.java2d.noddraw=true directive but my problem is I can't pass this into netbeans for native compilation (or at least I can't work out how to). I found an equivalent command at the jave level System.getProperties().put("sun.java2d.noddraw", "true"); but that doesn't seem to fix anything like the command line directive.

I don't suppose anyone knows if you can tell netbeans to include the above directive when building an exe? I have tried all my standard methods when dealing with Java of screaming at the screen, trying random chunks of code of the web, sacrificing chickens etc etc but nothing seems to help.
20  Discussions / General Discussions / full screen with changed resolution on: 2014-01-28 09:14:19
I have a Java application that sets full screen mode and alters the resolution to 640 by 480. It works fine if I run the app with the following :
Quote
java -jar -Dsun.java2d.noddraw=true AlienSwarm.jar FULLSCREEN

My issue is the part I've highlighted in red. If I leave this bit out then the game "plays" but I just see a black screen. I'm currently trying to convert the program into an exe using netbeans and it unfortunately doesn't seem to allow such options. Is there a relatively easy way of altering the resolution and yet still play in full screen mode?

I currently check all the modes that the device supports and select one that's close to what I need. I also hide the cursor. I then use double buffering for running the display. I don't think I do anything wierd and much of the code for this has been grabbed from sites like this. Any ideas?
21  Discussions / General Discussions / Re: Anyone ever done creating a new binary file format for your own special uses? on: 2014-01-28 08:28:58
I also coded an IFFL packer/reader in 6502 assembler, but that's like a long, long time ago Smiley
Ny first programming "language" was 6502 machine code on an acorn system 1. You had to convert your code into long lists of hex numbers and then enter them all painstakingly by hand, writing even a 1K program was very hard work. Oddly enough I still look back on that computer fondly. My next computer had an assembler built in which made life considerably easier. Would I ever go back to entering long lists of hex numbers to program? you must be crazy!
22  Discussions / General Discussions / Re: What's the best way to define types of objects that gets often reused? on: 2014-01-23 21:46:34
Why not just do it all in data? ie your class handles how the different effects (damage, element type etc) are used but the data structure holds the data for any given spell. This way, to create a new spell, all you'd have to do is add data. If you can produce a formula for how powerful a spell is then your system could create new spells by it self and litter them around your game so you can use them. I'm pretty sure that something like Borderlands 2 doesn't have a bazillion different classes to match it's bazillion different types of gun - they'd just do it all in data or more likely a single number that's used as a seed to generate a repeatable list of random numbers that can then be used to produce the effects of a given weapon.
23  Discussions / General Discussions / Re: suggestions on using keytool with selfsign on: 2014-01-23 21:34:35
Err, so what do I do?
I read in a recent post that Oracle (?) wanted £100/year for a public key but I don't think I can stretch to that.
I've been playing with netbeans and noticed that has an option to create an exe installer. Would this be better solution?
24  Discussions / General Discussions / suggestions on using keytool with selfsign on: 2014-01-23 21:02:51
My self sign key expired a while back and now the apps don't work - does anyone know how to use keytool or can link me to a (very) simple explanation.
I'd read that this self sign thing will also be dying out - what should I do?
I also get lots of warnings when running webstart apps - is there a way I can reduce this to no warnings (perhaps force an app to stay in the sandbox)?
I'm getting problems in both my checkers program and my chess program.
Any suggestions welcome...

25  Discussions / General Discussions / Re: Launch4J on: 2013-12-12 21:06:28
Oh bugger - I haven't released the latest version of the game for a month or two.
Shall I PM the jar or wait for the instructions?
Mike

PS I PM'ed the jar anyway


26  Discussions / General Discussions / Re: Launch4J on: 2013-12-12 18:30:10
That's well above the normal call of duty but I'm certainly not going to stop you Smiley

I don't need an installer, just an exe is fine.
I'll release it with a few batch files that call the exe with different parameters depending on whether they're installing the program in a cabinet or just via PC.
I just have a single directory and everything is stuffed into it at present. Does that count as a directory structure?
I know it's not a pretty way of doing things but everything was hidden in the jar so I didn't spend the time to set up the directories.

Mike

My current xml file looks like this if that helps:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
<launch4jConfig>
  <dontWrapJar>false</dontWrapJar>
  <headerType>gui</headerType>
  <jar>E:\Dropbox\Projects\AlienSwarm\AlienSwarm.jar</jar>
  <outfile>E:\Dropbox\Projects\AlienSwarm\AlienSwarm.exe</outfile>
  <errTitle></errTitle>
  <cmdLine>-Dsun.java2d.noddraw=true</cmdLine>
  <chdir>.</chdir>
  <priority>high</priority>
  <downloadUrl>http://java.com/download</downloadUrl>
  <supportUrl></supportUrl>
  <stayAlive>false</stayAlive>
  <manifest></manifest>
  <icon>E:\Dropbox\Projects\AlienSwarm\AlienSwarm.ico</icon>
  <jre>
    <path>./jre7/bin/</path>
    <bundledJre64Bit>false</bundledJre64Bit>
    <minVersion></minVersion>
    <maxVersion></maxVersion>
    <jdkPreference>preferJre</jdkPreference>
  </jre>
</launch4jConfig>

27  Discussions / General Discussions / Re: Launch4J on: 2013-12-12 14:13:24
It's taken me about a month to realise that I can't get launch4J to work.
I'm guessing it will take me another month of perpetual trial, error and failure to play with NSIS and Inno.
It's a bit depressing  Cry
It's a shame that launch4J can't just do this - I thought the whole point of the tool was to produce an executable exe.
28  Discussions / General Discussions / Re: Launch4J on: 2013-12-11 15:56:47
Thanks for replying so soon!

There's no foolishness in asking for assistance in figuring something out. Cool
No, but if someone just can't understand the answers then I'd start to have my suspicions  Wink

The first step is getting the JRE onto the users computer. For this, you'll need to download a tool suck as NSIS or Inno Setup. Both of these packages are free and allow you to create Windows installers; Inno Setup is the tool that NetBeans, as mentioned by Tom, uses to create its installers. This will allow you to bundle up your executable and supporting files created by Launch4J along with a standalone JRE and any other related files into one executable that your users will download and run in order to get all the needed components onto their PC.
I thought the idea was to bundle the java.exe along with your jar so it didn't need to install java? I don't know for certain but I'm pretty sure my target audience don't want Java on their PC's as the PC's -their PC's are running inside gaming cabinets with perhaps a few arcade controls for input - having a java popup telling them to get the latest security update would just destroy the whole illusion of having a dedicated arcade cabinet. I just want an exe the user can run.
29  Discussions / General Discussions / Re: Launch4J on: 2013-12-11 11:25:31
I'm afraid I don't use NetBeans etc.
If I went down that path then I'd just be back again with a new bunch of questions.
At least on this path I'm only stuck on one (hopefully small) thing.
30  Discussions / General Discussions / Re: Launch4J on: 2013-12-11 09:42:41
I hate coming back to this simply because it makes me feel like a fool Angry
I simply want my exe to run whether the user has Java, an old Java or no Java at all.
I assume I need to bundle the Java inside the exe.
There's a field on the JRE tab called "Bundled JRE path" but what do I enter?
Do I need to zip anything or place anything inside my jar or directory?
Do I need to specify a minimum version or anything?

Mike

PS I've been through the docs
Pages: [1] 2 3 ... 5
 

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

The first screenshot will be displayed as a thumbnail.

SHC (24 views)
2014-11-25 12:00:59

SHC (23 views)
2014-11-25 11:53:45

Norakomi (22 views)
2014-11-25 11:26:43

Gibbo3771 (22 views)
2014-11-24 19:59:16

trollwarrior1 (36 views)
2014-11-22 12:13:56

xFryIx (74 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (41 views)
2014-11-12 21:09:33

kovacsa (68 views)
2014-11-07 19:57:14
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!