Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


[java] DarkFighter JAVA scrolling paralax shooter source


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 David_Beoulve   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 September 2000 - 02:11 PM

DarkFighter (JAVA) Okay guys, this is a Sun-Java game I have been working on off and on since late last year. In it, you will find a complete working game including source code. The game has sound effects, though the music is too large to upload (WAV). DarkFighter allows you to control your ship with a mouse (the fighter will follow it). Enter or CTRL fires. Hold down for maximum cheese. The game attempts to judge how well you are doing, and increases or decreases the difficulty level accordingly. Being a shooter, it's ultimate goal is to kill you, but to make sure it's a challenge, rather than a slaughter. So far, it seems to play well. Friends keep trying to get a higher score, for some reason. You can download the game and source here (head to the PLAY section, relatively quick loading)... http://www.shila.com/DarkFighter/index.htm MY PROBLEM IS THIS: Currently DarkFighter (JAVA) only runs with Sun's Java Appletviewer, and will not run in Internet Explorer or Netscape. If I could compile the code in Microsoft J++, that should fix it, however, the game uses graphic code not found in J++ (actually, same concepts, different procedures). Can anyone help me fix this? To run the game, as the website says, you'll need Sun's Java Development Kit (posted as well). Any and all help and comments would be greatly appreciated! Disclaimer: Yep, it's all one source file, and it's not really parralax but a star field full of particles. DarkFighter I was a GWBASIC game, as was DF2. DF3 was QuickBasic and used vectors and blocks. Source and EXE lost. DF4 was also QBASIC, never finished because DF5 was created in C++, which was never finished due to a lack of sound. DFJAVA is the one you see here. It may crash, but JAVA shouldn't blow up your PC. ------------------------ How dull it is to pause, to make an end, To rust unburnished, not to shine in use! Edited by - David_Beoulve on 9/24/00 8:17:50 PM

Sponsor:

#2 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 September 2000 - 06:14 PM

This is an often asked question (to the FAQ jerry?)
but here goes,

Netscape and Internet Explorer only support java 1.1, so you have probably used some feature only part of of java 1.2 or java 1.3. For instance, you cannot use Swing components in browsers.

The general solution is:
1. To rewrite your application to Java 1.1
or
2. Require your user to download the Java 1.2/1.3 plug-in from SUN and use the free html-converters to turn your web-page into a format that supports the plug-ins. But,.. plug-ins are not portable so if you go for this solution then your program will only work on very few browsers.

If it only is a matter of missing classes you can pack those classes in your jar file on your web site. But be warned some of those classes are very big. The swing package used over 1MB of space. That is a *very* large appliet to download - I know that I would not wait for it.

Jacob Marner

#3 Jerry Lynn   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 September 2000 - 04:20 AM

I shall place it into the FAQ today : )

#4 Jim_Ross   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 September 2000 - 04:42 AM

Of course no browser is going to support it if you just use an applet tag. Run your html throught the applet tag converter. Ya know, some of us might actually have the Java Plugin (shocking, I know).

Also, why is that people feel the need to distribute their java programs in .exe files? It could be just me but i''m going to assume that they aren''t going to work under linux. Is there a general fear of .jar or .zip files in the Java developer community?

#5 David_Beoulve   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 September 2000 - 02:26 PM

Okay, yes, I have been informed about Swing code. Good notes all. It appears I''ll just have to sit down and fix the darn thing somehow.

Jim, they don''t teach us cool things in college. What is an applet tag converter? Or where?

At any rate, can anyone spot what''s going on in the code that is 1.2 specific? Anyone have any suggestions?

How dull it is to pause, to make an end,
To rust unburnished, not to shine in use!


#6 Hodglim   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 September 2000 - 04:27 AM

quote:
Original post by David_Beoulve

At any rate, can anyone spot what''s going on in the code that is 1.2 specific? Anyone have any suggestions?




Just took a quick look at the applet on your site and it fails to load with a complaint about missing the javax.swing.timer class.

If you are using Swing, then users will need the plug-in.



- Hodglim
Homepage

#7 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 September 2000 - 12:29 AM

The applet-tag converter is the same as the html-converter available from Sun''s site. It converts a html page with a normal applet tag to one that explicitly invokes the java plug-in.

And as said, the important difference between Java 1.1 and java 1.2 is the Swing classes. So if you can get rid of all the Swing references from your code it will most likely run. Also if you are using any standard extensions such as java2D - they are not available in browsers - you have to stick to the core API.

To see if you need to change more after that, just run it in a browser and it will give run-time errors or class-load errors if you use some feature not suppoted in 1.1.

My personal opinion is to avoid the plug-ins if you want most people to use it. Plug-ins only exist on a few platforms and I have had machines (I worked as an IT administrator once) that could not run them (don''t ask me why.)

Java 1.1 is only supported from IE 4 and netscape 4.5. If you want to support even older browser revert to Java 1.0 but I think most people has these browsers so I usually go for Java 1.1 - The AWT model is much better there anyway.

Jacob Marner

#8 DeVore   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 September 2000 - 01:42 AM

I have java 1.3 but your game doesnt run because it wants 1.2. Wierd problem.

-DeVore (who''s not going to uninstall 1.3 so he can install 1.2)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS