Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (541)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
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  
  4K Pinball  (Read 14565 times)
0 Members and 1 Guest are viewing this topic.
Offline tom
« Posted 2007-11-21 20:38:12 »

[size=16pt]Play Pinball[/size]

Download the source code

Keys
left arrow - left flipper
right arrow - right flipper
space - tilt
enter - new game
escape - exit game

Playfield



Scoring and Bonus Rules
Bumpers and slingshots gives 1000 points. Dropdowns and rollovers 4000 points.

5000 bonus points for completing a dropdown or rollover group.

Completing the A, B or C drop target will ligth a bullseye
arrow. The bullseye bonus depends on the number of arrow lit:
0:  25 000
1:  50 000
2: 100 000
3: 200 000

Completing the multiplier rollovers will increase the multiplier. All bonus
scores are multiplied by the multiplier.

The inlane rollovers will lite the left lane arrow for 30 seconds. The bumper
rollovers will lite the right lane arrow for 30 seconds. The left and right
lane awards 25000 bonus point when its arrow is lit.

Hitting the bumper rollovers 3 times will enable the bumper bonus for 30
seconds. Hitting a bumper when the bonus is on awards 5000 bonus points.

Hitting the left lane 3 time will enable the rollover bonus for 30 seconds.
Hitting the right lane 3 time will enable the dropdown bonus for 30 seconds.
Hitting a rollover or dropdown when the bonus is one awards 10000 bonus points.

Completing the kicker dropdowns will light the coresponding kicker.
Triggering a kicker will kick the ball back and award 15000 bonus points.

Extraball is awarded when reaching the following scores:
 1 000 000
 2 000 000
 4 000 000
 8 000 000
16 000 000
32 000 000
64 000 000
etc

Extraballs do not stack.

Strategy
Hit anything that is blinking. Bonuses are shown by an object blinking. So
if it is blinking, try to hit it. 

Go for the multiplier. Learn how to trap the ball on the left flipper. If you trap
it on the right flipper you can tilt the board to move it to the left. Then hit the
right lane to move the ball to the multiplier dropdown. Use tilt to complete
the rollover on the right.

Use the slingshots to hit the kickers and bumper rollovers. Use tilt to get
extra kick from the slingshots.

Use the tilt as much as possible to conroll the ball. But be careful, the board
is locked if you tilt two times in under half a second.

Features
  • Vector based posteriori collision detection
  • Realistic collision repsonse
  • Rollover targets
  • Drop targets
  • Bumbers
  • Slingshots
  • One way gates
  • Tilt
  • Multiplier
  • Outlane kickers
  • 3 flippers
  • Bullseye skill shot
  • 5 time bonuses
  • Extraball

History
26.12.2007: webstart (4096 bytes).
13.12.2007: webstart (3896 bytes).
08.12.2007: webstart (3954 bytes).
03.12.2007: webstart (4026 bytes) (4024 bytes).
25.11.2007: webstart (4085 bytes).
22.11.2007: webstart (4075 bytes).
21.11.2007: webstart (4085 bytes).

Offline thijs

Junior Devvie




Lava games rock!


« Reply #1 - Posted 2007-11-21 21:41:43 »

Absolutely lovely!

Great work so far, one thing I noticed while playing was that it felt like the acceleration of the ball is a bit too fast and the friction too low.

<a href="http://www.dzzd.net">3DzzD!</a>
<a href="http://www.arcazoid.com">Arcazoid!</a>
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #2 - Posted 2007-11-21 22:26:40 »

Awesome stuff! Grin

弾幕 ☆ @mahonnaiseblog
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Morre

JGO Knight


Medals: 2
Projects: 10


I'm Dragonene on IRC.


« Reply #3 - Posted 2007-11-21 22:28:13 »

Cool stuff! It's tricky to see what's what though; for example, you can't see the flippers. Personally, I'd have liked just a little bit work on graphics instead of one or two of the flipper board parts. Good stuff though, looking forward to seeing it finalized.

