Bridge4k [done~ish]

I’m currently working on a bridge builder game (with the working name Bridge4k):

Applet: http://x2d.org/java/4k/bridge4k.html
Webstart: http://x2d.org/java/4k/bridge4k.jnlp

To select or place a node, use the left mouse button.
To deselect or delete a node, use the right mouse button (or ctrl+left mouse).
To run the simulation, press [Space].
To restart the level, prees [R].

“Road parts” can only be built horizontally between the topmost supporting nodes.

I do have a bit of space left. Any comments and suggestions are warmly appreciated!

Nice physics ;D

Level passed with $1426 unspent ! (i’m sure there is a lot further to go!)
Though I certainly wouldn’t trust my life on trying to cross it ;D

The characteristics of the building material is rather peculiar to say the least!

$1700 unspent! :wink:

$1723 unspent - though I think i’m stretching the definition of ‘level passed’, you’ll have to build it yourself to see exactly what goes wrong :smiley: (The bridge remains intact)

:edit:

Fixed the dubious behaviour above, and got it down still further @ $1737 unspent 8)

I love this game - it’s a very good simplification of Bridge Construction Set (pontifex 2).

$1773 though it’s a dirty one ::slight_smile: (Causes the return-run bug found earlier, and causes the bridge to partially destroy itself too!)

:edit:

Scratch that - found a clean version that is much cheaper! :o

$1949

Managed to break it with this incredibly simple bridge design ;D
(when the bridge bends so much that it goes off the bottom the screen the ball rolling logic breaks.)

$2047 - Don’t think you can get much cheaper than that ::slight_smile:

Add some kind of mechanism for importing & exporting a bridge design to/from a hex string encoding so we can more easily share bridge designs.

Good Work Abuse.

Btw, I got this error:


Exception in thread "Thread-7" java.lang.NullPointerException
	at Bridge4k.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-12" java.lang.NullPointerException
	at Bridge4k.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)


Might wanna fix that?

Thanks for the responses!

Renoria - I’m afraid it’s rather hard to tell what goes wrong from that exception, but I’ll make sure to upload a version with debug information enabled shortly.

Abuse - I had seen a lot of cheap bridges already, but your $2047 takes the prize! :slight_smile: As for importing/exporting bridges: Sure, I could do that. The other option (which would quickly use up most remaining space) is adding levels of difficulty (different support setups, bridge lengths, starting money and ball weights). Which would you prefer?
Also: Yes, Pontifex II is the primary source of inspiration for this game :slight_smile:

still not fixed =O


Java Plug-in 1.6.0_07
Using JRE version 1.6.0_07 Java HotSpot(TM) Client VM
User home directory = C:\Users\David
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
Finalize objects on finalization queue ... completed.
Memory: 5,056K  Free: 623K  (12%) ... completed.
Dump classloader list ...
    codebase=http://x2d.org/java/4k/, key=http://x2d.org/java/4k/,Bridge4k.jar, zombie=false, cache=true, refcount=1, info=sun.plugin.ClassLoaderInfo@21b6d
Done.

Reload policy configuration ... completed.
Exception in thread "Thread-6" java.lang.NullPointerException
	at Bridge4k.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)


$2078 ;D

and finally a dirty $2080

Sorry Renoria, hadn’t uploaded new version yet. Try it now - should give line numbers when crashing this time (current debug version >4kb, not obfuscated).

Dirty $2113 - almost certain that can’t be beaten :-*

One Idea: The game can be played whole by mouse except for start or stop by using space.
Would be great to make to top right text “clickable” :wink:

Other than that, great game. Want to have moooooore Level’s ;D

Another Idea: Allow deletion of edges as well as nodes.

Currently if you create an edge between 2 of the starting nodes, the only way to get rid of it is to restart the app.
This would also help when wanting to remove a single edge from a node that has many others.
Currently you have to delete the edge, and re-add all but the unwanted edge.

You don’t really need to restart the entire app, just the level (by pressing R) is enough… but yeah, I can see why it’s a problem :slight_smile:

Updated. There are now levels in the game; they should get progressively harder. Every second and fourth level is a bit different from the standard layout, and the gap widens with each level. Also, the ball gets slightly heavier with each level.

I’ve still not managed to get those physics more rigid, though (I should really start over, but I lack the motivation).

hmm… level 11 is kinda difficult ::slight_smile: (nothing to build off, so can’t place any bridge pieces!)