Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (589)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Games Center / Archived Projects / Re: GravityTrap ... first game on: 2002-12-16 15:22:03
Open sourcing it would be cool if you get the time... I'd certainly like to read through the physics code...

See ya,

Tom
2  Games Center / Archived Projects / Re: First 2D game - yet another Tetris(tm) clone.. on: 2002-12-16 13:52:03
Hm, you're right, currently it just goes ahead and plants the piece without waiting.  I'll look at it... thanks....

Tom
3  Games Center / Archived Projects / Re: First 2D game - yet another Tetris(tm) clone.. on: 2002-12-16 13:30:16
I changed the controls on my version to match yours... whoever suggested it way back when, you're right: the down arrow should simply lower the block, not drop it.

http://infoether.com/~tom/games/tetris/

See ya,

Tom
4  Games Center / Archived Projects / Re: GravityTrap ... first game on: 2002-12-15 23:35:00
That's a really cool game!  Nice physics.  And still smooth even when there's a slew of bullets on the screen.  Very cool.

Tom
5  Games Center / Archived Projects / Re: First 2D game - yet another Tetris(tm) clone.. on: 2002-12-14 16:58:16
Wow dude, that's awesome!   Nice and smooth.  Very cool.

The brickout game is awesome, too... I'm working on one right now and it sure doesn't look as good as that!  Oh well.

See ya,

Tom
6  Discussions / Business and Project Management Discussions / Re: Diary on: 2002-12-10 19:38:24
Eggscellent.... consider it bookmarked...

Thanks,

tom
7  Discussions / Business and Project Management Discussions / Re: Diary on: 2002-12-09 22:53:08
Yup, that'd be good stuff.  Especially if you can include some more or less step by step account of implementing a game - problems, successes, stuff that you ended up refactoring into a general purpose library, etc.

I started doing something like that here:

http://www.infoether.com/~tom/games/tetris/

See the "Development notes" at the bottom of the page.  For my next game maybe I can include some more details on blind alleys, refactorings, etc....

Good luck,

tom
8  Games Center / Archived Projects / Re: Tower Games presents Line of Muskets on: 2002-12-05 17:25:53
Pretty cool game... nice smooth animations... fairly intuitive controls.  The game's author is online now so there's some expert guidance available....

Tom
9  Games Center / Archived Projects / Re: First 2D game - yet another Tetris(tm) clone.. on: 2002-12-05 16:40:32
Very cool, thanks for the thoughtful response.

FWIW, I was just reading some stuff out there on Othello algorithms.  Seems like some people create an "evaluation thread" while the human player is thinking.  The thread considers each possible human player move and evaluates the best possible response move - so when the player finally does go, the computer has some cached responses.  Cool stuff.  

Thanks again,

Tom

10  Games Center / Archived Projects / Re: First 2D game - yet another Tetris(tm) clone.. on: 2002-12-04 12:53:09
Yup, it makes sense to use as few resources as possible.  

I put a Thread.currentThread.sleep(20) in the game loop; that trims CPU usage to about 30% without causing flickering or anything like that.  So that's a little better.  

Tom
11  Games Center / Archived Projects / Re: First 2D game - yet another Tetris(tm) clone.. on: 2002-12-04 11:48:55
The more I think about it the more I agree that the "loop as fast as you can" design is not good for some games.  

For example, a Othello game could just sit and wait for user input, and then spend as much cycles as necessary flipping pieces and calculating scores and exploding with light and sound.  Then it could go back to sleep and wait for the next move.  Actually, I guess it would need a background thread to be analyzing possible moves and such... assuming it was a player against computer game.  

What about arcade games though?  Maybe Tetris isn't really an arcade game per se... although when the "lower piece" speed is down to 100 ms it seems fairly arcadish.  Hm.  At the same time though, Herkules' question still seems appropriate - "why should x consume 100% of my CPU?".  Even if it is Asteroids or Space Invaders or some such, gobbling 100% of CPU seems rude.

Re-reading your post again now... the thing that bothers me about "land the piece, then play the animation, then continue the game" is that it seems a bit stilted.  I mean, part of the fun is that a lot of stuff is going on at once - I'm rotating a piece, the animation from the last piece is still going, the animation from the last time I filled up a row is fading away (at least, if there was such an animation).  On the other hand, all that could probably be done using separate threads.  

