Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

Asteroids game

Thread view: 
Knute Johnson - 27 Aug 2007 01:00 GMT
I've been bored because work has been so slow.  So I wrote an Asteroids
game.  It is far from done but it is pretty playable, at least on my
desktop.

http://www.knutejohnson.com/test

Directions:
    Turn the ship with the arrow keys
    Accelerate the ship with the up arrow key
    Fire with the space bar

    If it runs out of fuel it cannot be maneuvered but can shoot
    until it runs out of bullets
    To restart the game click the mouse on the screen

You can download the Asteroids.jar file and it will run as an application.

I would appreciate some feedback as to playability and any deficiencies
that you see in the game.  If you have a slower machine (less than a
Ghz), try downloading the Asteroids.jar file and resizing the frame to
see if that makes it any better.

It does require version 6.

Signature

Knute Johnson
email s/nospam/knute/

Knute Johnson - 27 Aug 2007 01:23 GMT
> I've been bored because work has been so slow.  So I wrote an Asteroids
> game.  It is far from done but it is pretty playable, at least on my
[quoted text clipped - 19 lines]
>
> It does require version 6.

The downloadable jar is in http://www.knutejohnson.com/test/jar

There appear to be some issues preventing it from running on linux.

Signature

Knute Johnson
email s/nospam/knute/

Andrew Thompson - 27 Aug 2007 08:29 GMT
...
>I would appreciate some feedback

Sorry Knute.  I actually had a detailed reply to make to
your first post, but my PC crashed, and I lost it!  I was
so disheartened I could not bother retyping it at the time.

>..as to playability ..

Quite useable at default size on this (aging) 1.8 Athlon.
Unfortunately this particular PC is quite damaged, and
shuts down on intensive CPU activity, so I suspect my
leaving the game running in the BG actually contributed
to the crash that took out my reply!

Such is life..  I cannot run AudioTrace, a full-screen
gradient paint with a 50ms refresh, or do any serious
video editing, without the machine crashing and dying.

One nice thing for usability would be to also add a
keyboard shortcut for 'new game'.  I keep forgeting
to remove the mouse pointer from the play area -
and then trying to shoot it..  

(muses) Maybe that last paragraph went 'one
sentence too long'.

>...and any deficiencies ..

Umm.. pretty much only the same ones that existed in
the original game, as far as I recall it.  I am much less
a fan of asteroids than you, apparently.   ;-)

And yes, I understand that you are trying for 'authentic look
and feel' so the entire idea of throwing in some (more) colors
and adding a nice gradient background would probably not
be the way you want to take it. (But personally, I think it
improve the game immensely.)

>..that you see in the game.  If you have a slower machine (less than a
>Ghz), try downloading the Asteroids.jar file and resizing the frame to
>see if that makes it any better.
>
>It does require version 6.

Why?  Specific functionalities of 1.6, or is that simply
the version used to build it?

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Daniel Dyer - 27 Aug 2007 15:25 GMT
> Such is life..  I cannot run AudioTrace, a full-screen
> gradient paint with a 50ms refresh, or do any serious
> video editing, without the machine crashing and dying.

Just a thought... I had a similar problem with my old laptop.  Turns out  
it was caused by dust clogging up the cooling fan and the air intakes  
(which Toshiba cunningly placed on the bottom of the machine).  The  
machine turned itself off whenever it over-heated.  Turning the machine  
off and blowing all of the dust out of the intakes and the fan fixed the  
problem (that was a couple of years ago and the machine still works fine  
now).

Dan.

Signature

Daniel Dyer
http//www.uncommons.org

Andrew Thompson - 28 Aug 2007 15:50 GMT
>> Such is life..  I cannot run AudioTrace, a full-screen
>> gradient paint with a 50ms refresh, or do any serious
[quoted text clipped - 3 lines]
> ..Turning the machine  
>off and blowing all of the dust out of the intakes and the fan ...

Spot on, thanks.  All working smoothly now.
(And you should have seen the dust!)

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Knute Johnson - 27 Aug 2007 17:31 GMT
> ..
>> I would appreciate some feedback
[quoted text clipped - 19 lines]
> to remove the mouse pointer from the play area -
> and then trying to shoot it..  

That's a good idea.  I'll upload a new version here shortly that will
reset with the <ENTER> key.

> (muses) Maybe that last paragraph went 'one
> sentence too long'.
[quoted text clipped - 4 lines]
> the original game, as far as I recall it.  I am much less
> a fan of asteroids than you, apparently.   ;-)

People thought I was strange then too :-).

> And yes, I understand that you are trying for 'authentic look
> and feel' so the entire idea of throwing in some (more) colors
> and adding a nice gradient background would probably not
> be the way you want to take it. (But personally, I think it
> improve the game immensely.)

