Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (542)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (605)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Don't kill me...  (Read 7389 times)
0 Members and 1 Guest are viewing this topic.
Offline barfy

Junior Devvie




The evidence of things not seen


« Posted 2004-08-16 13:37:43 »

Well, if you guys don't mind, would you mind testing out yet another Tetris-clone please?

URL: http://www.benyeoh.com/bentris2.htm

Thanks. Smiley

EDIT: Changed the url.

Changes:

* Skips rendering frames if it cannot meet the 60FPS goal. This will ensure the game is playable even with low FPS.

* F3 toggles the FPS and UPS counter

* Has a 'turbo' mode where the game tries to render and update as fast as it can

* F1 to enable 'turbo', F2 disables it

Known bugs that I can't fix and would appreciate any input on:

* Slow performance upon startup of the game through Java Web Start when the game is just updated or downloaded. Running it off the command line gives consistent performance.  Basically, it's not HW accelerated the 1st time around when running off webstart

* Mac display problems.

Offline zparticle

Senior Devvie




Thick As A Brick


« Reply #1 - Posted 2004-08-16 14:13:12 »

Very, very nice. I love the FX, exspecially the transitions. and the block glow.

EDIT: does need some sound though

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #2 - Posted 2004-08-16 14:50:56 »

Looks beautiful but it's SO SLOW - whilst doing fancy effects in j2d is technically impressive (well, only mildly so if you can't manage to do it at high speed) it's a pity if it makes the game unplayable at the same time Sad (11 - 17 fps on a 1ghz PC with GF2...for reference, there was an opengl tetris some years ago with almost exactly the same effects - actually, slightly more fancy... it did extra stuff with explosions - that used to run at around 60 fps on my old 300Mhz PC using a 3D card).

Also, your keyboard handling is broken. It very often "dropped" keys, completely not noticing they'd been pressed. Maybe one in every four keypresses was completely ignored? Not only in the game, but also sometimes in the menus.

I don't like the "delayed response" behaviour either, although this is a design issue not a technical one, e.g. I hit twice left, then twice right, and after I hit right the second time it would move left (because of the very very low responsiveness to KB input) before finally starting to move right ... although it would often lose one or both of the right keypresses Sad.

But all that aside it looks like being an excellent game eventually. I second the need for sound - but would also strongly suggest speeding things up a bit (maybe just using Blocked levels of ultra-high KB responsiveness would do to get rid of the feeling of treacle).

malloc will be first against the wall when the revolution comes...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #3 - Posted 2004-08-16 14:53:25 »

PS that was with all special effects disabled.

PPS I spotted the comment on the webpage about windows acceleration; does this mean that even with all effects disabled you're using something like translucency? That would explain very low frame rates...

malloc will be first against the wall when the revolution comes...
Offline kevglass

« JGO Spiffy Duke »


Medals: 221
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #4 - Posted 2004-08-16 15:03:47 »

Well, I was going to post and say how much I liked this game, presentation is fantastic, polish is brilliant even for a simple tetris game it rocks.

However, on exit it blue screened my XP machine which hasn't happened once in the 2 years I've owned it. Argh!

Kev

Offline barfy

Junior Devvie




The evidence of things not seen


« Reply #5 - Posted 2004-08-16 15:27:25 »

Firstly, thanks for all the comments. Smiley


Quote
Looks beautiful but it's SO SLOW - whilst doing fancy effects in j2d is technically impressive (well, only mildly so if you can't manage to do it at high speed) it's a pity if it makes the game unplayable at the same time Sad (11 - 17 fps on a 1ghz PC with GF2...for reference, there was an opengl tetris some years ago with almost exactly the same effects - actually, slightly more fancy... it did extra stuff with explosions - that used to run at around 60 fps on my old 300Mhz PC using a 3D card).

Also, your keyboard handling is broken. It very often "dropped" keys, completely not noticing they'd been pressed. Maybe one in every four keypresses was completely ignored? Not only in the game, but also sometimes in the menus.

I don't like the "delayed response" behaviour either, although this is a design issue not a technical one, e.g. I hit twice left, then twice right, and after I hit right the second time it would move left (because of the very very low responsiveness to KB input) before finally starting to move right ... although it would often lose one or both of the right keypresses Sad.

But all that aside it looks like being an excellent game eventually. I second the need for sound - but would also strongly suggest speeding things up a bit (maybe just using Blocked levels of ultra-high KB responsiveness would do to get rid of the feeling of treacle).


