Important alert: (current site time 7/15/2013 3:17:07 PM EDT)
 

winzip icon

A Civilisation Game

Email
Submitted on: 7/27/2004 7:15:55 PM
By: Shane Grund 
Level: Advanced
User Rating: By 12 Users
Compatibility: Java (JDK 1.4)
Views: 34897
 
     A basic version of the civilisation game. It was made for an advanced java assignment at university. It shows how to program in full screen exclusive mode, and how to use sound in java games.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

3/26/2005 1:17:18 AM

i have yet to examine it, but im rather impressed with what i see as most of the java games seem to be applets i hope to learn much from this
(If this comment was disrespectful, please report it.)

 
4/21/2005 10:18:37 AM

VERY good submission! Keep up the good work Shane. This has been a wealth of knowledge for the beginner java game programmer.
(If this comment was disrespectful, please report it.)

 
8/7/2005 5:24:13 AMTools10

While it was some time ago since you posted this submission(and I actually never managed to play the game) the source code is just impressive.
(If this comment was disrespectful, please report it.)

 
4/24/2006 11:39:46 AMWahyu

OK juga Choy!
(If this comment was disrespectful, please report it.)

 
2/5/2007 11:12:28 AMDragon

Shouldn't you give David Brackeen credit for all of the source code you borrowed from him? It's still a good game, but it's always good to give credit where credit is due.
http://www.brackeen.com/javagamebook/
(If this comment was disrespectful, please report it.)

 
2/6/2007 8:59:59 PMshah

i face a error when use the code
the eror is:exception in thread "main" java.lang.IllegalArgumentException:Width(-1)and height(-1)cannot be <=0)
Can anybody HELP me to solve it
(If this comment was disrespectful, please report it.)

 
3/3/2007 3:36:15 AMyamini

good game shane
(If this comment was disrespectful, please report it.)

 
4/18/2007 8:11:53 PMDan

when i loaded this into eclipse and tried to run it i got these errors

Exception in thread "main" java.lang.IllegalArgumentException: Width (-1) and height (-1) cannot be <= 0
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
at sun.awt.Win32GraphicsConfig.createCompatibleImage(Unknown Source)
at game2.AdvJavaAss.src.ScreenManager.createCompatibleImage(ScreenManager.java:257)
at< /span> game2.AdvJavaAss.src.MainGUI.createButton(MainGUI.java:227)
at game2.AdvJavaAss.src.MainGUI.init(MainGUI.java:51)
at game2.AdvJavaAss.src.GameCore.run(GameCore.java:30)
at game2.AdvJavaAss.src.MainGUI.main(MainGUI.java:135)
(If this comment was disrespectful, please report it.)

 
5/4/2007 1:56:36 AMfathy

the code is great and i asked for amrican domino code game if any one could help me
(If this comment was disrespectful, please report it.)

 
5/9/2007 5:31:34 AMLeo

The graphics of your game is so good... ^^
I like it..
(If this comment was disrespectful, please report it.)

 
5/9/2007 5:33:53 AMLeo

your games is so nice.. But I can't play it well in my pc. It has a delay when it repaint.. but good job fellow java fanatic
(If this comment was disrespectful, please report it.)

 
1/17/2008 10:32:50 AMmukesh

any one plz tell..how"s it will run...

i downloaded it..but not able to run.explain in brief.
(If this comment was disrespectful, please report it.)

 
9/29/2010 6:53:07 AMMichael

Hi Shane

I want to seek your permission to use your Java game source code for demonstration in our upcoming book which

teaches Java coding. Could you kindly let us know if this is possible....

Thanks in advance for your help.


Michael
HobbyPRESS

editor@hobbypress.net
(If this comment was disrespectful, please report it.)

 
3/21/2012 6:58:27 PM

Exception in thread "main" java.lang.IllegalArgumentException: Width (-1) and height (-1) cannot be <= 0

Similar problem. Anyone solved it already?
(If this comment was disrespectful, please report it.)

 
1/17/2013 3:28:19 AM

i get that same illegal argument error that several other people got, anyone figured out what causes it
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.