I did want it to be as much like the original as possible.  I don't
remember if the original had any stars in the background or not.  Also I
think the ship might have been a little smaller in relation to the
screen size.

>> ..that you see in the game.  If you have a slower machine (less than a
>> Ghz), try downloading the Asteroids.jar file and resizing the frame to
[quoted text clipped - 4 lines]
> Why?  Specific functionalities of 1.6, or is that simply
> the version used to build it?

I compiled it with 1.6.  I have to go through it and check the docs but
I'm pretty sure there are some 1.5 Graphics2D features in it.

Signature

Knute Johnson
email s/nospam/knute/

Gordon Beaton - 27 Aug 2007 08:50 GMT
> I would appreciate some feedback as to playability and any
> deficiencies that you see in the game. If you have a slower machine
> (less than a Ghz), try downloading the Asteroids.jar file and
> resizing the frame to see if that makes it any better.
>
> It does require version 6.

I would have liked to try it on my 167 MHz Ultra 1, but unfortunately
the latest Java available is 1.4.1...

/gordon

--
Lew - 27 Aug 2007 13:58 GMT
> I would have liked to try it on my 167 MHz Ultra 1, but unfortunately
> the latest Java available is 1.4.1...

Have you tried downloading a later version?

Signature

Lew

Gordon Beaton - 27 Aug 2007 14:12 GMT
>> I would have liked to try it on my 167 MHz Ultra 1, but unfortunately
>> the latest Java available is 1.4.1...
>
> Have you tried downloading a later version?

I'm not aware of anything later than Blackdown 1.4.1 that runs on
Linux on UltraSparc.

There is a 4 year old release candidate of 1.4.2, but IIRC it isn't
entirely stable on this platform.

And the Blackdown project seems to have died; the most recent news
item is from November 2005.

/gordon

--
Lew - 27 Aug 2007 23:58 GMT
>>> I would have liked to try it on my 167 MHz Ultra 1, but unfortunately
>>> the latest Java available is 1.4.1...

Lew wrote:
>> Have you tried downloading a later version?

> I'm not aware of anything later than Blackdown 1.4.1 that runs on
> Linux on UltraSparc.

Oh, that's what the "Ultra" means in the product name.  I wasn't familiar with
it, so didn't realize you were talking SPARC.

Signature

Lew

Knute Johnson - 28 Aug 2007 00:14 GMT
>> I would appreciate some feedback as to playability and any
>> deficiencies that you see in the game. If you have a slower machine
[quoted text clipped - 7 lines]
>
> /gordon

That would have been interesting.  I have to go through the code now and
optimize it for readability and then performance.  If I can make it work
with 1.4, I will.

Signature

Knute Johnson
email s/nospam/knute/

Gordon Beaton - 28 Aug 2007 07:09 GMT
> That would have been interesting.  I have to go through the code now and
> optimize it for readability and then performance.  If I can make it work
> with 1.4, I will.

167 MHz is extremely slow, but it helps me appreciate my modern
machine at work (which is 20x faster). I wouldn't expect much game
performance from it. On the other hand, original Asteroids ran on a
2(?) MHz 6502...

/gordon

--
GMM50 - 27 Aug 2007 21:19 GMT
On Aug 26, 8:00 pm, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
wrote:
> I've been bored because work has been so slow.  So I wrote an Asteroids

I'm running WinXP Pro latest updates.  On a Athlon 2200 1GB machine
I'm a Java rookie or what ever comes before a rookie.
I think I'm running Java 6.xx the latest.
The game runs quite well. I'm not a gamer but played asteroids in it's
heyday.

When I quit the game I'm still getting audio bursts every 2-3 seconds.

Keep us posted

George
www.embedded-designer.com
Knute Johnson - 27 Aug 2007 22:50 GMT
> On Aug 26, 8:00 pm, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
> wrote:
[quoted text clipped - 12 lines]
> George
> www.embedded-designer.com

Signature

Knute Johnson
email s/nospam/knute/

Knute Johnson - 27 Aug 2007 22:59 GMT
> On Aug 26, 8:00 pm, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
> wrote:
[quoted text clipped - 12 lines]
> George
> www.embedded-designer.com

Sorry, please disregard the blank response before this.

Thanks for trying it.  If you have a chance, please try the application
instead of the applet.  The app is at;

http://www.knutejohnson.com/test/jar/Asteroids.jar

You can resize the app to maybe make it perform better.

The sounds should play when the space bar is pressed and when a rock is
hit.  Missed sounds that burp later is a sign of not enough processor.

Thanks,

Signature

Knute Johnson
email s/nospam/knute/



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.