I've a little something going on myself, but I'm waiting for the competition to start Wink

Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #4 - Posted 2007-11-22 00:49:11 »

Very cool!

You have managed to pack in quite a bit there and it is quite well balanced, with action and interaction.

Some ideas: It is a bit hard to guess what color of the lights is on and off, especially since they aren't always lit when going over them. The ball did also go through the flipper a few times, when hitting it with the tip of the flipper. (Changed direction a bit). Would be nice to with some description of what does what (like what triggers multilpier and so on). I could still use flippers after tilting. Feature? Smiley

Framerate seems to be good except for some hiccups from GC or possibly this:
java.lang.NullPointerException
   at java.awt.Component$BltBufferStrategy.revalidate(Unknown Source)
   at java.awt.Component$BltSubRegionBufferStrategy.validateAndShow(Unknown Source)
   at javax.swing.BufferStrategyPaintManager.show(Unknown Source)
   at javax.swing.RepaintManager.show(Unknown Source)
   at javax.swing.SwingPaintEventDispatcher.createPaintEvent(Unknown Source)
   at sun.awt.windows.WComponentPeer.postPaintIfNecessary(Unknown Source)
   at sun.awt.windows.WComponentPeer.handleExpose(Unknown Source)
   at sun.awt.windows.WToolkit.eventLoop(Native Method)
   at sun.awt.windows.WToolkit.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


All in all a great game and a good idea. I say that because I created one very similar to this last year Cheesy , but got too swamped to complete it on time. Tongue Almost scary how similar they are. I created a "full version" of the same game available here. I was hoping to make it an applet using Slick, but I have a gfx card that doesn't play well with Slick, so the project has sort of been dormant so it is not complete or bug free, but maybe fun to see the similarities anyway. Keys: Enter, right & left shift, q,w,e,r and 1 - 6 to drop balls at different places.

I worked a bit on the flippers on my 4K game, as Morre suggested to you, but improving it a bit does take quite a lot of work and mem! I think it would still be nice with different color for the flippers, so that they are a bit more distinct.

First good game already ready and competition isn't even officially started. Looks promising.

PS. 2.195.100 (8x multi and saved ball once using tilt in drain shute)

Offline tom
« Reply #5 - Posted 2007-11-22 03:32:14 »

Made a new version with thicker lines and a different color on the flippers.

Some ideas: It is a bit hard to guess what color of the lights is on and off, especially since they aren't always lit when going over them. The ball did also go through the flipper a few times, when hitting it with the tip of the flipper. (Changed direction a bit). Would be nice to with some description of what does what (like what triggers multilpier and so on). I could still use flippers after tilting. Feature? Smiley
I'll see if I can make room for different colors on the different type of targets. Group targets should change color but single targets will not change. I see that it can be difficult to figure out what is what.

As you know, the flipper physics is very difficult to get right. I noticed in your game that the ball sometime got a little stuck at the end of the flipper. If I did not have the size restriction I would go for a sliding sphere priori collision detection. Then I would be sure the ball will not go threw the flipper. What I can do now is to increase the collision detection rate. I paint at 60 fps and update the physics at 120 fps. If I increase the physics rate to 240 the bug will be less noticable since the ball and flipper will travell half the length every update.

I've added a rules section on the website. There is a link in the first post.

Tilting will not freeze the flippers, but you will loose half of your score.


Offline nva225

Junior Devvie





« Reply #6 - Posted 2007-12-03 00:57:59 »

Wow I really like this. Just need to speed up a little and it looks like it'll be great. Love the color fade on the bumpers and the physics overall. And it seems to have a fairly good balance for avoiding going straight down the gutter, which sometimes is an unfortunate issue in an otherwise good game.

Looking forward to the finished product!
Offline DzzD
« Reply #7 - Posted 2007-12-03 08:56:21 »

cool

Offline appel

JGO Wizard


