Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (707)
Games in Android Showcase (206)
games submitted by our members
Games in WIP (781)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Cremelian War X  (Read 6250 times)
0 Members and 1 Guest are viewing this topic.
Offline marinepower

Junior Devvie

Projects: 2

« Posted 2009-05-26 02:39:17 »

Here is Cremelian Wars X, a turn based strategy game that puts you right in the action as you command and grow your army to defeat all that oppose you.  This game features over 20 unit types, scriptable game play, a fully functional game editor, a custom sound track, and traditional pixel art!

Current Gameplay screenshot:

Download Link

[||||||||||] 46%

Version 0.12 (5/25/09)
Click Here to Download!

- initial release

Version 0.13 (5/27/09)
 Click Here to Download!

-added some trigger implementations
-added 4 more maps to play (I'd recommend starting on level 1, they get progressively harder)
-added more units

Version 0.19b (7/18/09)
Click Here to Download!

-added a main menu
-added undo move
-factories and airports can now build units
-infantry can now enter transports
-updated runner.html

Still to be done:
- (64%) Scripting
- (85%) (+19%)Mp3 play back
- (31%) (-42%) Map editor
- (01%) Online play
- (28%) (+6%) Sprites
- (55%) Additional sound effects
- (00%) AI
- (94%) (+9%)Pathfinding

If you download, please post what your first impressions were, as well as the fps, ups, and any errors you might have encountered. Suggestions about how to improve this game and make it more fun are always welcome, too.

(PS, this is a two player game, so try to find a friend or coworker to play with.)
Offline Eli Delventhal

JGO Kernel

Medals: 42
Projects: 11
Exp: 10 years

Game Engineer

« Reply #1 - Posted 2009-05-26 18:28:17 »

Looks cool. I'll give it a go when I get back from work.

If I were you, I'd look into OGG and EasyOGG instead of MP3.

See my work:
OTC Software
Offline Red27

Junior Devvie

Medals: 2
Projects: 2

« Reply #2 - Posted 2009-05-26 19:10:25 »

If you simply must use MP3, then use the JMF mp3plugin.jar from

You include it on your classpath using -Djava.library.path=<lib where jar is> etc.

Then use some code like this:

      AudioInputStream din = null;
      try {
         SourceDataLine line;
         do {
            AudioInputStream in = AudioSystem.getAudioInputStream(<mp3Filename>);
            AudioFormat baseFormat = in.getFormat();
            AudioFormat decodedFormat = new AudioFormat(
                  baseFormat.getSampleRate(), 16, baseFormat.getChannels(),
                  baseFormat.getChannels() * 2, baseFormat.getSampleRate(),
            din = AudioSystem.getAudioInputStream(decodedFormat, in);
            DataLine.Info info = new DataLine.Info(SourceDataLine.class, decodedFormat);
            line = (SourceDataLine) AudioSystem.getLine(info);
            if(line != null) {   
               int nBytesRead;         
               byte[] data = new byte[1024];   

               // Start

               while ((nBytesRead =, 0, data.length)) != -1 && !fadeComplete) {   
                  line.write(data, 0, nBytesRead);
            // Stop
         } while(loopMusic);
      } catch(Exception e) {
      } finally {
         if(din != null) {
            try { din.close(); } catch(IOException e) { e.printStackTrace(); }

Awesome Soccer World 2010 | Red27 Studios | Blog

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline marinepower

Junior Devvie

Projects: 2

« Reply #3 - Posted 2009-05-27 03:01:21 »

Thanks for the info.  I tried doing something similar with a package called JLayer, but it consistently gives me the following error message:
Exception in thread "Thread-14" java.lang.NoClassDefFoundError: javazoom/jl/player/Player
   at CremelianWars.ResourceManagement.MP3$
Caused by: java.lang.ClassNotFoundException: javazoom.jl.player.Player
   at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClassInternal(Unknown Source)
   ... 1 more
Caused by: C:\Documents and Settings\Eugene Zhurilo\Desktop\javazoom\jl\player\Player.class (The system cannot find the path specified)
   at Method)
   at<init>(Unknown Source)
   at<init>(Unknown Source)
   at Source)
   at Source)
   at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
   at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
   at sun.plugin2.applet.Applet2ClassLoader$ Source)
   at Method)
   ... 5 more
basic: Removed progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@21b6d
Exception in thread "Thread-15" java.lang.NoClassDefFoundError: javazoom/jl/player/Player
   at CremelianWars.ResourceManagement.MP3$

This is the .html file, with the JLayer package inside of the CremelianWars package.  Could there be a problem with the way the .html is set up?

<APPLET CODE=CremelianWars/CremelianWarsDemoMap.class
Offline Red27

Junior Devvie

Medals: 2
Projects: 2

« Reply #4 - Posted 2009-05-27 10:37:05 »

Few questions:

1) Are you working off the desktop, ie is your base .html file located there?

2) What's in the CremelianWars.jar file?

3) Is the jlayer.jar on the desktop also? (or contents extracted?)

Awesome Soccer World 2010 | Red27 Studios | Blog

Offline Mike

« JGO Spiffy Duke »

Medals: 149
Projects: 1
Exp: 6 years

Java guru wannabe

« Reply #5 - Posted 2009-05-27 13:29:55 »

FPS was quite stable around 60 and I didn't get any errors (except for the exception you wrote above).

