Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (549)
Games in Android Showcase (139)
games submitted by our members
Games in WIP (593)
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  Game Development / Newbie & Debugging Questions / Re: Issue with changing screen res in windows aero = black screen. on: 2015-01-08 12:54:34
Thanks for looking. Did you try clicking the bat file or the jar? The bat file normally gets round the black screen issue but just not for aero.
2  Game Development / Newbie & Debugging Questions / Re: Issue with changing screen res in windows aero = black screen. on: 2015-01-08 08:56:53
I asked one of my more knowledgeable users about the drivers on his PS and he replied:
Quote
I posted the bat file along with a link to the themeswitcher program I used in it in the thread. Feel free to use it or adjust as needed if you want to include a separate bat file for others with the problem.

It's not a graphics driver issue but something to do with the aero interface and how it introduces transparency etc. for the desktop since windows 7 no longer supports 8 bit settings under aero (also default lowest resolution is 800x600 unless you go into advanced settings and have it display all modes ) -- due to this somehow windows selects the wrong color palette when the game is launched resulting in a weird looking display ( like the photo I posted in the thread ) - Many older games experience the same problems and for many of them there are registry settings that can be done to reset which palette is used to fix it but since this game uses JAVA it does not have the registry keys or ID for compatibility to make that change like you can for an .exe ( see this thread for a discussion about the registry change for older games - http://www.neowin.net/forum/topic/927140-win7-fixing-old-256-color-games-with-distorted-palettes/ )

I've run into the problem on a couple other older games but they had updates released (not sure what the update did but it might be making the registry adjustments  :dunno ) - After reading a few articles on it I came across one for Wireshock that mentioned :

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
Modern PCs default to 32-bit true color graphics locally, but 256-color is
widely used to make remote desktops quicker and less bandwidth hungry. Hey,
even 16-color modes are used, and there's no reason Wireshark needs thousands
of colors even with colorized packet lists.

Note: If you want to test this with hardware and/or a Remote Desktop client
that doesn'
t let you set low color depth, save the .rdp file, open it in a text
editor and set "session bpp:i:8". Note also that on Windows 7 you don't want an
aero theme with 256 colors; choose something like the Windows Classic theme
instead.

So decided to try the Basic Theme and that fixed the problem - Not sure how else to fix it but this works and with the bat file it just slows the game launch by a few seconds so isn't a big deal here. ( Not sure if any other Java programmers might know of a fix other than switching the theme back and forth but you might check some of the JAVA forums. )

I'd like to say I fully understand the issue (or the answer) but I don't.

Mike

PS sorry for entering the centre quote as code but I can't see how to indent that part or change it's colour to make it clear it's a separate piece.
3  Game Development / Newbie & Debugging Questions / Re: How to instal Java 8 over 7 on: 2015-01-07 21:58:29
I must admit I think we have different definitions of the phrase "easy to use" Smiley
I was hoping to download a tool, click on my jar and magically get an exe I could give out.
I read your post a few times and I'll admit I'm not sure how to proceed.
Mike
4  Game Development / Newbie & Debugging Questions / Re: Issue with changing screen res in windows aero = black screen. on: 2015-01-07 21:55:42
So people need to have the latest drivers to achieve 640x480 resolution gaming? Huh
Mike
5  Game Development / Newbie & Debugging Questions / Issue with changing screen res in windows aero = black screen. on: 2015-01-07 10:14:49
I'm trying to release a new version of my game and I'm getting a few issues. A knowledgeable user emailed me to say

"The new version will not work under Windows 7 64 bit (not sure about 32 bit) with the Aero theme -- It distorts the 256 color palette or goes to a black screen. Found a way to get around it by changing the Desktop Theme to windows Basic (which turns off Aero and it's effects)"

Can I get round this in code as it seems a bit much to expect users to have to do this?

I have a bat file that runs the program using

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

and this seemed to fix things for me but obviously not for him.

Game is here if it helps.

Cheers Mike
6  Game Development / Newbie & Debugging Questions / Re: How to instal Java 8 over 7 on: 2015-01-06 21:00:49
@gouessej

I'm quite willing to give it a try.
Is your tool easy to use (for a novice)?
My OS is Win7.
I have a standard jar. There's no file access etc. My jar runs fine on Java7 (I assume it would run on 8 but I'm guessing here).
The app gets called with "java -jar -Dsun.java2d.noddraw=true AlienSwarm.jar" which fixes a problem with some drivers not working at 640x480 res.

I d have Ubuntu running on a laptop but the game won't run in full screen mode on my laptop for some annoying reason plus the sound never seems to work properly in Linux.

Mike

"Java - write once, run anywhere" - Yeh, right...   Roll Eyes
7  Game Development / Newbie & Debugging Questions / Re: How to instal Java 8 over 7 on: 2015-01-06 13:13:39
You didn't get what OP is asking. He is asking how he can install Java 8 over Java 7, he wants to upgrade not downgrade.
Actually I just want people to be able to play the game with as few problems as possible. I don't care too much how I do it. This is what I've tried so far:

  • I initially started with applets but they became unfashionable and people said web start was the way forward.
  • I genuinely thought web start was the bees knees as it installed on user PC's, I could still release updates and I could set java versions etc, etc. Then they changed the licensing/security thing and it effectively meant I couldn't use it.
  • I then tried as a java application but users genuinely just wanted an exe.
  • I could only create the exe's with help and obviously it will only run on PC's doing this.
  • I'm now trying the jar application approach again but I'm getting issues with users having different versions of java.

I really just want people to be able to click the game and be able to run it without issues.

Mike

"Java - write once, run anywhere" - Yeh, right...  Roll Eyes
8  Game Development / Newbie & Debugging Questions / How to instal Java 8 over 7 on: 2015-01-06 09:06:17
I recently released a new version of a game I was writing and someone replied that it won't run with his Java 8.

I tried installing the latest JDK on my Win 7 PC. It said it loaded fine. I then tried to see whether it was running fine with
1  
2  
3  
4  
java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

So am I running Java 8?
Will users with Java 7 now not be able to play?
Is there a simple solution?

Cheers Mike
9  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.
10  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
11  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.
12  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?
13  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
14  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?
15  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.
16  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
17  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
18  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?
19  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.
20  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.
21  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
22  Discussions / General Discussions / Re: Jar not working? on: 2014-03-16 12:38:19
I'll ask him and get back.
23  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!
24  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
25  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?
26  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
27  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.
28  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?
29  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!
30  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.
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.

Archive (21 views)
2015-01-29 04:26:08

theagentd (21 views)
2015-01-28 15:33:52

GamerIDGoesHere (29 views)
2015-01-27 01:23:23

GamerIDGoesHere (31 views)
2015-01-27 01:22:15

CopyableCougar4 (38 views)
2015-01-27 00:34:41

CopyableCougar4 (23 views)
2015-01-26 04:47:56

Olo (17 views)
2015-01-25 21:26:00

Olo (23 views)
2015-01-25 18:44:22

Robo11 (39 views)
2015-01-25 06:14:26

basil_ (33 views)
2015-01-17 22:29:32
2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26: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
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!