Yucks. 11-17FPS is horrible. The reason for the "treacle"-like feel is because the game is meant to run at a constant 60FPS (or 30FPS, when I finally implement that as an optional mode).

I had hoped to get 60FPS on a 1ghz P3 with 3D card with all effects turned on. Are you running on a Linux box by any chance? Even if you are, you shouldn't be getting 11-17FPS all the time, with all the effects turned off.

The only thing that I can think off that's mildly processor intensive are the metaball effects.

Wierd. I'm really not sure what's wrong.

Btw, with all effects off, there are still portions of the game where translucency is used. Like when a row is formed, and when a player dies. I plan to add more options to turn them all off at a later date though.

Yeah, and sound is coming soon. Though right now, I'm more interested in getting the performance right. I don't see a point adding sound if it'll then take a 3.0ghz P4 to run properly at 60FPS...

Would you guys do me favor and post your system specs and the frame rates you're getting? (The FPS can be seen within the actual game at the bottom left corner)

Thanks again Smiley
Offline princec

« JGO Spiffy Duke »


Medals: 439
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #6 - Posted 2004-08-16 15:43:02 »

Runs at 63fps on my 3Ghz rig under 1.5beta3/60 Smiley Very slick - need to make the menu screens responsive rather than forcing the user to wait for the fade effects to finish. Or at least, just speed up the fades to under half a second.

Cas Smiley

Offline DrBizzar0

Junior Devvie




Raj raj!


« Reply #7 - Posted 2004-08-16 15:59:48 »

Nice looking game, with all effects I get 33fps when running winXP and 18fps running linux on the same machine. Specs 2.0ghz athlon, gf4,  jre1.4.2_05.

And yes, the transitions and menus fellt slow.
Offline Bombadil

Senior Devvie





« Reply #8 - Posted 2004-08-16 16:20:35 »

Looks excellent and so smooth. Very nice!
Runs perfectly on my machine (Winblows, AMD Xp, Radeon 9600).
Will play it with another player the next days and see how multiplayer works (which is the really interesting part in Tetris I think).

Many greetings to Asia!


PS: Kev, if a Java game causes a bluescreen it can't be the Java game - it's this Winblows with its silly drivers. Even on solid Winblows PCs you will get a bluescreen occasionally I'm afraid. I know you know this, so I just say it to comfort you. :)
Offline barfy

Junior Devvie




The evidence of things not seen


« Reply #9 - Posted 2004-08-16 16:33:55 »

I've replaced the game with a hacked version that has the option of turning off the game timer to get the maximum FPS achievable by your machine.

PRESS F1 TO TURN IT ON
PRESS F2 TO TURN IT OFF


Please post the max FPS that you get when you try the game out.

And bring on all the feedback. I'd love to hear what you think.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline barfy

Junior Devvie




The evidence of things not seen


« Reply #10 - Posted 2004-08-16 16:39:02 »

Funny.

When I run my game off the command line on my harddrive, I get the expected 600 FPS average on my P4 3.0GHZ ATI 9800 PRO.

When I run my game off webstart, I get only 200 FPS average. What the hell?!?  Huh  

This is with, of course, the same machine with the same tasks running in the background.

EDIT: I seem to have narrowed down the problem. Whenever the app is run for the first time off web start, or if any updating for the app is done by web start, the app slows to a crawl. However, for subsequent runs, it runs at normal speed. Can any of you confirm this too?

I'll post the jar'ed app online and it'd help if you guys could check that out too and post your FPS scores comparisons.

EDIT: Jar is posted online. Both the web start and the online jar version has the "turbo" toggle.
Offline kevglass

« JGO Spiffy Duke »


Medals: 221
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #11 - Posted 2004-08-16 17:36:58 »

Yeah, sorry, blue screen just irritated me specially as its taken me this long to get my machine back up and running.

The game really is lovely.

Kev

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #12 - Posted 2004-08-16 18:02:49 »

The dangers of using fancy effects on the menu and slowing your input routine. Twice I've fired it up. Twice I accidentally quit when I tried to start the game.

Note: it takes 10+ seconds from the moment the Bentris title starts building to the menu actually becoming active, by which time the user is bored. Worse, the menu items appear slowly (several seconds) so the user is ultra impatient. You should *really* make it so that any key press cancels the fancy (annoying) graphics and JUST LETS ME PLAY THE GAME.

