Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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  Game Development / Game Mechanics / Re: Keyboard Input Lag on: 2012-01-28 02:27:54
I came across 'delays' in my early game efforts which seemed to be related to how key repeats are handled. The way to demonstrate the effect is to open a text editor and hold down a letter key.  After the first letter is displayed there is a noticeable delay after which the letter then repeats quickly (in Windows at least).  I would get the same responses in my game.

My way round it is rather than respond to action directly in the overridden keylistener methods,  I use them to set booleans which eliminate the 'lag' as the game movement logic now relies on the boolean values rather than the raw keypress data.

I'm not sure if this is the same problem you are experiencing, but from what you are describing it sounds very familiar to my experiences.
2  Game Development / Newbie & Debugging Questions / Re: BufferStrategy IllegalStateException on: 2012-01-14 23:58:53
Well I presume it's the act of closing down the applet, as in closing the window.  It's only an (un?)educated guess as everything is fine when it's running!

I'm just checking if there is anything else I should be doing.  Below is my game loop code, which is pretty similar to tutorials and other posts on this board.  I've never seen any examples of putting the drawing code in a try block and was wondering if there was a reason for it and if the IllegalStateException is common when exiting.  The exception might not even be an issue since I'm closing it down anyway, but I've only been playing with BufferStrategy for the last week so I'm very green!

        while(t == gameloop) {
            threadDelay = GAME_FRAME_DELAY - (System.currentTimeMillis() - lastloop);
            try {
            } catch (InterruptedException e) {
                //do nothing

            //update game logic

                        Graphics2D g = (Graphics2D)strategy.getDrawGraphics();



                } while(strategy.contentsLost());
            lastloop = System.currentTimeMillis();
3  Game Development / Newbie & Debugging Questions / BufferStrategy IllegalStateException on: 2012-01-14 23:07:41
I've moved over to use BufferStrategy from BufferedImage for my first attempt at a game (I'm using Java2D as a learning experience) and the performance boost is pretty noticeable.  I'm constructing the game as an applet for the time being and it's all working fine, but when running it from Netbeans/AppletViewer I get an ugly IllegalStateException showing up in the console when I close down the applet.  Presumably that's because I'm killing it mid-flow.

Is there any particular way I should be handling this?  I could of course put the BufferStrategy code in a try block and handle the exception that way, but I just wanted to check if that was the right thing to do and/or if there is a better way of doing it?
4  Discussions / General Discussions / Re: best way to learn java on: 2012-01-09 09:00:00
I've been learning Java for the past year or so and game programming about the last 3 months. From my experience it's not knowing what questions you need to ask to get to where you want to be.

6 months ago I was dealing with which layout to use in a Swing application. If back then I thought 6 months later I would be able to understand what a BufferStrategy is let alone what it is for and how to use it I would have laughed!

Online tutorials only went so far for me and in the end I bought a Java game programming book which takes you through a project start to finish. It doesn't teach you everything but gives an understanding to move forward with.

It's very daunting at first, but once you get to a certain point the knowledge will start to snowball. That's my 2c as a newbie myself!
5  Game Development / Networking & Multiplayer / PHP Server side on: 2011-12-16 08:43:27
Hi all, long time reader, first time poster.

I've been programming in Java for a little while now (as an amateur) and i'm now making a foray into writing some 2D games. My first prototype is coming along nicely, but I have a couple of questions about server side.

I've read some topics on here that confirm PHP can be used as a viable server side in certain circumstances. To begin with I want to keep things fairly simple and for my first prototype I just want to keep high scores server side so they are accessible to anyone who plays the game. I have some experience of PHP so it would be good to 'go with what you know' to get used to things.

Later on I want to explore things where state is saved when placing objects, similar to games with mechanics like FarmVille where you place objects and then come back later.

I've been trying to google about the best way to go about this, but finding out the nuts and bolts of the way to go about this on google seems to not be that easy.

My own thought would be to bundle up the data into XML and then buffer stream it to the PHP script to parse and store in MySQL and vice versa back to the client.  Would this be a viable way to do it or am I missing a trick here? (most likely!)
Pages: [1]
EgonOlsen (79 views)
2018-06-10 19:43:48

EgonOlsen (59 views)
2018-06-10 19:43:44

EgonOlsen (78 views)
2018-06-10 19:43:20

DesertCoockie (261 views)
2018-05-13 18:23:11

nelsongames (159 views)
2018-04-24 18:15:36

nelsongames (158 views)
2018-04-24 18:14:32

ivj94 (901 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (813 views)
2018-03-24 14:43:53

Solater (177 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!