Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (516)
Games in Android Showcase (122)
games submitted by our members
Games in WIP (577)
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  
  SwitchTrack: A train shunting puzzle game.  (Read 3857 times)
0 Members and 1 Guest are viewing this topic.
Offline ShannonSmith
« Posted 2008-09-20 19:57:34 »

Knocked this up in the last week:


It is an implementation of the Inglenook Sidings shunting puzzle.

I think for my next project I should document the steps I go through on the road to abandoning development. I think I generally give up around the point I realize the game is not quite as fun as the one I had imagined in my head.

Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #1 - Posted 2008-09-20 21:52:52 »

It looks cool  Grin  However, I am not so sure what I am supposed to do???

Offline ShannonSmith
« Reply #2 - Posted 2008-09-20 22:25:10 »

Hmm... Probably should have put some instructions in. Basically you have to assemble a series of 5 train cars and the locomotive on the main line. Everything is controlled via the mouse. You can click on the locomotive to move it forward and backwards and on the two switch tracks (if they aren't occupied). Clicking between cars will hitch/unhitch a car. The train cars required on the mainline are displayed by the coloured rectangles.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #3 - Posted 2008-09-20 23:02:58 »

phew, finally managed to beat it.

Very towers of hanoi.

Play Minecraft!
Offline ShannonSmith
« Reply #4 - Posted 2008-09-20 23:21:15 »

Yeah, it's not nearly as much fun as I had initially hoped. Still the code is useful if I ever want to do another hex based train game. I had an idea for another train-based puzzle game where you layout a track in order to shuffle passengers round various stations.
Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #5 - Posted 2008-09-20 23:57:47 »

I got this exception:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
java.lang.NullPointerException
   at com.sun.media.sound.DirectAudioDevice$DirectClip.open(Unknown Source)
   at angryoctopus.switchtrack.main.SwitchTrack.<init>(Unknown Source)
   at angryoctopus.switchtrack.main.SwitchTrack.main(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


Windows XP
Java 1.6.0_10-beta

Offline ShannonSmith
« Reply #6 - Posted 2008-09-21 00:15:51 »

Looks like a sound issue, do you have any other audio applications open at the same time?
I was a bit lazy so using java Clip objects which tend to be a bit over-zealous about grabbing system resources.

Does:

1  
2  
3  
  Clip clip = AudioSystem.getClip();
  clip.open(AudioSystem.getAudioInputStream(new File("sound.wav")));
  clip.start();


Work on your system?

Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #7 - Posted 2008-09-21 07:53:50 »

Got it! I didn't notice the "rectangles" around the wagons!

Offline zammbi

JGO Coder


Medals: 4



« Reply #8 - Posted 2008-09-21 08:06:27 »

Yea its not bad. The one trouble I had is that the blue and the purple was very similar.

Current project - Rename and Sort
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!