The input sluggishness problems mean that I'd hit up and down to try and make something happen while waiting for the damn menu items to appear, then once they did I'd see it had hilighted what I wanted, and I hit enter. First time I thought it crashed. Second time I realised - it was only now VERY late processing the "down" keyevents, moving the cursor down, and then processing the "enter" keyevent and quitting the damn game Angry.

Will try again and be more cautious this time. Sigh...

EDIT: webstart link is http://web.powerwebbing.com/benyeoh/bentris2.jnlp

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #13 - Posted 2004-08-16 18:11:11 »

I just counted 25 seconds from the start of the title appearing to the menu becoming usable. Sometimes the bricks spin in real fast, sometimes slow, sometimes start slow then speed up suddenly halfway through.

FPS during the game was 16 mostly, but near the start it went to 52/51/47 for a while. I'm pretty sure that was simply that it happened to not being using translucency for a short while. f1/f2 made no noticeable difference (no surprise there!)

malloc will be first against the wall when the revolution comes...
Offline Mojomonkey

Senior Devvie




ooh ooh eee eeee


« Reply #14 - Posted 2004-08-16 18:25:24 »

Ran great for me, looked very professional. In fact, one of the best "packaged" games I've seen in awhile. Had no problems with speed. WinXP, 2.5GHz

Don't send a man to do a monkey's work.
Offline esdeboer

Junior Newbie




Java games rock!


« Reply #15 - Posted 2004-08-16 18:25:25 »

The jar runs at 50 fps on my athlon 1.33 GHz with geforce 2 on WinXP
F2 runs at 200
Offline DrBizzar0

Junior Devvie




Raj raj!


« Reply #16 - Posted 2004-08-16 18:42:56 »

I've only tested the JAR-version on winXP, got a bit better frame rate, 41fps. Transistions and menus still fellt a bit slow though.

Oh and I got 200-250 fps with f2.

Quote
Nice looking game, with all effects I get 33fps when running winXP and 18fps running linux on the same machine. Specs 2.0ghz athlon, gf4,  jre1.4.2_05.  
Offline zparticle

Senior Devvie




Thick As A Brick


« Reply #17 - Posted 2004-08-16 18:50:09 »

Well I don't see any FPS indicator but the game runs beautifully on my:

2GHZ Win2K w/ Intel 82845G/GL card

The fades are a bit slow but the menu and game have none of the mentioned key response problems, it plays at exactly the speed I would like it to.

Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #18 - Posted 2004-08-16 18:56:21 »

Totally hosed on the Mac.

The fullscreen starts out correctly then shifts down to the right so that a significant chunk of the screen is not shown.

Other than that it appears like it would work.

This is the only fullscreen game that I have seen behave this way.

OS X 10.3.5  JRE 1.4.2_05 Update 1

Offline tafty

Senior Newbie





« Reply #19 - Posted 2004-08-16 18:57:47 »

Ran between 18 and 40 fps on JRE1.4.2_05, Win2k, AMD 2400XP, GeForce4MX.

Looks cool and plays OK but I'd go along with there being too much waiting around for menus to load and FX to finish.

The only other problem was that some of the pieces won't rotate at the edge of the playing field.

Offline weston

Junior Devvie





« Reply #20 - Posted 2004-08-16 19:07:58 »

200-300fps when not limited, 63 otherwise.
winXP
geforce fx 5200
1.8ghz
768 megs of ram

Wow, I have no idea how you did those kind of effects with Java2D (or anything else actualy...)  Grin looks great.

for(int i = 1; i > 0; i++)
{
System.out.println(i+" cups of java downed");
}
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #21 - Posted 2004-08-16 19:17:13 »

Impressive Smiley

Runs with 25-55fps (~48 on average) on a K7 500, gf2mx, 128mb, 1.4.2_05, win98se (in 800x600). With everything off it ran of course faster.

On the page it says that it aims for 60fps. But its kinda weird that people whose machines can run at ~200fps don't get steady 60fps (instead they get 50 or even less). I guess the frame capping routine you're using is to blame. You might want to give my sync2 method a try (eg sync2(61); [hz+1]).

The screen trasition fades are quite slow.

Oh and you might want to change the name a bit in order to avoid trouble. "tetris" is really bad and anything with "tris" at the end, too.