Here's a question - how could that animation be accomplished without redrawing the underlying board every time the circles get bigger?   Hm, I guess I could draw a clipped region of the board, then do the animation.... and the clipped area could be dependent on the largest circle size... hm.  Or maybe there's some Java 2D ImageFilter thing for that....

Thanks for the ideas and feedback,

Tom
12  Games Center / Archived Projects / Re: First 2D game - yet another Tetris(tm) clone.. on: 2002-12-03 16:33:58
Hm, that's well said.  Let's see.... 

Note that any explanation I give for doing this as an FPS-based thing will be purely post-action rationalization on my part since I just kind of wrote this the only way I could think of doing it.  It's more of a lack of knowledge on my part than an attempt to do things a particular way. :-)

Anyhow, yup, let's see, how to do this without a busy-wait game loop?  OK, there could be a timer that fires once a second that kicks off a "piece lower" event that erases and redraws that piece.  And the KeyListeners could do a similar thing for rotation and left/right movement.  

The animation thing would be interesting.  

[much typing]

OK, it was interesting enough that I cobbled together an little "animation" that, in addition to be disconcertingly ugly, gives us something to work with.   I've uploaded a new version to the web site - http://infoether.com/~tom/games/tetris/.

So, how could I do something like that without a FPS thing?  Maybe run the animation in another thread?  And then interrupt the thread if the animation needed to be restarted?  Maybe that's a way to do it...

Tom
13  Games Center / Archived Projects / Re: First 2D game - yet another Tetris(tm) clone.. on: 2002-12-03 11:55:23
Right, it could just sleep inside the game loop... but wouldn't that preclude a "row filled" animation or a "piece landed" animation?   Because those would need to, you know, fly away in little pieces or something nice and smooth.  

On the other hand, I haven't implemented any animations like that yet, so that's not a very strong argument :-)

Tom
14  Games Center / Archived Projects / Re: First 2D game - yet another Tetris(tm) clone.. on: 2002-12-03 10:14:53
Right... it'll take everything it can get... the game loop is pretty much this:

state.execute();
offScreenImage.drawImage(blahblah);

So it'll loop as fast as it can.  

I put a Thread.yield() inside the game loop, and a Thread.currentThread().setPriority(Thread.MIN_PRIORITY) right as the program starts to try up make it a bit less greedy....

Yours,

Tom
15  Games Center / Archived Projects / Re: Teranoid (The best java breakout) on: 2002-12-02 18:11:20
Beautiful graphics, great variety in blocks, nice physics.  The only problem I saw was that the screen would occasionally lock up - GC pauses I presume - but other than that, really really nice.

Tom
16  Games Center / Archived Projects / First 2D game - yet another Tetris(tm) clone... on: 2002-12-02 18:02:39
...can be found here:

http://infoether.com/~tom/games/tetris/

This is a very simple implementation of Tetris - no sound, blocks are drawn using Graphics2D.drawRoundRect(), and so on.  Everything should work though - the pause function, the "top 5 high scores", the demo mode, etc.  FWIW,  I get about 65 FPS on my little Pentium III 1.1GHz laptop.

Thanks for any feedback - this is my first effort in this field so pls be gentle :-)

Thanks,

Tom

P.S.  First I posted this over in the Java 2D section... thanks to zparticle for noticing that it should have been over here to begin with.
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

trollwarrior1 (27 views)
2014-11-22 12:13:56

xFryIx (69 views)
2014-11-13 12:34:49

digdugdiggy (48 views)
2014-11-12 21:11:50

digdugdiggy (42 views)
2014-11-12 21:10:15

digdugdiggy (36 views)
2014-11-12 21:09:33

kovacsa (60 views)
2014-11-07 19:57:14

TehJavaDev (64 views)
2014-11-03 22:04:50

BurntPizza (62 views)
2014-11-03 18:54:52

moogie (77 views)
2014-11-03 06:22:04

CopyableCougar4 (77 views)
2014-11-01 23:36:41
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!