kevglass
« League of Dukes » JGO Kernel      Posts: 5214 Medals: 49
Mentally unstable, best avoided.
|
 |
«
on:
2008-12-22 19:00:06 » |
|
4x4KDrive your truck across the 3 environments in the fastest time possible. Controls:Up/Down - Accelerate/Reverse Left/Right - Tilt the truck back and forth (just makes the back/front a bit heavier) R - Restart Level Space - Jump (only available every five seconds, indicated in the top right hand corner) 1/2/3 - Start Track 1,2 or 3 Tips:Tilting is important to climb steep slopes. Jump can be used to get awesome times if you get it right. It can also be used to get you off your back used in conjunction with the tilt controls. Thats only really useful if you're quite a long way through the track and don't want to just restart. Stuff:I thought doing some physics in 4K would be interesting. This is a light weight verlet implementation. The truck thing was just going to be a test case for the tiny engine before writing something else but it seemed to turn out ok. Now I just need another idea for a physics game. It's barely under 4k at the moment. Java performed surprisingly well even when I had the option to turn on antialiasing (taken out due to space restrictions). Comments and bug reports welcomed! Kev
|
|
|
|
irreversible_kev
Full Member   Posts: 174
|
 |
«
Reply #1 on:
2008-12-22 19:06:34 » |
|
woot lol first 2 seconds experience...   I will now play it and edit to give comments EDIT: Track 1: 35seconds Track 2: 42seconds  It's great  I like how the tilting brings an extra skill element to it. Also, you can use the jump to get awesome air and jump over some rocks.
|
|
|
|
|
kevglass
« League of Dukes » JGO Kernel      Posts: 5214 Medals: 49
Mentally unstable, best avoided.
|
 |
«
Reply #2 on:
2008-12-22 19:11:00 » |
|
Yeah, thats a special feature  Nice one! Kev
|
|
|
|
Games published by our own members! Go get 'em!
|
|
Markus_Persson
JGO Kernel      Posts: 2092 Medals: 10
Mojang Specifications
|
 |
«
Reply #3 on:
2008-12-23 03:20:14 » |
|
Neatobuckets!! =D Really nice graphics and solid physics (except for the inverted truck thing.  ) My only complaints are that it feels like it either is too fast in general, or perhaps too "jerky" in the acceleration, and that getting stuck on your roof after having used the jump recently means you have to wait five seconds.
|
|
|
|
kevglass
« League of Dukes » JGO Kernel      Posts: 5214 Medals: 49
Mentally unstable, best avoided.
|
 |
«
Reply #4 on:
2008-12-23 04:12:08 » |
|
I'll rethink the jump thing, acceleration I'll try reducing it a bit and apply on a curve. Anyone know how you get the inverted truck thing, I can't get it here  Kev
|
|
|
|
irreversible_kev
Full Member   Posts: 174
|
 |
«
Reply #5 on:
2008-12-23 06:10:46 » |
|
I'll rethink the jump thing, acceleration I'll try reducing it a bit and apply on a curve. Anyone know how you get the inverted truck thing, I can't get it here  Kev It happened only that once! EDIT: Level 1: Hold down LEFT+DOWN. Press R whilst keeping LEFT+DOWN down. EDIT2: I thought I would add that I have experienced this exception three times 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| java.lang.IllegalStateException: Buffers have not been created at sun.awt.windows.WComponentPeer.getBackBuffer(Unknown Source) at java.awt.Component$FlipBufferStrategy.getBackBuffer(Unknown Source) at java.awt.Component$FlipBufferStrategy.updateInternalBuffers(Unknown Source) at java.awt.Component$FlipBufferStrategy.createBuffers(Unknown Source) at java.awt.Component$FlipBufferStrategy.<init>(Unknown Source) at java.awt.Component$FlipSubRegionBufferStrategy.<init>(Unknown Source) at java.awt.Component.createBufferStrategy(Unknown Source) at java.awt.Window.createBufferStrategy(Unknown Source) at java.awt.Component.createBufferStrategy(Unknown Source) at java.awt.Window.createBufferStrategy(Unknown Source) at E.<init>(Unknown Source) at E.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) |
|
|
|
|
|
EnderGT
Jr. Member   Posts: 98
|
 |
«
Reply #6 on:
2008-12-23 09:19:31 » |
|
Happens all the time to me... wanna have some fun? hold down for a few sec, then jump. For me, at least, I hit the ground and go flying, about half the time the truck does that inverted trick.
|
|
|
|
|
trembovetski
JGO Strike Force    Posts: 926
If only I knew what I'm talking about!
|
 |
«
Reply #7 on:
2008-12-23 16:20:44 » |
|
EDIT2: I thought I would add that I have experienced this exception three times 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| java.lang.IllegalStateException: Buffers have not been created at sun.awt.windows.WComponentPeer.getBackBuffer(Unknown Source) at java.awt.Component$FlipBufferStrategy.getBackBuffer(Unknown Source) at java.awt.Component$FlipBufferStrategy.updateInternalBuffers(Unknown Source) at java.awt.Component$FlipBufferStrategy.createBuffers(Unknown Source) at java.awt.Component$FlipBufferStrategy.<init>(Unknown Source) at java.awt.Component$FlipSubRegionBufferStrategy.<init>(Unknown Source) at java.awt.Component.createBufferStrategy(Unknown Source) at java.awt.Window.createBufferStrategy(Unknown Source) at java.awt.Component.createBufferStrategy(Unknown Source) at java.awt.Window.createBufferStrategy(Unknown Source) at E.<init>(Unknown Source) at E.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) |
A race condition between creating the buffer strategy on the main thread and the size of the window being changed on the EDT.. Creating the BS on the EDT will help. Also, looks like the the slpash screen image is missing: 1 2 3
| Caused by: java.io.FileNotFoundException: http: at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) |
Not that we'd have lots of time to enjoy it with a 4k jar file =) Dmitri
|
|
|
|
|
kevglass
« League of Dukes » JGO Kernel      Posts: 5214 Medals: 49
Mentally unstable, best avoided.
|
 |