Isn't it better to put it on a website though? Tongue

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline appel

JGO Wizard

Medals: 73
Projects: 4

I always win!

« Reply #6 - Posted 2009-05-27 14:48:37 »

Screenshot not working Sad

Image host probably blocked at work.

Check out the 4K competition @
Check out GAMADU (my own site) @
Offline marinepower

Junior Devvie

Projects: 2

« Reply #7 - Posted 2009-05-27 21:06:12 »


The .html file was on the desktop, as well as the JLayer jar.  However, when I deleted the JLayer package off the desktop, the error remained the same.  I'm not sure what you want to know from the contents of the CremelianWars.jar file, but it contains all the necessary graphics, classes, and files to run the game, which are all subdivided into folders.  The JLayer jar was placed inside a folder called ResourceManagement.  You could extract the contents and take a look if you want.

Thanks for testing!  I'm relieved that the fps is a lot higher than the 8 fps I'm used to.
There are plans on getting this game set up on its own website, but there isn't much of a need for that until we implement multiplayer capability. 

Does the screenshot simply not load, or is it resized?  Regardless, you could see how the game looks like by just running it.  It takes about 5 seconds to load the game from start up.
Offline marinepower

Junior Devvie

Projects: 2

« Reply #8 - Posted 2009-05-28 01:53:56 »

Time for an update.  I spent most of today working on this, and have a couple of things to show for it.  First off, there is finally someone to do the pixel art, which is a big plus.  Secondly, the game loads a bit faster, and any additional levels that are loaded after the first should now be able to take advantage of the resources used in the last map to furthur decrease the map loading time.

Some basic scripting has also been implemented.  This part is fairly exciting, since doing a good job on the scripting, and eventually releasing a map editor, can allow a game to really thrive.  The scripting engine is based around triggers, which will execute all their actions(commands) if all the preconditions are first met.

These conditions have been coded:
Always, Never, Accumulate, Bring, and Control.
Which can impact the map in the follow ways:
Defeat, Draw, Victory, Preserve Trigger, and Resource Modification.

Offline Red27

Junior Devvie

Medals: 2
Projects: 2

« Reply #9 - Posted 2009-05-28 20:51:53 »

Sure, I'll take a it within the current Jar, or do you need to create a special version for me to download?

Awesome Soccer World 2010 | Red27 Studios | Blog

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline marinepower

Junior Devvie

Projects: 2

« Reply #10 - Posted 2009-05-28 21:38:08 »

lol that's interesting...  I extracted the contents of cremelianwars.jar, and apparently it didn't have a jlayer jar file in it.  Strange.

Anyways, you can take a look at the source code here:

I've never actually gotten any .mp3s to play, since java raises a security exception when running in an ide, and has never successfully loaded any in a signed applet, but I assume the JLayer package is working like it should.
The main runner file is called CremelianWarsDemoMap, and it tries to pass the song names on line 98 to a class called MP3, which is located in the ResourceManagement folder, during init().

Thanks for your help.  Anyone else is free to take a look if they want, too.
Offline Red27

Junior Devvie

Medals: 2
Projects: 2

« Reply #11 - Posted 2009-05-28 22:20:28 »

Ok - I've downloaded and will try and take a look. 

One suggestion though, don't include Thumbs.db files within your final jar; adds unnecessary size to the distribution and is only relevant for Windows users.  You can exclude them via your build script (assuming you use an Ant task to do this).  It's only a few hundred KB saved, but it's good practise and if you had a large collection of images, the size of the thumbs.db files can get quite large.

Awesome Soccer World 2010 | Red27 Studios | Blog

Offline marinepower

Junior Devvie

Projects: 2

« Reply #12 - Posted 2009-05-30 01:04:18 »

Thanks.  It seems that I might have deleted the actual jar from the source code package, so you can download it here:

Interesting tip about the thumbs files too.  Always wondered why those were created.
Offline marinepower

Junior Devvie

Projects: 2

« Reply #13 - Posted 2009-06-02 21:11:46 »

Alright, extremely basic mp3 audio works now!  The problem seemed to be packaging the jlayer file inside the cremelianwars jar.  Now to work on some game scripting.
Offline marinepower

Junior Devvie

Projects: 2

« Reply #14 - Posted 2009-07-18 20:19:55 »

Hi guys, I've recently had the opportunity to work on this again, and have put in a couple of new features that I'd like you to try out.

First off is the menu system, which is shown when you aren't playing a game.  It has three options, play the campaign, play custom maps, and input map data.  Here's how they work.  The campaign option leads you on five different missions that are supposed to take place one after another.  I've disabled victory so that you can try out the custom maps, so this option does not work as of now.

 The next and most important part of the menu is the custom map design, which works by taking in the name of the map and loading it.  The following maps have been made and are playable:
level[1-5].map (ie etc)
versus[1-2].map (You can build on these!)

The last option on the menu is where you input map data, which allows you to resume a game that you didn't have time to finish.  While playing, press 's' to open up a dialogue box with the map data for the current map you're playing.  You can them copy and save this code somewhere, and paste it into the load map data option when you want to resume playing.  This should recreate the map you were playing perfectly.  If it doesn't, paste the map code here and I'll try to correct the problem.

I hope you guys try out this version!  (ARG dang broken message posting... makes it impossible to type out a message longer than this Sad
Pages: [1]
  ignore  |  Print  

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!