Oh² and you can disable the cursor with something like this:
setCursor(Toolkit.getDefaultToolkit().createCustomCursor(new BufferedImage(1,1,BufferedImage.TYPE_INT_ARGB),new Point(0,0),""));
(You can't do anything with the mouse right?)

弾幕 ☆ @mahonnaiseblog
Offline dranonymous

Junior Devvie




Hoping to become a Java Titan someday!


« Reply #22 - Posted 2004-08-16 20:05:02 »

Tried it out and it ran great!

Noticed a few things -

- Started game in fullscreen 1024x768.  Played a round.  Then switched to 800x600 res.  When you go to pick the background, the sizing for the box is all messed up.

- The animation speed is directly linked to your frame rate.  Ie the fade effect on the main menu speeds up and slows down depending on if you are running at 60 fps or full out.  I would think making the fade rate constant, regardless of the fps would be best.  You also notice this when playing against the computer.  If you are running faster than 60fps, he gets much faster too.  That doesn't seem fair.

Great graphics!  Very nice effects and such.  Does need sound for sure.

My 2 cents.

Regards,
Dr. A>
Offline barfy

Junior Devvie




The evidence of things not seen


« Reply #23 - Posted 2004-08-17 01:32:46 »

I've made a few changes to the app:

1. Fixed the window not resizing to fit the view port during background selection. (Thanks to dranonymous for that one)

2. Added a turbo toggle hack with F1 to enable and F2 to disable

3. The main menu screen animations can now be skipped with the 'ENTER' key

4. Increased the speed of screen fades and menu text fades


Offline barfy

Junior Devvie




The evidence of things not seen


« Reply #24 - Posted 2004-08-17 01:48:58 »

Current problems for which I'm totally stumped  :-/ :

1. Frame rate issues.

There are SOME people like esdeboer and DrBizzar0 who report 30-50 FPS, yet with the turbo toggle off, they get around 200 FPS. Not sure why, since all I'm doing is limiting the FPS (and the game) using a hacked gagetimer to return accurate time in millis for the various platforms and using Thread.yield().

And then there are some like blahx3, tafty and DrBizzar0 who report unplayable frame rates on reasonable system specs yet there are others like esdeboer and weston who have similar machines but have much better performance.

I'm guessing it could probably be a video RAM issue, since I'm basically pre-rendering a lot of graphics and storing them in VRAM. That's how I get all those accelerated translucent effects in Java2D, no big mystery there. However, if all of the major effects are turned off, there really shouldn't be a reason for getting ~20 FPS on a 1 ghz machine.

2. Then there are the issues with web start. Once, I got 200+ FPS on the first run after a fresh update/download of the application. On the next run, I got 450 FPS average. On subsequent runs I get 600+ FPS which is what I normally get running the jar off the command line. Bizarre.  Shocked

Not sure if you guys get the same thing. I'm running JRE 1.4.2_04 on a Windows XP platform, 3.0 P4, 1 gig RAM and ATI 9800 Pro.

EDIT: Try this little experiment. Click on the web start link. Upon first running the game in web start, press f1 to get the max FPS. Quit the game. Click on the web start link again to run the game and press f1. You should get MUCH higher FPS.

3. Mac display problems. Again, not sure why it displays properly on other platforms and not on the mac. I'm guessing it's a BufferStrategy issue. This is what I was doing (I don't want page flip since I'm using dirty rectangles to speed up rendering already)

1  
createBufferStrategy(2, new BufferCapabilities(new ImageCapabilities(true), new ImageCapabilities(true), null));


@swpalmer, can you elaborate on the problem? Does it occur in windowed mode or at the different resolutions as well?

Appreciate all the feedback and suggestions guys. Keep em coming.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #25 - Posted 2004-08-17 07:16:28 »

Quote
Current problems for which I'm totally stumped  :-/ :

1. Frame rate issues.
And then there are some like blahx3, tafty and DrBizzar0 who report unplayable frame rates on reasonable system specs yet there are others like esdeboer and weston who have similar machines but have much better performance.


OK, dude, you have GOT to write an animation class!

As mentioned above, having ANY part of your game timed off your absolute frames is a suicidally stupid idea (always comes back to bite you eventually). I wasn't sure, but it certainly looked like your effects (especially lines disappearing) are synched/locked to individual frames.

I just checked, and ... with new version, I get 40-60 (yes, sometimes even 60!) fps throught the game, and it plays like real tetris (blocks move smoothly etc) right up until....the FIRST time either player gets a line. From then on it's 16-17 fps all the way. Again, sometimes (rarely) after that you get a brief period of 40 odd FPS.

But what I noticed more than anything else (now that I was looking carefully) is that you have timed EVERYTHING off the frames, rather than time. So, not only do blocks "jerk" across the screen when the FPS drops but they also move 4 times more slowly! *that's* why it feels sluggish and unpleasant for some of us, and fine for others.

So, for a start, you need to make an animation system that is frame-rate independent (just like every other game does with player / monster movement etc - your fades must also play back at constant time duration irrespective of frames elapsed).

Since you *need* to have a frame-independent animation system for any game anyway, is there really any point in not using it for everything?

Quote

I'm guessing it could probably be a video RAM issue, since I'm basically pre-rendering a lot of graphics and storing them in VRAM. That's how I get all those accelerated translucent effects in Java2D, no big mystery there. However, if all of the major effects are turned off, there really shouldn't be a reason for getting ~20 FPS on a 1 ghz machine.


Ah. I do only have 16 Mb VRAM (laptop card). Bear in mind that that's enough to play Quake3 Cheesy...

Anyway, the "starts at 60 fps, drops on first alpha effect" could be something to do with you "losing" the accelerated image (i.e. the alpha effect - which is not supportedby Sun for hw-accel except on windows - shunts your hw-accel images out of VRAM and then they can only go back when:

1. There is no alpha going on
  and
2. they are small enough to fit
  and
3. the heuristics (and/or an explicit call) decide to

(I think that's the set of reqs? But I've probably made a mistake somewhere Grin)

Certainly, it looks like they're getting shunted out and never being allowed back in again. I did wonder if perhaps after the first alpha you left *one pixel* (or something like that) with a tiny amount of alpha still in the image somewhere, which was preventing the sytem from putting it all back into VRAM - but then, occasionally, that pixel would get overwritten (allowing a spurt of acceleration), only to be quickly written over with some alpha again.

Are you *sure* that your alpha routines always leave the alpha in the same state it was when they started? If there's an out-by-one error in the loop...

malloc will be first against the wall when the revolution comes...
Offline darkprophet

Senior Devvie




Go Go Gadget Arms


« Reply #26 - Posted 2004-08-17 07:20:49 »

awsome game! very nice.

Didn't have any problems with the menu's responsiveness or the FPS (which was 63 btw capped).

Very nice.

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline princec

« JGO Spiffy Duke »


Medals: 439
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #27 - Posted 2004-08-17 08:55:55 »

Blah3 - I beg to differ about fixed frame rates Smiley

Cas Smiley

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #28 - Posted 2004-08-17 09:27:16 »

Quote
Blah3 - I beg to differ about fixed frame rates Smiley


Yeah, I know. AF was uppermost in my mind when I typed that Tongue, but  weighing up the pros and cons fixed frame rate can not only get you into a lot more trouble but unless you actually control the platform (e.g. consoles, which are *nearly* all identical) then you can never be truly guaranteed to keep your fixed rate. And then it all goes pear shaped.

Of course, if you'd like to argue it in detail, why don't you write an article on it? Grin.

(OT: Speaking of which, no-one's delivered on a JOGL article to go side by side with your LWJGL one. Sorting that out is on the todo list for immediately after the launch of the next JGF version)

malloc will be first against the wall when the revolution comes...
Offline barfy

Junior Devvie




The evidence of things not seen


« Reply #29 - Posted 2004-08-17 09:45:20 »

I've traced a frame rate problem on my Windows PC to the combination of:

1. createBufferedStrategy to not use page flip
2. NOT setting the accthreshold=0 system property
3. NOT setting the ddforcevram=true system property

= All graphics will not be accelerated

OR

1. running web start for the 1st time after a download/update

= All graphics will not be accelerated

The problem lies somewhere with the combination of the BufferStrategy used, the system properties to enable acceleration and the way web start handles them.

Has anybody got any ideas on how to work around the issue, aside from waiting for hardware acceleration to actually be supported officially?   Sad

@blah: Your suggestion to seperate the animation frames from the logic frames is a good idea in this context of wildly fluctuating frame rates... Although I'm more keen on getting the app to run properly on systems that SHOULD be able to render 60fps.


Pages: [1] 2
  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.

Elsealabs (16 views)
2014-12-28 10:39:27

CopyableCougar4 (20 views)
2014-12-28 02:10:29

BurntPizza (25 views)
2014-12-27 22:38:51

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

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

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

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

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

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

BurntPizza (115 views)
2014-12-08 04:46:31
How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

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
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!