«
Reply #8 on:
2008-12-24 06:11:08 » |
|
New version up:
* Physics instability should be fixed * Jump can now be used any time * Minor graphical fixes
4096 bytes.
Kev
|
|
|
|
|
|
Games published by our own members! Go get 'em!
|
|
Renoria
Full Member   Posts: 209
...
|
 |
«
Reply #10 on:
2008-12-24 10:40:03 » |
|
Good physics, apart from the inverted truck and jumping when your'e not the right way up.
Good game.
|
|
|
|
|
CommanderKeith
JGO Wizard     Posts: 1455 Medals: 9
|
 |
«
Reply #11 on:
2008-12-30 13:27:10 » |
|
Really great physics. One thing that seemed weird was the way you slow down so much when flying through the air? By the way, no truck inversion here despite my best efforts  It's quite impressive the way you have mastered different physics systems one by one. What are your thoughts about verlet vs the system used in Phys2D/box2d?
|
|
|
|
kevglass
« League of Dukes » JGO Kernel      Posts: 5214 Medals: 49
Mentally unstable, best avoided.
|
 |
«
Reply #12 on:
2008-12-30 14:46:46 » |
|
Not sure why you're seeing slow down in the air, there's no damping at all so there shouldn't be any force against the particles. Verlet seems great for things that likely to be quite bouncy, implementing it was pretty simple following that paper. However, I did try box/box interaction originally and couldn't get that stable. Box2D would still be my choice for real stuff, but then I might have a non-4k play with verlet later also just to see if it's really that hard or whether it was 4k making it a little hard to think about  Thanks for playing all!  Kev PS. Incidentally, no one should be getting inverted trucks anymore. I was quite surprised to see Renoria reporting them still happening.
|
|
|
|
Riven
« League of Dukes » JGO Kernel      Posts: 5866 Medals: 255
Hand over your head.
|
 |
«
Reply #13 on:
2008-12-30 16:02:39 » |
|
Verlet seems great for things that likely to be quite bouncy, implementing it was pretty simple following that paper. However, I did try box/box interaction originally and couldn't get that stable.
The only way to get boxes/cubes realistic in Verlet (not bouncy) is to have a 2d or 3d grid of spheres, and LOTS of springs to bind them all together. It drains performance, but it works! 4x4x4 cubes = 2*2*26 + 6*4*17 + 2*8*11 + 8*7 = 744 springs (I might have missed a few) The spheres must be overlapping a fair bit to get the shape solid, so don't do sphere<->sphere collision. Bounces around like a rock, or like jelly, depending on spring stiffness. PS. Incidentally, no one should be getting inverted trucks anymore. I was quite surprised to see Renoria reporting them still happening.
I think he was just repeating what was already posted, for the sake of it.
|
Hi, appreciate more people! Σ ♥ = ¾ Learn how to award medals... and work your way up the social rankings
|
|
|
kevglass
« League of Dukes » JGO Kernel      Posts: 5214 Medals: 49
Mentally unstable, best avoided.
|
 |
«
Reply #14 on:
2008-12-30 16:50:52 » |
|
The only way to get boxes/cubes realistic in Verlet (not bouncy) is to have a 2d or 3d grid of spheres
That advanced character physics paper seems to imply you can use SAT type collision with just four particles, one for each corner with 6 constraints per box. Didn't want to work for me at least. Kev
|
|
|
|
Riven
« League of Dukes » JGO Kernel      Posts: 5866 Medals: 255
Hand over your head.
|
 |
«
Reply #15 on:
2008-12-30 17:05:37 » |
|
The problem is momentum and angular rotation.
That's all a 'side effect' of Verlet integration, but the downside is that you need lots of particles.
4 (2x2 grid) spheres for a 2d box is certainly not enough, because it will deform too much, resulting in bouncy behaviour.
If you keep adding particles spheres to the grid (4x4 and up), the result gets better and better, as each sphere has it's own momentum, and thus 'correcting' the abruptly moving spheres (those that are colliding).
If you have enough spheres, you can simulate everything any other physics engine can do, as the world around us is basically Verlet, until you get to the mulecule level and other forces that to take over. We just don't have the processing power to simulate it, but it will certainly get very realistic if you add enough spheres and springs to your box.
N.B. The reason I'm using spheres instead of particles is that a particle-based box is basically hollow, while a sphere based box is solid, which is important for box<->box collision.
|
Hi, appreciate more people! Σ ♥ = ¾ Learn how to award medals... and work your way up the social rankings
|
|
|
zeroone
Sr. Member   Posts: 295 Medals: 10
|
 |
«
Reply #16 on:
2009-03-01 13:18:46 » |
|
I like the vector-based graphics. Nice color scheme. The physics engine is amazing. You’ll have to teach us all about verlet physics one day. The truck is very difficult to control. I can’t make it through the first level unfortunately.
|
|
|
|
|
|