Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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  
  Q*Bert4K  (Read 2826 times)
0 Members and 1 Guest are viewing this topic.
Offline Rick

Junior Member


Projects: 1


Java games rock!


« Posted 2009-01-30 17:22:19 »

A simple Qbert clone.
Use the Arrow keys to move.

http://j4k.freehostia.com/qbert.jnlp

Offline zeroone
« Reply #1 - Posted 2009-01-30 17:26:19 »

Really cool!  Loving this.
Offline halfwitgoat

Junior Member


Projects: 2



« Reply #2 - Posted 2009-01-30 20:00:42 »

All I get is a grey Window.  Cry

XP with Version 6 update 11.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline pjt33
« Reply #3 - Posted 2009-01-30 20:29:55 »

The key detection is horrible for me. It misses lots of key presses, and then moves twice when I only pressed the key briefly once.
Offline Rick

Junior Member


Projects: 1


Java games rock!


« Reply #4 - Posted 2009-01-30 22:03:44 »

I replaced the jar with a version that uses nanoTime instead of currentTimeMillis. So hopefully this will maintain a better frame and key checking rate. Was it running slowly on your machine.
I am just overiding the processKeyEvent() method to store the key press and then checking for the key in the game loop. So if you are missing events the only thing i can think of is that the game loop is running too slow. If it is still a problem I will look and decoupling the logic loop from the draw loop.

Not sure what the issue with the gray screen is, any exception. I also now get and dispose of the graphics context each frame so this may fix the gray screen issue. Refresh and let me know if it helps.
Offline luisoft

JGO Coder


Projects: 6


Java games rock!


« Reply #5 - Posted 2009-01-31 00:23:40 »

wow. really cool remake of this classic! great job! I tried to work on a similar game for last year competition but I was not able to get it in 4k. Are you planning to release the source code?
Offline halfwitgoat

Junior Member


Projects: 2



« Reply #6 - Posted 2009-01-31 13:21:17 »

No, there wasn't anything in the console, but it works now. Smiley Nice.

The key presses don't feel quite right. If you hold a key down, there is a longer delay after the first jump than after the following ones, like the standard key repeat you get while typing. I'd guess your key events are coming in like that.

Offline pjt33
« Reply #7 - Posted 2009-02-01 00:20:31 »

I replaced the jar with a version that uses nanoTime instead of currentTimeMillis. So hopefully this will maintain a better frame and key checking rate. Was it running slowly on your machine.
I am just overiding the processKeyEvent() method to store the key press and then checking for the key in the game loop. So if you are missing events the only thing i can think of is that the game loop is running too slow. If it is still a problem I will look and decoupling the logic loop from the draw loop.

Not sure what the issue with the gray screen is, any exception. I also now get and dispose of the graphics context each frame so this may fix the gray screen issue. Refresh and let me know if it helps.
The double-movement appears to be fixed but it's still missing 70% of key presses.

Edit: why would the speed of the game loop matter? Mark the key as down in the event thread when you get a KEY_PRESSED event and mark it as up in the logic thread when you process it. You can still miss some keys presses, but speed is irrelevant because it's just a synchronisation issue. If you have the spare bytes, see my thread on key handling. No-one's made any comments on it yet, but at least that means that if it has any flaws they're not glaringly obvious.
Offline rdcarvallo

Senior Member


Projects: 5
Exp: 15 years


2D Java games forever!


« Reply #8 - Posted 2009-02-01 06:36:39 »

A litle bug if you die when completing the last square, you don't pass to the next stage, and cannot win (all squares painted)
Offline Rick

Junior Member


Projects: 1


Java games rock!


« Reply #9 - Posted 2009-02-01 17:21:20 »

I found the problem. I had a while loop to maintain the frame rate but on slow systems there was never any free time left over so the while loop was never entered. The result was yield was never called so the event thread was starved hence the key press was missed. I changed to a do while so yield will be called on every render loop.

I saw the bug on the die on the last square too. I will look into it as soon as I can until then don't die on the last sqaure  Smiley.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Rick

Junior Member


Projects: 1


Java games rock!


« Reply #10 - Posted 2009-02-05 01:02:46 »

Just updated the game. Fixed the death on last square and added a bunch of new levels. Let me know if there are any issues. Also added faster balls and a green gremlin that turns the squares back to the original color. Also squares that must be hit twice. The format of a level is as follows:

1  
2  
3  
4  
5  
6  
7  
                       "      p      "+
                       "     * *     "+
                       "    * * *    "+
                       " l * * * * r "+
                       "  * + + * *  "+
                       " * * * * * * "+
                       "- - - - - - -",

a 13X7 grid
Where
p = player start square
* = normal square
- = snake spawn point
l,r = left and right flying disk
+ = double hit square
space = empty square

If any one wants to send me an interesting level I still have room to include it.

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.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (26 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (13 views)
2014-07-29 10:59:34

E.R. Fleming (34 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (44 views)
2014-07-24 01:59:36

Riven (44 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
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!