Medals: 69
Projects: 4


I always win!


« Reply #8 - Posted 2007-12-03 15:04:46 »

Submit submit submit  Grin

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline tom
« Reply #9 - Posted 2007-12-03 16:45:06 »

I've submited the game. Although it is not finished yet. Still got 70 bytes left Smiley

I've fixed the NPException reported by jojoh. Switcted from currentTimeMillis() to nanoTime(). Hopefully it will make it run smoother on some configurations. I've increased to physics iterations to run at around 960 times a second wich will improve the flipper/ball collision detection. There is also many small changes since the last time I've posted (22.11). Animated score, extra ball bonus at 1, 2, 4, 8 milliion, colored groups, 3 flippers, outer lane kickbacks, guide arrows and bonus text.

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

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #10 - Posted 2007-12-03 17:59:15 »

Great improvement!

Every time you add stuff, the jar gets smaller! Cheesy Just keep going. Like the kickbacks! Any chance that they could be activated at start?

Framerate seems to have dropped a bit, but I guess that's just the price for all the extra stuff and the better flipper collision. It is still ok though.

Just sound missing Wink

Offline tom
« Reply #11 - Posted 2007-12-03 20:11:43 »

Uploaded a new version where the kickback are activated at start. Also managed to reduce the jar size 2 bytes by rewriting a for to while:)

The framerate is capped to 60 fps. I can underclock my laptop to 1000mhz and still get 60 fps. Any less and the game slows down. The time is mainly spent rendering lines. The physics takes very little time. Had to change the physics parameters when I increased the phrequency. This might have caused the game to feel slower.

Offline tom
« Reply #12 - Posted 2007-12-08 16:12:06 »

Added a a gradient background. After optimizing and using Moogies 4KJO utilite the jar size is down to 3954 Smiley

Screenshot of current version:


Offline tom
« Reply #13 - Posted 2007-12-27 01:10:11 »

The game is finally finished. I've updated the first post with a picture of the final playfield, scoring rules and a strategy section. I encurage everyone to try it again. Especially if you are a judge  Smiley

I've added a bunch of things since the last post. Tried to improve the graphics by shading the ball and adding some shadows. There is a flashing effect every time a bonus is awarded.

Added some time bonuses. The objects will blink when bonus is activated.

Now, I've got an idea for another 4k game I want to try out. See if I get the time.

Mary Christmas everyone!

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #14 - Posted 2007-12-28 22:23:54 »

Absolutely stunning, in only 4k!  Shocked

Perhaps a tad easy, but other than that everything feels just right.

Offline EnderGT

Junior Devvie





« Reply #15 - Posted 2008-02-01 20:14:57 »

That was excellent. The physics is great, graphics are simple but good, runs smoothly, responsive to inputs.

Gameplay might be low, but hey it's pinball, what do you expect. It's fun, it keeps you occupied for a while, it does what a game is supposed to do.

Congratulations, well done.
Offline tom
« Reply #16 - Posted 2008-04-18 06:57:34 »

The source code for 4K Pinball is now available.

I've included an ant script, so it should be ease to compile and run.

I've also included the level editor. The game is hardcoded to the existing level. If you want to create a new level from scratch you will also have to change the game. Although it should be possible to modifiy the existing level without the game breaking to much Smiley

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (10 views)
2014-12-27 04:03:04

TheDudeFromCI (13 views)
2014-12-27 02:14:49

Mr.CodeIt (25 views)
2014-12-23 03:34:11

rwatson462 (56 views)
2014-12-15 09:26:44

Mr.CodeIt (46 views)
2014-12-14 19:50:38

BurntPizza (92 views)
2014-12-09 22:41:13

BurntPizza (113 views)
2014-12-08 04:46:31

JscottyBieshaar (83 views)
2014-12-05 12:39:02

SHC (94 views)
2014-12-03 16:27:13

CopyableCougar4 (102 views)
2014-11-29 21:32:03
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!